GATE / CS ARCHIVE

GATE CSE 2026 SET 1 / QUESTION 36

Adding two IEEE 754 binary32 values

Computer Organization & Architecture · Data Representation & Arithmetic · Full GATE CSE 2026 Set 1 paper

GATE 2026 Set 1, Q36 2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 36, GATE 2026: X and Y are IEEE 754 single-precision values with hexadecimal bit patterns 35C00000 and 34A00000. Find the bit pattern for Z=X+Y among A 35C80000, B 35CC0000, C 35E80000, D 35EC0000.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (9 steps)

Givens and goal

X and Y are IEEE 754 single-precision values with hexadecimal bit patterns 35C00000 and 34A00000. Find the bit pattern for Z=X+Y among A 35C80000, B 35CC0000, C 35E80000, D 35EC0000.

Approach

Decode sign, biased exponent and fraction; align exponents, add significands, and re-encode the exact sum.

Step-by-step solution

1. Both operands are positive normal IEEE 754 binary32 numbers. The exponent field of 35C00000 is 107, so its unbiased exponent is −20. Its fraction field is 400000, giving significand 1.5. Thus X = 1.5 × 2−20.
2. For 34A00000 the exponent field is 105, giving unbiased exponent −22; fraction 200000 gives significand 1.25. Thus Y = 1.25 × 2−22 = 0.3125 × 2−20.
3. Their sum is 1.8125 × 2−20. Since 1 ≤ 1.8125 < 2, no exponent renormalization is required. The fraction is 0.8125 = 13/16, which has an exact terminating binary expansion.
4. The exponent bits remain 107, contributing 35800000. The stored fraction is (13/16) × 223 = 680000 in hexadecimal. Combining the fields yields 35E80000. No rounding error occurs here.

Computational check: Python struct unpacked both binary32 operands and repacked their sum, obtaining 0x35e80000. This complements the exact field-level derivation; it is not the sole justification.

Binary significand check: X=1.1₂×2−20 and Y=1.01₂×2−22=0.0101₂×2−20. Their sum is 1.1101₂×2−20. Dropping the implicit leading 1 leaves fraction bits 1101 followed by nineteen zeros, exactly the hexadecimal fraction 680000. Since all significant bits fit within binary32 precision, the rounding mode does not alter the answer here.

Original paper, page 25 · Answer key