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?

  1. A. A = 1110, Q = 1010, Q₋₁ = 1
  2. B. A = 0010, Q = 1010, Q₋₁ = 1
  3. C. A = 0010, Q = 0101, Q₋₁ = 0
  4. 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.

More Computer Organization and Architecture questions

Exams that ask this topic