Floating Point Multiplication
Multiply the following two numbers in scientific notation by hand:
1.110 1010 9.200 10-5
1. Add the exponents to find
New Exponent = 10 + (-5) = 5
If we add biased exponents, bias will be added twice. Therefore we need to
subtract it once to compensate:
(10 + 127) + (-5 + 127) = 259
259 - 127 = 132 which is (5 + 127) = biased new exponent
2. Multiply the mantissas
1.110 9.200 = 10.212000
Can only keep three digits to the right of the decimal point, so the
result is
10.212 105
3. Normalise the result
1.0212 106
4. Round it
1.021 106
Example multiplication in binary:
1.000 2-1 -1.110 2-2
1. Add the biased exponents
(-1 + 127) + (-2 + 127) - 127 = 124 ===> (-3 + 127)
2. Multiply the mantissas
1.000
1.110
-----------
0000
1000
1000
+ 1000
-----------
1110000 ===> 1.110000
The product is 1.110000 2-3
Need to keep it to 4 bits 1.110 2-3
3. Normalise (already normalised)
At this step check for overflow/underflow by making sure that
-126 <= Exponent <= 127
1 <= Biased Exponent <= 254
4. Round the result (no change)
5. Adjust the sign.
Since the original signs are different, the result will be negative
-1.110 2-3