ALU OPERATIONSALU operations in the CPU include calculations ofintegers and/or fractions.All the computations areperformed using the binary number system. ALUoperations also include signed arithmetic operations.First we discuss how the binary equivalents of decimalnumbers are represented in fixed-point representation(integers),then we discuss floating-pointrepresentation (fractional). Fixed- and floating-pointoperations are important for the computer. They makethe computer versatile when performing arithmetic andlogical types of ALU operations.Fixed-Point OperationsFixed-point arithmetic operations are performed onintegral or whole numbers where the binary point isassumed to be to the right of the least significant bit(bit 0). For example, if we have an 8-bit register, wemay express integer decimal numbers between 0 and 2^{8}minus 1 (or 255), by converting the decimal number toits binary equivalent. If we have a 16-bit register, wecan store integer decimal numbers between 0 and 2^{16}minus 1 (or 65535). Because the binary point is fixedand always to the right of the least significant digit,fractions are not represented. The magnitude orabsolute value of the number is always represented by2^{N }minus 1 where N is the number of bits within theregister or memory cell where the number is beingstored.In fixed-point operations, the computer canperform calculations on signed numbers (positive andnegative). The most significant bit (msb) is used as asign bit. A zero (0) in the msb indicates a positive ortrue form number, and a one (1) in the msb indicates anegative or one’s complement/radix-minus-1 formnumber.When dealing with binary numbers, we can takethis one step further; we find the two’s complement orradix-minus-2 of the number. It is important tounderstand the concepts behind 1’s and 2’scomplement.It is the basis by which the computerperforms arithmetic and logical calculations. Now ifyou want to accommodate an equal amount of positiveand negative numbers, a 16-bit register can containnumbers from –32768 to +32767 or –2^{15 }to 2^{15 }minus1. The reason they are not both 2^{15 }is because onecombination is taken up for the zero value. This is moreeasily seen if we examine a 4-bit register. Thecombinations are shown in table 5-2.Table 5-2.—Binary and Decimal Values of a 4-Bit RegisterThat is, there are 2^{3 }or 2^{N }combinations and onecombination is for the number zero. Negative numbersare represented by their two’s complement and the mostsignificant bit (regardless of the word or operand size)is the sign bit.Fixed-point operations can includedouble-length arithmetic operations, where operandscontain 64 bits and bit 2^{63 }is the sign bit.Floating-Point OperationsFloating-point operations are used to simplify theaddition, subtraction, multiplication, and division offractional numbers. They are used when dealing withfractional numbers, such as 5.724 or a very largenumber and signed fractional numbers. Whenperforming arithmetic operations involving fractions orvery large numbers, it is necessary to know the locationof the binary (radix) point and to properly align thispoint before the arithmetic operation. Forfloating-point operations, the location of the binarypoint will depend on the format of the computer. Allnumbers are placed in this format before the arithmeticoperation. The fractional portion of the number iscalled the mantissa and the whole integer portion,indicating the scaled factor or exponent, is called thecharacteristic.5-20