Consider the IEEE-754 single precision floating point numbers P=0xC1800000 and…

2023

Consider the IEEE-754 single precision floating point numbers

P=0xC1800000 and Q=0x3F5C2EF4.

Which one of the following corresponds to the product of these numbers (i.e., P × Q), represented in the IEEE-754 single precision format?

  1. A.

    0x404C2EF4

  2. B.

    0x405C2EF4

  3. C.

    0xC15C2EF4

  4. D.

    0xC14C2EF4

Attempted by 107 students.

Show answer & explanation

Correct answer: C

Concept: In IEEE-754, a value is sign × 1.fraction × 2(E−bias). Multiplying a float by an exact power of two does not touch the fraction bits at all: it only flips the sign for a negative factor and shifts the unbiased exponent by the power. So scaling Q by −16 = −24 means flip the sign, add 4 to Q's exponent, and copy Q's fraction unchanged.

  1. Decode P = 0xC1800000: sign = 1 (negative); exponent field 0x83 = 131, so E = 131 − 127 = 4; fraction = 0. Hence P = −1.0 × 24 = −16, an exact power of two.

  2. Decode Q = 0x3F5C2EF4: sign = 0 (positive); exponent field 0x7E = 126, so E = 126 − 127 = −1; fraction field = 0x5C2EF4. Hence Q = +1.fraction × 2−1 ≈ 0.86.

  3. Apply the rule: P × Q = −24 × Q. New sign = 1 (negative). New exponent E′ = −1 + 4 = 3. Fraction stays 0x5C2EF4. No rounding is needed because a power-of-two scale never disturbs the mantissa.

  4. Reassemble the 32-bit word: sign bit = 1; biased exponent field = E′ + 127 = 3 + 127 = 130 = 0x82; fraction = 0x5C2EF4. Packing sign·exponent·fraction gives 0xC15C2EF4.

Cross-check: Decimally, −16 × 0.86009… = −13.7615…, and decoding 0xC15C2EF4 back yields exactly −13.7615…, confirming the result.

Explore the full course: Gate Guidance By Sanchit Sir