You are on page 1of 5

Signed number multiplication using Booth Algorithm

By Rahul R

Signed number multiplication


By examining 4-bit signed addition, we observe that adding two 4 bit numbers gives a 5-bit
sum. For an unsigned adder, the carry out provides the fifth bit. Unfortunately, this bit is
wrong for signed addition if the sign of the two numbers are different. Therefore, to ensure
that a 4-bit signed addition gives the correct 5 bit result, we actually need a 5-bit adder as
shown below. The input numbers must first be sign extended to form a 5-bit signed number
before the addition.

Similar to unsigned multiply, signed multiplication can be done using serial addition as
shown below:

The procedure here is similar to that for unsigned multiply except that:
Each input to the 4-bit sign adder must be sign extended by 1 bit
The last operation must be a subtraction, not an add.
Instead of treating the MSB differently from all other bits, it is possible to rearrange the
binary bits and code them differently. Booth Algorithm is one of many algorithms that group

together a number of bits in the multiplier and perform a recoding of the binary bits before
the actual addition/subtraction.
Multipliers involve three operations basically:
1. Partial product generation (Booth Algorithm)
2. Partial product Accumulation
3. Final addition
Partial products result from logical AND of multiplicand X with a multiplier bit Y. Each row
is in the partial product array is either a copy of a multiplicand or a row of zeroes. As zero
rows have no impact on the result and represents waste of effort when added, it is better to
shift when zero row occurs rather than adding and thereby reducing the number of partial
products which is equivalent to reducing number of additions that ultimately leads to speedup as well as an area reduction.
Booth Multiplication Algorithm gives a procedure for obtaining less number of partial
products while multiplying binary integer in unsigned as well as signed -2s complement
representation. It operates on the fact that strings of 0s in the multiplier require no addition
but just shifting, and a string of 1s in the multiplier from bit weight 2k to weight 2m can be
treated as 2k+1-2m. It means that the product is obtained by shifting the binary multiplicand X
by (k+1) times to the left and subtracting multiplicand X by (m) times to the left.
The key to Booths insight is in his classifying groups of bits into the beginning, the middle,
or the end of a run of 1s.A string of 0s avoids arithmetic, so we can leave these alone. If we
are limited to looking at just 2 bits, we can then try to match the situation in the preceding
drawing, according to the value of these 2 bits:

Booth Algorithm steps


Step1: Append a zero to the right of the LSB of the multiplier number
Step2: Depending on the current and previous bits, do one of the following:
00: Middle of a string of 0s, so no arithmetic operation.
01: End of a string of 1s, so add the multiplicand to the left half of the product.
10: Beginning of a string of 1s, so subtract the multiplicand from the left half of the product.
11: Middle of a string of 1s, so no arithmetic operation.
Step3: Proceed with overlapping pairs of bits such that the MSB of the pair becomes the LSB
of the next pair. In this manner, one bit of the multiplier number is eliminated in each pass
through the algorithm. Then shift the Product register right 1 bit.

Working of Booth Algorithm


At each stage, we add Ys * 2i * (-xi + xi-1)
We assume that x-1 = 0
The algorithm is defined by the following equation:

Booth Serial Multiplier

Booth Algorithm works for twos complement signed integers. Let a be the multiplier and b
be the multiplicand and well use ai to refer to bit i of a .
We can represent Booths algorithm as the expression (ai-1 ai), where the value of the
expression means the following actions:
0 : do nothing
+1 : add b
1 : subtract b
Since we know that shifting of the multiplicand left with respect to the Product register can
be considered multiplying by a power of 2, Booths algorithm can be written as the sum

We can simplify this sum by noting that

recalling that a-1 = 0 and by factoring out b from each term:

The long formula in parentheses to the right of the first multiply operation is simply the twos
complement representation of a . Thus, the sum is further simplified to b* a
Signed number multiplication using Booth Algorithm:
Booths algorithm with negative numbers: 2 * -3 = 6, or 0010 * 1101 = 1111 1010:

Booths Recoding Drawbacks:


Variable number of add/subtract operations and of shift operations between two
consecutive add/subtract operations
Algorithm inefficient with isolated 1's
Ex: 001010101(0) recoded as 011111111, requiring 8 instead of 4 operations
Drawbacks of Booth recoding can be improved by examining 3 bits of multiplier Y at a time
rather than 2 at a time.
Radix-4 Modified Booth Algorithm and rules
Bits xi and xi-1 recoded into yi and yi-1 ,and xi-2 serves as reference bit
Separately , xi-2 and xi-3 recoded into yi-2 and yi-3 , and xi-4 serves as reference bit
Groups of 3 bits each overlap - rightmost being x1 x0 (x-1) next x3 x2 (x1) and so on

Example showing 8-bit signed number multiplication using modified booth algorithm
8-bit signed multiplication using modified booth algorithm (worst case)
A
X
Y

01
11
0 -1

01 01 01
01 01 01
01 01 01

85
-43
recoded multiplier

Add A
2-Bit Shift
Add A

+ 0 01
0 00
+ 0 01

01 01 01
01 01 01 01
01 01 01

2-Bit Shift
Add A

0 01
0 00
+ 0 01

10 10 10 01
01 10 10 10 01
01 01 01

2-Bit Shift
Add -A

0 01
0 00
+ 1 10

10 11 11 10 01
01 10 11 11 10 01
10 10 11

2-Bit Shift

1 11
1 11

00 01 10 11 10 01
1 1 0 0 0 1 1 0 1 1 1 0 0 1 -3655

8-bit signed multiplication using modified booth algorithm (best case)


A
X
Y

10 11 11 11
10 11 11 11
0 -1 0 0 0 0 0 -1

Add -A
2-Bit Shift
2-Bit Shift Only
2-Bit Shift Only
Add -A

+ 0
0
0
0
+ 0

01
00
00
00
01

2-Bit Shift

0 01
0 00

00
01
00
00
00

00
00
01
00
00

01
00
00
01
01

00 00 10
01 00 00

-65
-65
recoded multiplier

01
00 01
00 00 01

00 00 01
1 0 0 0 0 0 0 1 4225

You might also like