GATE Computer ScienceVery hardGATE CS (PYQ pattern)
In IEEE 754 single precision with round-to-nearest-even, let x = 2²³ = 8,388,608. What are the results of (x + 0.5) + 0.5 and x + (0.5 + 0.5), in that order?
- A. 8388608 and 8388609
- B. 8388608 and 8388608
- C. 8388609 and 8388609
- D. 8388609 and 8388608
Correct answer: A. 8388608 and 8388609
At 2²³ the spacing between floats is 1, so x + 0.5 is a tie and rounds to the even neighbour x; the second +0.5 does the same, giving 8388608. But 0.5 + 0.5 = 1 is exact, and x + 1 = 8388609.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A classic 5-stage pipeline (IF, ID, EX, MEM, WB) runs: I1: ADD R1, R1, R2; I2: ADD R3, R1, R4; I3: ADD R5, R3, R1; I4: LW R6, 0(R5); I5…
- A direct-mapped cache of 128 bytes with 32-byte blocks (4 lines) is used while a program reads the 4-byte words at byte addresses 0, 4, 8…
- A non-pipelined processor takes 180 + 120 + 200 + 260 + 100 ps per instruction. Its 5-stage pipelined version adds a 20 ps latch after…
- Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty (it must first be…
- In IEEE 754 single precision with round-to-nearest-even, which of these is correct for computing 1.0 + 2⁻²⁴ and (1 + 2⁻²³) + 2⁻²⁴?
- In IEEE 754 single precision with round-to-nearest-even, let x = 3 × 2⁻¹⁴⁹ (three times the smallest positive denormal). What are x / 2…