1/3 sign 1, exponent 3, significand 6
A. No integer portion of number.
B. Convert decimal fraction portion.
Remember, we can only store 6 significant digits and the most significant
digit is hidden, so count at most 7 past 1st significant (1 for rounding
purposes).
-
. .333333333
0 .666666666
1 .333333332 Most significant digit
0 .666666664 1 (start counting digits)
1 .333333328 2
0 .666666656 3
1 .333333312 4
0 666666624 5
1 .333333348 6
0 .666666696 7 0.0101010 b
C. Adjust the binary value to scientific style notation.
1.0101010 x 2^-2
D. Calculate the bias for the exponent
2^(3-1)-1 = 2^2-1 = 4-1 = 3
E. Add bias to exponent and covert to binary
3 + -2 = 1
001 biased exponent in binary
F.
Sign positive, sign bit 0
Biased exponent 001
Find significand
Most significant bit 1. not stored
And float can hold only 10 significant digits, so we store only the most
significant portion.
1.0101010
^ ^^^^^^
h 6 digits
i
d
d
e
n
0 0001 010101