GATE | GATE-CS-2017 (Set 2) | Question 29

Given the following binary number in 32 bit (single precision) IEEE-754 format:

00111110011011010000000000000000

The decimal value closest to this floating-point number is:
(A) 1.45 X 101
(B) 1.45 X 10-1
(C) 2.27 X 10-1
(D) 2.27 X 101


Answer: (C)

Explanation: In 32-bit IEEE-754 format

1st bit represent sign
2-9th bit represent exponent
and 10-32 represent Mantissa (Fraction part)

Sign = 0, so positive
2-9 bits — 01111100 when subtracted by 01111111 i.e., 126 decimal value gives -> 0000 0011
Which is -3.(negative as the value is less than 126)
As number is less than 126 it is subtracted otherwise 126 would have been subtracted from it in 32 bit representation.
(https://www3.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html)



Mantissa is normal ,hence, 1.M can be used .Which is 1.1101101.
Thus,
Data + 1.1101101 * 2^-3 (±M * B^(±e) )
Mantissa shift right 3 times ->
+0.0011101101
= 0.228
= 2.28 * 10^-1

Thus, option c is correct.

This explanation is contributed by Shashank Shanker.


Quiz of this Question



My Personal Notes arrow_drop_up