Question
Consider the following representation of a number in IEEE 754 single-precision floating point format with a bias of 127.
S: 1 E: 10000001 F: 11110000000000000000000
Here S, E and F denote the sign, exponent and fraction components of the floating point representation.
The decimal value corresponding to the above representation (rounded to 2 decimal places) is __________
Official answer and solution
- Official answer
- -7.75
- From
- Official GATE 2021 answer key
Solution
Decode the IEEE 754 single-precision floating point fields using bias 127.
Given single-precision IEEE 754 fields:
- Sign bit: (indicates a negative number).
- Exponent: .
With a bias of 127, the true exponent is .
- Fraction: .
The fractional value is:The normalized significand is .
Computing the value:
-7.75
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology (CS, Set-1)
- Question
- 34 of 65, printed as CS Q.24
- 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.