86 Computer Architecture and Organization
Therefore, the need of pre- and post-processing of all numerical values would be essential to main-
tain the harmony between the number representation familiar to the human world and binary format
suitable for the machine (processor) universe. Otherwise, the techniques described so far, for arithmetic
operations, would be perfectly applicable by the processor. For example, for a multiplication operation,
when both multiplier and multiplicand are expressed in IEEE 754 format, the result may be obtained
by algebraically adding the exponents of both and multiplying the mantissa part. The nal sign of the
product would depend on the initial sign-bits of two parameters. In this section, we would discuss about
some special features of arithmetic operations related with oating-point representation.
4.8.1 Floating-point Unit Operations
Believe it or not, it is true that oating-point addition and subtraction are more complex than oating-
point multiplication and division. Let us explain this with a simple example. Let us assume that two
operands are 12.896 and 9.3741. Note that we have to change these two numbers in their scienti c nota-
tions and would be converted to 0.12896 × 10
2
and 0.93741 × 10
1
, respectively. If we like to multiply
these two operands then it would be like
(0.12896 × 0.93741) × 10
2+1
= 0.1208883936 × 10
3
= 120.8883936
Now, let us add these two operands. We may express this addition as
0.12896 × 10
2
+ 0.93741 × 10
1
Now, observe that as the exponents are of different values, therefore, we have to transform them to
equal values. We may either transform both of them as 10
2
or both of them as 10
1
. However, in either
case the remaining decimal part has to be adjusted accordingly. Let us assume that we have decided to
make both exponents as 10
2
. Therefore, our addition operation now may be rewritten as
0.12896 × 10
2
+ 0.093741 × 10
2
The reader may note that the second operand is now expressed with six places after decimal. We may
now perform the addition operation as follows
(0.12896 + 0.093741) × 10
2
= 0.222701 × 10
2
= 22.2701
4.8.2 Exponent Overflow or Underflow
In case of oating-point multiplications or divisions, there are chances that the exponent part may face
an over ow or under ow and thus may become out-of-the-range. For example if we are multiplying two
numbers represented by A × 10
X
and B × 10
Y
, then if the values of X and Y are very large it would cause a
over ow to calculate X + Y. Similarly, if these two numbers are (A × 10
−X
) and (B × 10
−Y
) and we are mul-
tiplying both, then (−X −Y) may generate an under ow (i.e., very small number). The same situation may
arise in the case of division also. We have already mentioned (Figure 4.27 ) that IEEE754 format allows 8-bit
In later chapters the reader would find that most processors are equipped with two ALUs, one
for integer operations and another for floating-point operations.
F
O
O
D
F
O
R
T
H
O
U
G
H
T
M04_GHOS1557_01_SE_C04.indd 86M04_GHOS1557_01_SE_C04.indd 86 4/29/11 5:04 PM4/29/11 5:04 PM