Skip to content
Official PYQ · 2023

GATE CS 2023 Q35 — Number Representations (Fixed and Floating Point)

Explain with AI

Consider the IEEE-754\textsf{IEEE-754} single precision floating point numbers P=0xC1800000\text{P} = \textsf{0xC1800000} and Q=0x3F5C2EF4.\text{Q} = \textsf{0x3F5C2EF4}.

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

Choose one option
View worked solution

Answer: C

To find the product P×QP \times Q in IEEE-754 single-precision format, we decode both numbers:

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

  • Binary: 1100 0001 1000 0000 0000 0000 0000 0000
  • Sign bit (SS) = 11 (negative)
  • Biased Exponent (EE) = 100000112=13110  ⟹  10000011_2 = 131_{10} \implies Unbiased exponent eP=131−127=4e_P = 131 - 127 = 4
  • Fraction (FF) = 0  ⟹  0 \implies Mantissa MP=1.0M_P = 1.0
  • Value: P=−1.0×24P = -1.0 \times 2^4

2. Decode Q=0x3F5C2EF4Q = \text{0x3F5C2EF4}:

  • Binary: 0011 1111 0101 1100 0010 1110 1111 0100
  • Sign bit (SS) = 00 (positive)
  • Biased Exponent (EE) = 011111102=12610  ⟹  01111110_2 = 126_{10} \implies Unbiased exponent eQ=126−127=−1e_Q = 126 - 127 = -1
  • Fraction (FF) = 10111000010111011110100210111000010111011110100_2
  • Value: Q=+1.F×2−1Q = +1.F \times 2^{-1}

3. Compute the Product P×QP \times Q:

  • Sign of product = Negative (since negative ×\times positive is negative)
  • Product value: −(1.0×24)×(1.F×2−1)=−1.F×23-(1.0 \times 2^4) \times (1.F \times 2^{-1}) = -1.F \times 2^3
  • The unbiased exponent of the product is 33.
  • The biased exponent of the product is 3+127=130=1000001023 + 127 = 130 = 10000010_2.
  • The fraction remains unchanged: F=101110000101110111101002F = 10111000010111011110100_2.

4. Reassemble into IEEE-754 Single Precision format:

  • Sign (1 bit): 1
  • Exponent (8 bits): 1000 0010
  • Fraction (23 bits): 101 1100 0010 1110 1111 0100
  • Combined 32-bit binary: 1100 0001 0101 1100 0010 1110 1111 0100
  • Hexadecimal representation: 0xC15C2EF4

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions