Floating Point Data 207
Floating Point Data
2. The exponent field is equal to 7F (hexadecimal). The exponent is calculated
by subtracting the bias value (7F) from the exponent field value. The result is
0.
7F - 7F = 0
The exponent multiplier is equal to 2
0
, which is equal to 1 (decimal).
3. The fraction field is equal to .0. After adding the implicit normalized bit, the
fraction is equal to 1.0 (binary). The fraction value is equal to 2
0
(decimal),
which is equal to 1 (decimal).
4. The value of the number is positive 1*1= 1.0 (decimal).
In 1, the value 0.75 is calculated by the following method:
1. The sign of the value is positive because the sign bit field is equal to 0.
2. The exponent field is equal to 7E (hexadecimal). The exponent is calculated
by subtracting the bias value (7F) from the exponent field value. The result is
-1 (decimal).
7E - 7F = -1
The exponent multiplier is equal to 2
-1
, which is equal to 0.5 (decimal).
3. The fraction field is equal to .1 (binary). After adding the implicit normalized
bit, the fraction is equal to 1.1 (binary). The fraction value is equal to 2
0
+ 2
-1
(decimal), which is equal to 1 + 0.5 (decimal), which is equal to 1.5 (decimal).
4. The value of the number is positive 0.5*1.5 = 0.75 (decimal).
Double-Precision Float
The double-precision format uses eight consecutive bytes, with the 64 bits
containing a sign bit field, an 11-bit biased exponent field, and a 52-bit fraction
field. The exponent has a bias of 3FF (hexadecimal). The fraction field is precise
to 15 decimal digits. The double-precision format can represent values in the
range 9.46*10
-308
to 1.79*10
308
(decimal), 2.
Table B.2Double-Precision Format
63-60 59-56 55-62 51-48 47-44 43-40 ... 15-12 11-8 7-4 3-0
S EXPONENT FRACTION VALUE
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0.0
0011 1111 1111 0000 0000 0000 ... 0000 0000 0000 0000 1.0
1111 1111 1111 1111 1111 1111 ... 1111 1111 1111 1111 NAN
(not a number)
0011 1111 1110 1000 0000 0000 ... 0000 0000 0000 0000 0.75
G12RevD.book Page 207 Tuesday, April 2, 2002 4:33 PM