Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

Booth’s Multiplication

Prepared by: Ms. Ankita Agarwal


(Assistant Professor)
Booth’s Multiplication
• Booth Algorithm gives a procedure for
multiplying binary integers in 2’s complement
representation.
• It operates on the fact that strings of 0’s in the
multiplier require no addition but just shifting,
and string of 1’s in the multiplier from bit
weight 2^k to weight 2^m can be treated as
2^(k+1)-2^m
Booth’s Multiplication
• For example the binary number 001110(+14) has
a string of 1’s from 2^3 to 2^1 (k=3,m=1).
• The number can be represented as 2^k+1-
2^m=2^4-2^1=16-2=(+14)
• Therefore the multiplication MX14,where M is
multiplicand and 14 is multiplier, can be done as
MX2^4-MX2^1.Thus the product can be obtained
by shifting the binary multiplicand M four times
to the left and subtracting M shifted left once.
Booth’s Multiplication
• As in all multiplication schemes, Booth
algorithm requires examination of the
multiplier bits and shifting of the partial
product. Prior to the shifting ,the multiplicand
may be added to the partial product,
subtracted from the partial product, or left
unchanged according to the following rules:
Booth’s Multiplication
• 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(provided that there
was the previous 1) in a string of 0’s in the
multiplier.
• 3.The partial product does not change when the
multiplier bit is identical to the previous multiplier
bit.
Booth’s Multiplication
• The algorithm works for positive and negative
multipliers in 2’s complement representation
Hardware implementation of Booth
Algorithm
Hardware implementation of Booth
Algorithm
• In this, the multiplier is stored in QR register, the
multiplicand is stored in BR register. Qn designates
the least significant bit of the multiplier in register
QR. An extra flip flop Qn+1 is appended to QR to
facilitate a double bit inspection of the multiplier. The
sequence counter SC is initially set to a number equal
to the number of bits in the multiplier. The counter is
decremented by 1 after forming each partial product.
When the content of the counter reaches zero, the
product is formed and the process stops.
Flowchart of Booth’s Algorithm for multiplication
of signed -2’s complement numbers
Booth’s Algorithm for multiplication of
signed -2’s complement numbers
• AC and the appended bit Qn+1 are initially cleared
to 0 and the sequence counter SC is initially set to a
number equal to the number n equal to the
number of bits in the multiplier.
• 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.
Booth’s Algorithm for multiplication of
signed -2’s complement numbers
• 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.
• If the two bits are equal, the partial product does not
change.
• The next step is to shift right (ashr) operation which
shifts AC and QR to the right and leaves the sign bit in
AC unchanged. The sequence counter is decremented
and the computational loop is repeated n times.
Numerical examples of Booth’s Algorithm

• Case 1:When both multiplicand and multiplier are


positive.
• Multiply (10)X(5) using Booth’s multiplication
Algorithm.
• Multiplicand in BR=01010
• BR’+1=10110
• Multiplier in QR=00101
• Initially AC=00000
• Qn+1=0
• SC=5
QnQn+1 AC QR Qn+1 Operation SC

00000 00101 0 Initial 5


10 10110(add BR’+1 in AC) Subtract BR and then ashr
10110 00101 0 ashr
11011 00010 1 After ashr 4
01 01010(add BR in AC) Add BR and then ashr

00101 00010 1 ashr


00010 10001 0 After ashr 3
10 10110(add BR’+1 in AC) Subtract BR and then ashr

11000 10001 0 ashr

11100 01000 1 After ashr 2

01 01010(add BR in AC) Add BR and then ashr

00110 01000 1 ashr

00011 00100 0 After ashr 1

00 00001 10010 0 ashr 0


• Final answer is in AC and QR which is
00001 10010.
• In this the Most Significant bit is 1 implies the
answer is positive and its decimal 50.
• Case 2:When multiplicand is positive and multiplier are
negative.
• Multiply (10)X(-5) using Booth’s multiplication
Algorithm.
• Multiplicand in BR=01010
• BR’+1=10110
• Multiplier in QR=11011(2’s complement of 5)
• Initially AC=00000
• Qn+1=0
• SC=5
QnQn+1 AC QR Qn+1 Operation SC

00000 11011 0 Initial 5


10 10110(add BR’+1 in AC) Subtract BR and then ashr
10110 11011 0 ashr
11011 01101 1 After ashr 4
11 11101 10110 1 ashr 3

01 01010(add BR in AC) Add BR and then ashr


00111 10110 1 ashr
00011 11011 0 After ashr 2

10 10110(add BR’+1 in AC) Subtract BR and then ashr

11001 11011 0 ashr

11100 11101 1 After ashr 1

11 11110 01110 1 ashr 0


• In the above result 11110
01110 the most significant bit is 1 signifies the
answer is negative and in
2’s complement form. So after taking 2’s
complement we get the final result.
So 2’s complement of 11110 01110 is
0000110010 which is decimal 50.
So final answer is (-50)
• Case 3:When multiplicand is negative and multiplier are
positive.
• Multiply (-10)X(5) using Booth’s multiplication
Algorithm.
• Multiplicand in BR=10110 (2’s complement of 10)
• BR’+1=01010
• Multiplier in QR=00101
• Initially AC=00000
• Qn+1=0
• SC=5
QnQn+1 AC QR Qn+1 Operation SC

00000 00101 0 Initial 5


10 01010(add BR’+1 in AC) Subtract BR and then ashr
01010 00101 0 ashr
00101 00010 1 After ashr 4
01 10110(add BR in AC) Add BR and then ashr

11011 00010 1 ashr


11101 10001 0 After ashr 3
10 01010(add BR’+1 in AC) Subtract BR and then ashr

00111 10001 0 ashr

00011 11000 1 After ashr 2

01 10110(add BR in AC) Add BR and then ashr

11001 11000 1 ashr

11100 11100 0 After ashr 1

00 11110 01110 0 ashr 0


• In the above result 11110
01110 the most significant bit is 1 signifies the
answer is negative and in
2’s complement form. So after taking 2’s
complement we get the final result.
So 2’s complement of 11110 01110 is
0000110010 which is decimal 50.
So final answer is (-50)
• Case 4:When multiplicand and multiplier both are
negative.
• Multiply (-9)X(-13) using Booth’s multiplication
Algorithm.
• Multiplicand in BR=10111 (2’s complement of 9)
• BR’+1=01001
• Multiplier in QR=10011 (2’s complement of 13)
• Initially AC=00000
• Qn+1=0
• SC=5

You might also like