GATE Computer ScienceHardGATE CS
A 4-bit non-restoring divider divides the unsigned dividend Q = 1101 (13) by the divisor M = 0011 (3). The accumulator A is 5 bits wide (two's complement) and starts at 0. In each of the 4 iterations: shift the pair (A, Q) left by one bit; then if A was negative before the shift add M to A, otherwise subtract M from A; finally set the new least significant bit of Q to 1 if A is now non-negative and to 0 if A is negative. After the third iteration (before any final correction), what is the signed value of A?
- A. −2
- B. −3
- C. 1
- D. 0
Correct answer: B. −3
Iteration 1: A = 1 − 3 = −2, Q0 = 0. Iteration 2: shift gives A = −3, add M gives 0, Q0 = 1. Iteration 3: shift gives A = 0, subtract M gives −3, Q0 = 0. Iteration 4 would leave A = −2, and the final correction A + M = 1 is the remainder with quotient 0100 = 4.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- 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 +…
- 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…