In: Electrical Engineering
Show the IEEE 32-bit representation for 2.09375 and 17.1875
So, now we have binary of 2.09375 = 10.00011
we can write it as
1.000011 x 21
Since the sign is positive so sign bit will be 0.
E = 21
We add 127 to bias exponent
E will be 127 + 2 = 129 = 1000 0001
Mantissa will be decimal part.
sign Exponent Mantissa
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
For 17.1875
17.1875 in binary is
10001.0011
It can be written as
1.00010011 x 24
So, E = 16 + 127 = 143 ( after adding 127 as bias)
143 in binary = 10001111
Sign is 0
Mantissa is decimal part = 00010011
IEEE Format
0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |