Title: P1254503569FEMqi
132 BIT FLOATING POINT CONVERSION DECIMAL TO BINARY
Lets take for example the value -32.5
We need to fit it into 32 bits made up of the
following sections.
1 bit 8 bits 23 bits Sign
Exponent Mantissa
2Convert the value -32.5 (In this case you do not
need to apply 1s compliment) 100000.1 Step
1 We need to change the value to scientific
notation Ie 1.0 2n
3100000.1 To get the point to move after the left
most 1 we need to move it to the left 5 times gt
1.000001 25 100000.1
4- Step 2
- Calculate the exponent
- Whatever the n value of 2 is add 127
- 127 5 132
- Convert to binary
- gt 10000110 The exponent value
5Step 3 Calculate the Mantissa value The
scientific notation was 1.000001 25 The value
to the right of the point is the mantissa gt
Mantissa 000001
61.000001 25 -32.5
1 bit 8 bits 23 bits
1
10000110
00000100000000000000000
The value was negative
The calculated exponent value
The calculated mantissa value. To make up the 23
bits needed fill in the rest of the value with
zeros
gt 110000110000001000000000000000000
7If we have the 32 bit value 01000001100101100000
000000000000 Break the value into 1 bit
(sign) 0 8 bit (exponent) 10000011 23 bit
(mantissa 0010110000000000000000
8- 1 bit (sign) 0
- positive
- 8 bit (exponent) 10000011
- 131 - 127 4
- 23 bit (mantissa 0010110000000000000000
- 1.001011
- 1.001011 24 Now move the point back to
- the right 4 points
- 10010.11
- 18.75
9EXERCISE
- 42.75
- -16.5
- 11000011010000100000000000000000
10- ANSWER
- 01000011001010110000000000000000
- 11000001100001000000000000000000
- -48.5