GATE Computer ScienceVery hardGATE CSE

In IEEE 754 single precision with round-to-nearest-even, let x = 2^24 = 16777216. What are the values of (x + 1) + 1 and x + (1 + 1)?

  1. A. 16777218 and 16777216
  2. B. 16777216 and 16777216
  3. C. 16777218 and 16777218
  4. D. 16777216 and 16777218

Correct answer: D. 16777216 and 16777218

Above 2^24, the spacing is 2, so x+1 is a tie that rounds to even (back to x); doing it twice leaves 16777216, whereas 1+1 = 2 is exact and x+2 = 16777218.

More Computer Organization and Architecture questions

Exams that ask this topic