Question
Given the following binary number in 32-bit (single precision) IEEE-754 format:
00111110011011010000000000000000
The decimal value closest to this floating-point number is
Official answer and solution
- Official answer
- C
- From
- Official GATE 2017 answer key
Solution
Decode the 32-bit IEEE-754 single-precision floating-point bit pattern into sign, exponent, and mantissa components.
Partition the 32-bit pattern 0011 1110 0110 1101 0000 0000 0000 0000:
- Sign bit ():
0(positive) - Biased exponent (, 8 bits):
01111100in binary:Unbiased exponent . - Mantissa (, 23 bits):
11011010000000000000000
Compute the normalized significand :
Now multiply by :
Among the given choices, is the closest decimal value.
C
Forgetting the implicit leading 1 in the normalized significand for non-zero biased exponents.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2017 Computer Science and Information Technology (CS) Session 2
- Question
- 12 of 65, printed as CS Q.12
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.