Opentopia Directory Encyclopedia Tools

Booth's multiplication algorithm

Encyclopedia : B : BO : BOO : Booth's multiplication algorithm


Booth's multiplication algorithm will multiply two signed numbers in two's complement notation.

Procedure

If x is the count of bits of the multiplicand, and y is the count of bits of the multiplier :



Example

Find 3 × -4:



Why does Booth's algorithm work ?

Consider a positive multiplier consisting of a block of 1s surrounded by 0s. For example, 00111110. The product is given by :
[ M \times \,^ 0 \; 0 \; 1 \; 1 \; 1 \; 1 \; 1 \; 0 \,^ = M \times (2^5 + 2^4 + 2^3 + 2^2 + 2^1) = M \times 62 ]
where M is the multiplicand. The number of operations can be reduced to two by rewriting the same as
[ M \times \,^ 0 \; 1 \; 0 \; 0\; 0\; 0 \mbox \; 0 \,^ = M \times (2^6 - 2^1) = M \times 62 ]
The product can be then generated by one addition and one subtraction of the multiplicand. This scheme can be extended to any number of blocks of 1s in a multiplier (including the case of single 1 in a block). Thus,
[ M \times \,^ 0 \; 0 \; 1 \; 1 \; 1 \; 0 \; 1 \; 0 \,^ = M \times (2^5 + 2^4 + 2^3 + 2^1) = M \times 58 ]
[ M \times \,^ 0 \; 1 \; 0 \; 0 \mbox \; 1 \mbox \; 0 \,^ = M \times (2^6 - 2^3 + 2^2 - 2^1) = M \times 58 ]
Booth's algorithm follows this scheme by performing an addition when it encounters the first digit of a block of ones (0 1) and a subtraction when it encounters the end of the block (1 0). This works for a negative multiplier as well. When the ones in a multiplier are grouped into long blocks, Booth's algorithm performs fewer additions and subtractions than the normal multiplication algorithm.

History

The algorithm was invented by Andrew D. Booth in 1951 while doing research on crystallography at Birkbeck College in Bloomsbury, London. Booth used desk calculators that were faster at shifting than adding and created the algorithm to increase their speed. Booth's algorithm is of interest in the study of computer architecture.

See also

References

  1. Collin, Andrew. [http://www.cs.man.ac.uk./CCS/res/res05.htm#e Andrew Booth's Computers at Birkbec

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: