Booth\'s multiplication algorithm
Procedure
If x is the count of bits of the multiplicand, and y is the count of bits of the multiplier :
• Draw a grid of three lines, each with squares for x + y + 1 bits. Label the lines respectively A (add), S (subtract), and P (product).
• In two\'s complement notation, fill the first x bits of each line with :
o A: the multiplicand
o S: the negative of the multiplicand
o P: zeroes
• Fill the next y bits of each line with :
o A: zeroes
o S: zeroes
o P: the multiplier
• Fill the last bit of each line with a zero.
• Do both of these steps |y| (the Absolute Value of y) times :
1. If the last two bits in the product are...
00 or 11: do nothing.
01: P = P + A. Ignore any overflow.
10: P = P + S. Ignore any overflow.
2. Arithmetically shift the product right one position.
• Drop the last bit from the product for the final result.
Example
Find 3 × -4:
• A = 0011 0000 0
• S = 1101 0000 0
• P =......
Join Now or Login to view the rest of this paper.
Approximate Word Count: 409
Approximate Pages: 2 (260 words per double-spaced page) |