GATE Computer ScienceHardGATE CS
In IEEE 754 single precision (round-to-nearest-even), let a = 2²⁴ = 16777216, b = 1 and c = 1. The two sums S₁ = (a + b) + c and S₂ = a + (b + c) are computed in single precision. What is S₂ − S₁?
- A. 4
- B. 2
- C. 0
- D. 1
Correct answer: B. 2
a + b = 2²⁴ + 1 lies exactly half-way between 2²⁴ and 2²⁴ + 2, and ties-to-even rounds back to 2²⁴, so S₁ = 2²⁴ after both additions. Evaluating b + c = 2 first gives S₂ = 2²⁴ + 2 exactly representable. Floating-point addition is not associative.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- Three processors P0, P1, P2 use a snooping MESI write-invalidate protocol on one block that is initially invalid everywhere. A read miss…
- A program has a serial fraction of 5% when run on 1 processor. Under Amdahl's law (fixed problem size) the speedup on 64 processors is SA…
- A process of size s = 4 MB runs under paging with a one-level page table in which each page-table entry occupies e = 8 bytes. The wasted…
- A RAID 5 array has 6 disks, each able to perform 120 random I/Os per second. A small random read costs 1 disk I/O and a small random write…
- A vector processor has one memory pipeline, one multiplier and one adder, 64-element vector registers and full chaining. Start-up…
- A virtualised x86-64-style system translates a guest virtual address using a 4-level guest page table and a 4-level nested (host) page…