Lectures
Biasing
Normalize the number .431. using a IEEE style float format but using 24 bits.
1 bit sign, 7 bit exponent, 16 bit significand
(real 1,8,23 format makes example difficult)
First convert to binary. We need to go at least 16 places past the most
significant 1
. .431
0 .862 (.431 x 2)
1 .724 (.862 x 2) # start counting from here - this will be the hidden bit.
1 .448 (.724 x 2)
0 .896 (.448 x 2)
1 .792 (.896 x 2)
1 .584
1 .168
0 .336
0 .672
1 .344
0 .688
1 .376
0 .752
1 .516
1 .032
0 .064
0 .128
0 .256 # we have 16 digits past the most significant 1.
...
.0110 1110 0101 0110 00
Represent in the equivalent of scientific notation,.
1.10 1110 0101 0110 00 * 2^-2
* We left the exponent in decimal format because we haven't added the bias yet.
Since, only 1 can be to the left of the decimal point, we don't need to store
it (hidden bit).
(1).1011100101011000
.1011100101011000
This is called the significand and allows for 1 extra digit of precision.
If our conversion had does not produce enough digits,
right pad with zeros to fill significand.
0.5
1.0 (.5 x 2)
.0 (.0 x 2)
etc.
(1).0000000000000000
With 16 bit precision, a very close approximation can be found.
Biasing