The value of a float type variable is represented : GATE 2014 - Paper 2

The value of a float type variable is represented using the single-precision 32-bit floating point format of IEEE-754 standard that uses 1 bit for sign, 8 bits for biased exponent and 23 bits for mantissa. A float type variable X is assigned the decimal value of −14.25. The representation of X in hexadecimal notation is

(A) C1640000H
(B) 416C0000H
(C) 41640000H
(D) C16C0000H

Answer

S → 1 bit
E → 8 bits
M → 23 bits
(14.25)10 = (1110.01)2 = 1110.01 × 20 = 1.11001 × 23
Therefore, we get the following values are being stored in S, E, and M
S : 1
E : (3 + 127)10 = (10000010)2
M : 11001000000000000000000
Value stored:
(11000001011001000000000000000000)2 = (C1640000)16

So, the correct answer is option (A).

0Comment