The 32-bit format looks like this:
SEEEEEEEEmmmmmmmmmmmmmmmmmmmmmmm
The msb is the sign of the number, the 8-bit field is the exponent of 2, and the 23-bit field is the mantissa. The sign
of the exponent is incorporated into the exponent field, but the IEEE standard does not use simple two??™s complement
for representing a negative exponent. For technical reasons, which we touch on below, it uses a different approach.
How would we represent 8.5? First we convert 8.5 to binary, and for the first time we will show a binary
fractional value:
1000.1
To the left of the binary point (analogous to the decimal point we??™re familiar with) we have 8. To the right
of the binary point, we have 1/2. Just as the first place to the right of the decimal point in base 10 is a tenth, the
first place to the right of the binary point in base 2 is a half.
In a manner akin to using ???scientific notation??? in base 10, we normalize binary 1000.1 by moving the
binary point left until we have only the 1 at the left, and then adding a factor of 2 with an exponent:
1.0001 * 23
From this form we can recognize the exponent in base 2, which in this case is 3, and the mantissa, which is 0001.
The IEEE 32-bit specification uses a ???bias??? of 127 on the exponent (this is a way of doing without
a separate sign bit for the exponent, and making comparisons of exponents easier than would be the case with
two??™s complements??”trust us, or read about it on-line), which means that the exponent field will have the binary
value of 127 + 3, or 130.
Pages:
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98