Question

Consider the IEEE-754 single precision floating point numbers

P=0xC1800000andQ=0x3F5C2EF4.P = \text{0xC1800000} \quad \text{and} \quad Q = \text{0x3F5C2EF4}.

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

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2023 answer key

Solution

Decode IEEE-754 single precision operands and multiply exponents and mantissas.

  1. Decode P=0xC1800000P = \text{0xC1800000}:

    • Binary: 1  10000011  0000000000000000000000021\; 10000011\; 00000000000000000000000_2
    • Sign bit S=1S = 1 (negative)
    • Exponent: 100000112=131  ⟹  EP=131−127=410000011_2 = 131 \implies E_P = 131 - 127 = 4
    • Mantissa: 1.021.0_2
    • Value: P=−1.0×24=−16P = -1.0 \times 2^4 = -16
  2. Multiply P×QP \times Q:

    • P×Q=−16×Q=−24×QP \times Q = -16 \times Q = -2^4 \times Q
    • Since Q=0x3F5C2EF4Q = \text{0x3F5C2EF4} is positive (sign bit 0), the product has sign bit S=1S = 1.
    • Multiplying by 242^4 simply increases the biased exponent of QQ by 44, keeping the significand identical!
    • Biased exponent of QQ: 0x3F5⋯  ⟹  011111102=1260x3F5\dots \implies 01111110_2 = 126.
    • New biased exponent: 126+4=130=100000102126 + 4 = 130 = 10000010_2.
    • Significand remains 5C2EF4165C2EF4_{16}.
  3. Encode the result:

    • Sign: 11
    • Exponent: 1000001010000010
    • Fraction: 1011100001011101111010010111000010111011110100
    • In hex: 0xC15C2EF4\text{0xC15C2EF4}.
Final answer

Option (C)

Common trap

Trying to convert both floating point numbers to decimal rather than working directly with the power-of-2 exponent shift.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2023 Computer Science and Information Technology (CS)
Question
45 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.