
normally represented as a signed binary fraction, e represents the exponent, and b
represents the base (radix) of the exponent.
Example Figure 4.11 is a representation of a floating-point number having
m ¼ 23 bits, e ¼ 8 bits, and S (sign bit) ¼ 1 bit. If the value stored in S is 0, the
number is positive and if the value stored in S is 1, the number is negative.
The exponent in the above example, can only represent positive numbers 0
through 255. To represent both positive and negative exponents, a fixed value,
called a bias, is subtracted from the exponent field to obtain the true exponent.
Assume that in the above example a bias ¼ 128 is used, then true exponents in
the range 2128 (stored as 0 in the exponent field) to þ127 (stored as 255 in the
exponent field) can be represe nted. Based on this representation, the exponent þ4
can be represented by storing 132 in the exponent field, while the exponent 212
can be represented by storing 116 in the exponent field.
Assuming that b ¼ 2, then an FP number such as 1.75 can be represented in any
of the forms shown in Figure 4.12.
To simplify performing operations on FP numbers and to increase their precision,
they are always represented in what is called normalized forms. An FP number is
said to be normalized if the leftmost bit of the mantissa is 1. Therefore, among
the three above possibl e representations for 1.75, the first representation is normal-
ized and should be used.
Since the most significant bit (MSB) in a normalized FP number is always 1, then
this bit is often not stored and is assumed to be a hidden bit to the left of the radix
point, that is, the stored mantissa is 1.m. Therefore, a nonzero normalized number
represents the value ( 1)
s
*
(1:m)
*
2
e128
.
Floating-Point Arithmetic Addition/Subtraction The difficulty in adding
two FP numbers stems from the fact that they may have different exponents.
Therefore, before adding two FP numbers, their exponents must be equalized, that
is, the mantissa of the number that has smaller magnitude of exponent must be
aligned.
Figure 4.11 Representation of a floating-point number
+0.111*2
1
+0.0111*2
2
+0.00000000000000000000111*2
21
0
10000001
11100000000000000000000
0 10000010 01110000000000000000000
0 10010101 00000000000000000000111
Figure 4.12 Different representation of an FP number
4.3. FLOATING-POINT ARITHMETIC 75