GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Booth's algorithm multiplies M = 0110 (+6) by Q = 1011 (−5) with a 4-bit accumulator A (initially 0000) and a bit Q₋₁ (initially 0). Each iteration looks at (Q₀, Q₋₁): 10 → A = A − M, 01 → A = A + M, 00/11 → nothing; then A:Q:Q₋₁ is shifted right arithmetically by one bit. What are A, Q and Q₋₁ after the second iteration?
- A. A = 1110, Q = 1010, Q₋₁ = 1
- B. A = 0010, Q = 1010, Q₋₁ = 1
- C. A = 0010, Q = 0101, Q₋₁ = 0
- D. A = 1101, Q = 0101, Q₋₁ = 1
Correct answer: A. A = 1110, Q = 1010, Q₋₁ = 1
It 1: (Q₀,Q₋₁) = 10 → A = 0000 − 0110 = 1010; arithmetic shift → A = 1101, Q = 0101, Q₋₁ = 1. It 2: (1,1) → no operation; shift → A = 1110, Q = 1010, Q₋₁ = 1. (After 4 iterations A:Q = 11100010 = −30.) Logical shifts (losing the sign) give A = 0010, Q = 1010, Q₋₁ = 1; A = 0010, Q = 0101, Q₋₁ = 0 is the state after iteration 3.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- Machine X runs a program of 5×10⁹ instructions at 2400 MIPS. Machine Y, with a different ISA and compiler, needs only 3×10⁹ instructions…
- Which of the following statements about virtual memory hardware are correct? I. A TLB caches recently used page-table entries. II. A page…
- Design X runs at 2.0 GHz and, with no branch prediction, charges 2 cycles for each taken branch. Design Y runs at 1.8 GHz and charges 0…
- An 8-bit value is stored with an even-parity Hamming code in 12 positions 1..12 (check bits at positions 1, 2, 4, 8). The word read back…
- A microprogrammed control unit has 2048 microinstructions of 100 bits each, but only 300 of them are distinct. Using a two-level…
- A DRAM has 8192 rows, each to be refreshed once every 64 ms, and refreshing one row blocks the chip for 50 ns. Under burst refresh all…