2022 23 4b

Computer Organization and Architecture2022-2310 marksNumericalMultiplication

Show the systematic multiplication process of (-15) x (-16) using Booth's Algorithm.

Show the systematic multiplication process of (-15) x (-16) using Booth's Algorithm.

Both numbers need 5 bits in 2's complement. The numbers are:

$$M = -15 = 10001 \qquad -M = +15 = 01111 \qquad Q = -16 = 10000$$

$A$ starts at $00000$ and $Q_{-1}$ at 0. In every cycle we look at the pair $Q_0Q_{-1}$. The pair $10$ means $A = A - M$. The pair $01$ means $A = A + M$. The pairs $00$ and $11$ mean no operation. After that, $A$, $Q$ and $Q_{-1}$ shift one place right together, and the sign bit of $A$ is copied (arithmetic shift right, ASR). The loop runs 5 times, once for each bit of the multiplier. After the 5 cycles, the 10-bit product is ready, because two 5-bit numbers give a result of at most 10 bits.

CycleQ0 Q-1OperationAQQ-1
Start-initial00000100000
10 0no change, ASR00000010000
20 0no change, ASR00000001000
30 0no change, ASR00000000100
40 0no change, ASR00000000010
51 0A = A - M, ASR00111100001

The product is in $AQ$ joined:

$$AQ = 0011110000$$

The leading bit is 0, so the result is positive. Its value is:

$$2^7 + 2^6 + 2^5 + 2^4 = 128 + 64 + 32 + 16 = 240$$

Therefore $(-15) \times (-16) = +240$.

This example is short because the multiplier $-16 = 10000$ has four zeros in a row at the right. In the first four cycles the pair is $00$, so only shifts happen. In cycle 5, the pair is $10$, since the lowest 1 has reached $Q_0$ while $Q_{-1}$ is 0. So $M$ is subtracted. Subtracting $M = -15$ means adding $+15$, which gives $A = 01111$. After the last shift, this becomes $00111$.

The multiplier is worth a single signed digit $-1$ at bit position 4, that is $-16$. So the product is $(-15) \times (-16) = +240$, with the factor $2^4$ coming from the shifts. The sign comes out positive on its own, with no separate sign logic. Every cycle of the table works on 2's complement numbers directly, so negative multiplicands and multipliers need no special treatment, unlike sign-magnitude multiplication. If the multiplier is read as $-16$, only one subtraction is needed, so Booth's method is very efficient for such numbers. The check is $15 \times 16 = 240$ and the two negative signs give a positive result, so the answer is correct.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextWrite a program to evaluate the arithmetic statement. P = ((X - Y + Z) * (A ^ B))/( C ^ D