CH 10
CH 10
Multiply
Multiplicand in BR
Multiplier in QR
AC ← 0
Qn + 1 ← 0
SC ← n
= 10 = 01
QnQn+1
AC ← AC + BR’ + 1 = 00 AC ← AC + BR
= 11
ashr (AC & QR)
SC ← SC - 1
≠0 =0
SC
END
Prior to the shifting, the multiplicand may be added to the partial product, subtracted
from the partial, or left unchanged according to the following rules:
1. The multiplicand is subtracted from the partial product upon encountering the
first least significant 1 in a string of 1’s in the multiplier.
2. The multiplicand is added to the partial product upon encountering the first 0 in a
string of 0’s in the multiplier.
3. The partial product does not change when multiplier bit is identical to the
previous multiplier bit.
The algorithm works for positive or negative multipliers in 2’s complement
representation.
This is because a negative multiplier ends with a string of 1’s and the last operation will
be a subtraction of the appropriate weight.
The two bits of the multiplier in Qn and Qn+1 are inspected.
If the two bits are equal to 10, it means that the first 1 in a string of 1 's has been
encountered. This requires a subtraction of the multiplicand from the partial product in
AC.
If the two bits are equal to 01, it means that the first 0 in a string of 0's has been
encountered. This requires the addition of the multiplicand to the partial product in AC.
When the two bits are equal, the partial product does not change.
If neither of the operands is equal to zero, the process continues with the exponent
addition.
The exponent of the multiplier is in q and the adder is between exponents a and b.
It is necessary to transfer the exponents from q to a, add the two exponents, and
transfer the sum into a.
Multiplicand in BR
Multiplier in QR
=0
BR
≠0
=0
QR
AC ← 0 ≠0
a←q
a←a+b
a ← a - bias
Multiply mantissa
=0
shl AQ
A1
a←a-1
=1
END
(product is in AC)
Since both exponents are biased by the addition of a constant, the exponent sum will
have double this bias.
The correct biased exponent for the product is obtained by subtracting the bias number
from the sum.
The multiplication of the mantissas is done as in the fixed-point case with the product
residing in A and Q.
Overflow cannot occur during multiplication, so there is no need to check for it.
The product may have an underflow, so the most significant bit in A is checked. If it is a
1, the product is already normalized.
4. Multiply the (-9) with (-13) using Booth’s algorithm. Give each
step. (Sum’14)
A numerical example of booth algorithm is shown for n=5. It shows the step-by-step
multiplication of (-9) X (-13) = +117.
9: 01001 13: 01101
1’s complement of 9: 10110 1’s complement of 13: 10010
+ 1 + 1
2’s complement of 9: 10111 (-9) 2’s complement of 13: 10011 (-13)
AC QR(-13) Qn+1 M(BR)(-9) SC Comments
00000 10011 0 10111 5 Initial value
01001 10011 0 10111 Subtraction: AC=AC+BR’+1
4
00100 11001 1 10111 Arithmetic Shift Right
00010 01100 1 10111 3 Arithmetic Shift Right
11001 01100 1 10111 Subtraction: AC=AC+BR’+1
2
11100 10110 0 10111 Arithmetic Shift Right
11110 01011 0 10111 1 Arithmetic Shift Right
00111 01011 0 10111 Subtraction: AC=AC+BR’+1
0
00011 10101 1 10111 Arithmetic Shift Right
Answer: -9 X -13 =117 => 001110101
5. Multiply the (7) with (3) using Booth’s algorithm. Give each
step.
7: 0111 3: 0011
6. Multiply the (15) with (13) using Booth’s algorithm. Give each
step.
15: 01111 13: 01101
15X13=195
AC QR(15) Qn+1 M(BR)(13) SC Comments
00000 01111 0 01101 5 Initial value
10011 01111 0 01101 Subtraction: AC=AC+BR’+1
4
11001 10111 1 01101 Arithmetic Shift Right
11100 11011 1 01101 3 Arithmetic Shift Right
11110 01101 1 01101 2 Arithmetic Shift Right
11111 00110 1 01101 1 Arithmetic Shift Right
01100 00110 1 01101 Addition: AC=AC+BR
0
00110 00011 1 01101 Arithmetic Shift Right
Answer: 15X13=195 => 0011000011
7. Multiply the (+15) with (-13) using Booth’s algorithm. Give each
step.
15: 01111 13: 01101
1’s complement of 13: 10010
+ 1
2’s complement of 13: 10011 (-13)