Floating Point Data Representation
D-3
Floating Point Data
In Table D.1, the value 0.75 is calculated as shown below.
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), as presented in Table D.2.
In Table D.2, the value 1 is calculated as shown below.
1.
The sign of the value is positive because the sign bit field is equal to 0.
2.
The exponent field is equal to 3FF (hexadecimal). The exponent is
calculated by subtracting the bias value (3FF) from the exponent field value.
The result is 0 (decimal).
3FF - 3FF = 0
The exponent multiplier is equal to 2^0, which is equal to 1 (decimal).
Table D.2: Double-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
Summary of Contents for GG Surveyor
Page 14: ...xiv GG Surveyor GPS GLONASS Reference Manual...
Page 38: ...20 GG Surveyor GPS GLONASS Reference Manual...
Page 62: ...44 GG Surveyor GPS GLONASS Reference Manual...
Page 86: ...68 GG Surveyor GPS GLONASS Reference Manual...
Page 232: ...B 6 GG Surveyor GPS GLONASS Reference Manual...
Page 236: ...C 4 GG Surveyor GPS GLONASS Reference Manual...
Page 246: ...E 6 GG Surveyor GPS GLONASS Reference Manual...