CS 2734
Computer Organization II
Floating Point Conversion Answers
- From Tanenbaum text:
- 0.5 = 0.1 = 1.0 x 2^{-1} in normalized form
sign is 0
exponent in excess 127 is 126 or 01111110
mantissa is 0
IEEE single precision is x3F000000
- 1.0 = 1.0 x 2^{0} in normalized form
sign is 0
exponent in excess 127 is 127 or 01111111
mantissa is 0
IEEE single precision is x3F800000
- 1.5 = 1.1 x 2^{0} in normalized form
sign is 0
exponent in excess 127 is 127 or 01111111
mantissa is 10000000000000000000000
IEEE single precision is x3FC00000
- Tanenbaum page 572 number 1
- 9 = 1001 = 1.001 x 2^{3} in normalized form
sign is 0
exponent in excess 127 is 130 or 10000010
mantissa is 00100000000000000000000
IEEE single precision is x41100000
- 5/32 = 5 x 2^{-5} = 1.01 x 2^{-3} in normalized form
sign is 0
exponent in excess 127 is 124 or 01111100
mantissa is 01000000000000000000000
IEEE single precision is x3E200000
- -5/32 same as previous except sign bit is 1.
IEEE single precision is xBE200000
- 6.125 = 6 x 2^0 + 1 x 2^{-3} = 1.10001 x 2^{2}
sign is 0
exponent in excess 127 is 129 or 10000001
mantissa is 100010000000000000000000
IEEE single precision is x40C40000
- Tanenbaum page 573 number 2
- x42E48000 = 0100 0010 1110 0100 1000 0000 0000 0000
sign bit is 0
exponent is 10000101 = 133, converting = 6
mantissa is 1.11001001
unnormalizing we have 1.11001001 x 2^6 or 1110010.01 = 114.25
- This is an extra problem I did by mistake
x42348000 = 0100 0010 0011 0100 1000 0000 0000 0000
sign bit is 0
exponent is 10000100 = 132, converting = 5
mantissa is 1.01101001
unnormalizing we have 1.01101001 x 2^5 or 101101.001 = 45.125
- x3F880000 = 0011 1111 1000 1000 0000 0000 0000 0000
sign bit is 0
exponent is 011111111 = 127, converting = 0
mantissa is 1.0001
unnormalizing we have 1.0001 = 1 + 2^{-4} = 1.0625
- x00800000 = 0000 0000 1000 0000 0000 0000 0000 0000
sign bit is 0
exponent is 00000001 = 1, converting is -126
manissa is 1.0
unnormalizing we have 1.0 x 2^{-126} = 1.17549 x 10^{-38}.
- xC7F00000 = 1100 0111 1111 0000 0000 0000 0000 0000
sign bit is 1 so overall number is negative
exponent is 10001111 = 128 + 15 = 143, converting is 16
mantissa is 1.111
unnormalizing we have
1.111 x 2^{16} = 1111 x 2^{13} = 15 x 8192 = 122,880