The value of a float type variable is represented using the single-precision…

2014

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

  1. A.

    C1640000H

  2. B.

    416C0000H

  3. C.

    41640000H

  4. D.

    C16C0000H

Attempted by 127 students.

Show answer & explanation

Correct answer: A

Answer: C1640000H

  1. Convert the magnitude 14.25 to binary: 14 = 1110₂ and 0.25 = 0.01₂, so 14.25 = 1110.01₂.

  2. Normalize to form 1.x × 2^E: 1110.01₂ = 1.11001₂ × 2³.

  3. Compute the biased exponent: E = 3, biased exponent = 3 + 127 = 130 = 10000010₂.

  4. Form the mantissa (fraction) from the bits after the leading 1: .11001 → pad to 23 bits → 11001000000000000000000₂.

  5. Sign bit: 1 (since the number is negative).

  6. Combine bits: sign | exponent | mantissa = 1 10000010 11001000000000000000000₂ = 11000001011001000000000000000000₂.

  7. Convert to hexadecimal by grouping into 4 bits: 1100 0001 0110 0100 0000 0000 0000 0000 = C1640000H.

Common pitfalls:

  • A hex value with sign bit 0 but correct exponent and mantissa encodes a positive magnitude (e.g., +14.25), so watch the sign bit.

  • Small changes in the mantissa change the fractional part (e.g., .11001₂ vs .11011₂), producing different magnitudes such as 14.25 vs 14.75.

Explore the full course: Gate Guidance By Sanchit Sir