Floating Point Numbers (cont)
Example of normalising the fraction part in binary:
-
1010.1011 is normalized as 1.0101011×2011
-
1010.1011 = 10 + 11/16 = 10.6875
-
1.0101011×2011 = (1 + 43/128) * 23 = 1.3359375 * 8 = 10.6875
The normalised fraction part always has 1 before the decimal point.
Example of determining the exponent in binary:
- assume an 8-bit exponent, then bias B = 28-1-1 = 127
- valid bit patterns for exponent
00000001 .. 11111110 (1..254)
- exponent values -126 .. 127
|