A one byte floating point numbering system uses 5 places for the mantissa and 3 for the exponent. Convert the number -4 into a normalised floating point number by filling in the following table:
+4 in binary is:
100
Packing the front of the binary answer in step 1 with zeros to get the mantissa to the correct size( 5 digits) gives:
00100
The 2s compliment for of the answer to step 2 is:
11011
Moving the decimal point in the answe to step 3 to the correct place for the normalised form gives:
11.010
Removing excess 1s from the front of the number and adding extra zeros at the back of the number to get the normalised form gives us:
1.0100
To get the decimal place of the normalised form answer in step 5 back to its pre-normalised position, the decimal point needs to be moved:
3 places to the right.
The exponent is therefore:
011
Putting the mantissa and the exponent together gives the final answer as:
10100011
Thursday, October 4, 2007
Subscribe to:
Post Comments (Atom)

1 comment:
All Wrong (0)
Post a Comment