Machine-translated by Google. Questions are authored in English.
Top

Discussion

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?

  • A.0x404C2EF4
  • B.0x405C2EF4
  • C.0xC15C2EF4
  • D.0xC14C2EF4

Answer: C

The product is 0xC15C2EF4.

Decode P: 0xC1800000 is sign 1, exponent 1000 0011 = 131, fraction 0, so \(P = -1.0 \times 2^{131-127} = -16 = -2^{4}\).

Multiplying by \(-2^{4}\) flips the sign and adds 4 to the exponent, leaving the significand unchanged. Q = 0x3F5C2EF4 is sign 0, exponent 0111 1110 = 126, and some fraction f. Then:

\[ \begin{aligned} \text{sign} &= 1,\quad \text{exponent} = 126 + 4 = 130 \\ 130 &= 1000\,0010_{2} \\ \text{bits} &= 1\ 10000010\ f \end{aligned} \]

The leading nine bits 1 1000 0010 followed by the unchanged fraction read as 0xC15C2EF4 (about \(-13.76\), which is \(-16 \times 0.86\)). 0x405C2EF4 and 0x404C2EF4 have a positive sign, and 0xC14C2EF4 alters the fraction bits, which multiplication by a power of two never does.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.