Question:

Consider the real valued variables \(X\), \(Y\) and \(Z\) represented using the IEEE 754 single-precision floating-point format. The binary representations of \(X\) and \(Y\) in hexadecimal notation are as follows:
\(X: 35C00000 \qquad Y: 34A00000\)
Let \(Z = X + Y\).
Which one of the following is the binary representation of \(Z\), in hexadecimal notation?

Show Hint

Decode X and Y into sign, exponent, and mantissa form, shift the smaller-exponent number (Y) so both share X's exponent of \(2^{-20}\), add the mantissas as \(1.5 + 0.3125 = 1.8125\), and re-encode; no renormalization is needed since 1.8125 is already less than 2.
Updated On: Jul 22, 2026
  • 35C80000
  • 35CC0000
  • 35E80000
  • 35EC0000
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Step 1: Recall the IEEE 754 single-precision layout.

A single-precision number occupies 32 bits: 1 sign bit, 8 exponent bits (biased by 127), and 23 mantissa (fraction) bits, with an implicit leading 1 before the fraction for normalized numbers. The value is \((-1)^{sign} \times 1.\text{fraction} \times 2^{(\text{exponent field} - 127)}\).

Step 2: Decode X = 35C00000 (hex).

Converting each hex digit to 4 bits gives the bit string 0011 0101 1100 0000 0000 0000 0000 0000. The sign bit is 0 (positive). The next 8 bits, the exponent field, are 01101011, which equals \(64+32+8+2+1 = 107\) in decimal, so the true exponent is \(107 - 127 = -20\). The remaining 23 bits are the fraction, starting with 1 followed by all zeros, giving a fraction value of \(2^{-1} = 0.5\). So \(X = 1.5 \times 2^{-20}\).

Step 3: Decode Y = 34A00000 (hex).

The bit string is 0011 0100 1010 0000 0000 0000 0000 0000. The sign bit is 0. The exponent field is 01101001, which equals \(64+32+8+1 = 105\), so the true exponent is \(105 - 127 = -22\). The fraction bits begin 01 followed by zeros, giving a fraction value of \(2^{-2} = 0.25\). So \(Y = 1.25 \times 2^{-22}\).

Step 4: Align the exponents before adding.

To add X and Y, rewrite Y using X's exponent of \(-20\): \(Y = 1.25 \times 2^{-22} = 1.25 \times 2^{-2} \times 2^{-20} = 0.3125 \times 2^{-20}\).

Step 5: Add the aligned mantissas.

\(Z = X + Y = (1.5 + 0.3125) \times 2^{-20} = 1.8125 \times 2^{-20}\). Since \(1.8125\) already lies in the normalized range \([1,2)\), no further renormalization or exponent adjustment is needed; the exponent stays at \(-20\), the same as X's.

Step 6: Convert the mantissa 1.8125 back to binary.

The fractional part is \(0.8125 = 13/16\), which in binary is \(0.1101\) exactly (since \(0.8125 \times 2 = 1.625 \to 1\), \(0.625 \times 2 = 1.25 \to 1\), \(0.25 \times 2 = 0.5 \to 0\), \(0.5 \times 2 = 1.0 \to 1\), remainder 0). So the 23-bit fraction field is 11010000000000000000000.

Step 7: Re-encode Z.

Sign = 0, exponent field = 107 = 01101011 (unchanged from X), fraction = 11010000000000000000000. Grouping the full 32-bit string 0 01101011 11010000000000000000000 into hex nibbles gives 0011 0101 1110 1000 0000 0000 0000 0000, which is 35E80000 in hexadecimal.

Step 8: Match to the options and rule out the others.

This matches option (C), 35E80000. Option (A), 35C80000, corresponds to a mantissa of only 1.5625, far too small an increase over X's mantissa of 1.5, consistent with forgetting to shift Y's mantissa by the full 2-bit exponent gap before adding. Option (B), 35CC0000, corresponds to mantissa 1.59375, again too small, consistent with a partial or incorrect alignment of Y before the addition. Option (D), 35EC0000, corresponds to mantissa 1.84375, slightly too large, consistent with an extra rounding-up error of one bit beyond the correct fraction 0.8125. Only option (C) matches the exact, correctly aligned sum.
\[ \boxed{Z = 35E80000_{16}\ \text{(option C)}} \]
Was this answer helpful?
0
0