Example 3
Example 5
The float using 8 bit exponent and 15 bit signficand for 277.431 was shown
to be :
0 10000111 000101010110111
Converting back :
Bias
Use formula 2^(n-1) - 1 where n is the size of the exponent.
2^(8-1)-1 = 127 bias
Exponent 10000111
1 0 0 0 0 1 1 1
1 2 4 8 16 32 66 134 x2
------------------------------
1 2 4 8 16 33 67 135 +
135 - 127 (bias) = 8
Signifcand 000101010110111
Remember to put the hidden 1. back :
(b at the end of the string of 0s and 1s means binary)
1.000101010110111b * 2^8
100010101.0110111b
0 (start)
1 (0x2) + 1 1 (this will always be 1)
0 (1x2) + 0 2
0 (2x2) + 0 4
0 (4x2) + 0 8
1 (16x2) + 1 17
0 (17x2) + 0 34
1 (34x2) + 1 69
0 (60x2) + 0 138
1 (138x2) + 1 277
1 0 0 0 1 0 1 0 1
256 128 64 32 16 8 4 2 1
256 + 0 + 0 + 0 +16 + 0 + 4 + 0 + 1
.01101110
.
0 .5
1 .25 .25
1 .125 .125
0 .0625
1 .03125 .03125
1 .015625 .015625
1 .0078125 .0078125
0 .00390625
.4296875
Stored 277.4296875
Original 277.431