GATE | GATE CS 2012 | Question 7
The decimal value 0.5 in IEEE single precision floating point representation has
(A) fraction bits of 000…000 and exponent value of 0
(B) fraction bits of 000…000 and exponent value of −1
(C) fraction bits of 100…000 and exponent value of 0
(D) no exact representation
Answer: (B)
Explanation: The IEEE 754 standard specifies following distribution of bits:
Sign bit: 1 bit
Exponent width: 8 bits
Significand or Fraction: 24 (23 explicitly stored)
0.5 in base 10 means 1 X 2-1 in base 2.
So exponent bits have value -1 and all fraction bits are 0.
Please Login to comment...