In: Computer Science
For IEEE 754 single-precision floating point, what is the hexadecimal representation of 27.101562?
A. 35CCD001
B. 2F5C10D0
C. 41D8D000
D. 7DCA1111
E. None of the above
What is the hexadecimal representation of 27.101562 in IEEE 754 single-precision floating point standard:
Answer: (C) 41D8D000
Description:
• IEEE 754 single-precision floating point representation:
(1) Sign field:
The sign of mantissa will be 0 if the given number is positive and 1 if the given number is negative.
(2) Exponent field:
For getting the stored exponent field, a bias (i.e. 127 for single point precision) will be added to actual exponent.
(3) Mantissa field:
The mantissa is significant digits that is an actual numeric part in scientific notation or in a floating-point number. Normalized mantissa contains only single 1 on the left side of the decimal point. (e.g. 1.00001000000010100000000)
• Representing 27.101562 to IEEE 754 single-precision floating point:
• Given number is positive. So, sign = 0
27 = 11011
0.101562 = 0.0001101 (rounded)
27.101562 = 11011.0001101
11011.0001101 = 1.10110001101 x 24
• Biased exponent = 127 + 4 = 131 = 10000011
• Mantissa: 10110001101000000000000 (fill remaining bits with 0 to complete 23 bits)
(1.10110001101 x 24 : take the part after decimal point and add the rest 0's to make it of 23 bits)
• Binary: 01000001110110001101000000000000
• Hexadecimal: 41D8D000