GATE Computer ScienceModerateGATE CS (PYQ pattern)

In IEEE 754 single precision with round-to-nearest-even, which of these is correct for computing 1.0 + 2⁻²⁴ and (1 + 2⁻²³) + 2⁻²⁴?

  1. A. 1.0 + 2⁻²⁴ = 1 + 2⁻²³ and (1 + 2⁻²³) + 2⁻²⁴ = 1 + 2⁻²²
  2. B. 1.0 + 2⁻²⁴ = 1.0 and (1 + 2⁻²³) + 2⁻²⁴ = 1 + 2⁻²²
  3. C. 1.0 + 2⁻²⁴ = 1.0 and (1 + 2⁻²³) + 2⁻²⁴ = 1 + 2⁻²³
  4. D. 1.0 + 2⁻²⁴ = 1 + 2⁻²³ and (1 + 2⁻²³) + 2⁻²⁴ = 1 + 2⁻²³

Correct answer: B. 1.0 + 2⁻²⁴ = 1.0 and (1 + 2⁻²³) + 2⁻²⁴ = 1 + 2⁻²²

Both sums are exact ties (half the spacing 2⁻²³). Ties go to the neighbour whose last significand bit is 0: for 1.0 that is 1.0 itself; for 1 + 2⁻²³ (last bit 1) it is 1 + 2⁻²².

More Computer Organization and Architecture questions

Exams that ask this topic