Booths Algo
Booths Algo
CS440
Points to remember
When using Booth's Algorithm:
You will need twice as many bits in your
product as you have in your original two
operands.
The leftmost bit of your operands (both
your multiplicand and multiplier) is a SIGN
bit, and cannot be used as part of the
value.
To begin
Decide which operand will be the multiplier and
which will be the multiplicand
Convert both operands to two's complement
representation using X bits
X must be at least one more bit than is
11110 11011 0
After ASR
11111 01101 1
(left-most bit was 1, so a 1 was shifted in on the left)
Pass 1 is complete.
Example: Pass 2
Current Product and previous LSB
11111 01101 1
11111 01101 1
After ASR
11111 10110 1
(left-most bit was 1, so a 1 was shifted in on the left)
Pass 2 is complete.
Example: Pass 3
Current Product and previous LSB
11111 10110 1
00001 10110 1
After ASR
00000 11011 0
(left-most bit was 0, so a 0 was shifted in on the left)
Pass 3 is complete.
Example: Pass 4
Current Product and previous LSB
00000 11011 0
11110 11011 0
After ASR
11111 01101 1
(left-most bit was 1, so a 1 was shifted in on the left)
Pass 4 is complete.
Example: Pass 5
Current Product and previous LSB
11111 01101 1
11111 01101 1
After ASR
11111 10110 1
(left-most bit was 1, so a 1 was shifted in on the left)
Pass 5 is complete.
Final Product
We have completed 5 passes on the
5-bit operands, so we are done.