## Booth's Multiplication AlgorithmThe booth algorithm is a multiplication algorithm that allows us to multiply the two signed binary integers in 2's complement, respectively. It is also used to speed up the performance of the multiplication process. It is very efficient too. It works on the string bits 0's in the multiplier that requires no additional bit only shift the right-most string bits and a string of 1's in a multiplier bit weight 2 Following is the pictorial representation of the Booth's Algorithm: In the above flowchart, initially, SC is a sequence counter that represents the total bits set n, which is equal to the number of bits in the multiplier. There are BR that represent the multiplicand bits, and QR represents the multiplier bits. After that, we encountered two bits of the multiplier as Q_{n} and Q_{n + 1}, where Qn represents the last bit of QR, and Q_{n + 1 }represents the incremented bit of Qn by 1. Suppose two bits of the multiplier is equal to 10; it means that we have to subtract the multiplier from the partial product in the accumulator AC and then perform the arithmetic shift operation (ashr). If the two of the multipliers equal to 01, it means we need to perform the addition of the multiplicand to the partial product in accumulator AC and then perform the arithmetic shift operation (ashr), including Q. The arithmetic shift operation is used in Booth's algorithm to shift AC and QR bits to the right by one and remains the sign bit in AC unchanged. And the sequence counter is continuously decremented till the computational loop is repeated, equal to the number of bits (n)._{n + 1}## Working on the Booth Algorithm- Set the Multiplicand and Multiplier binary bits as M and Q, respectively.
- Initially, we set the AC and Q
_{n + 1}registers value to 0. - SC represents the number of Multiplier bits (Q), and it is a sequence counter that is continuously decremented till equal to the number of bits (n) or reached to 0.
- A Qn represents the last bit of the Q, and the Q
_{n+1}shows the incremented bit of Qn by 1. - On each cycle of the booth algorithm, Q
_{n}and Q_{n + 1}bits will be checked on the following parameters as follows:- When two bits Q
_{n}and Q_{n + 1}are 00 or 11, we simply perform the arithmetic shift right operation (ashr) to the partial product AC. And the bits of Qn and Q_{n + 1}is incremented by 1 bit. - If the bits of Q
_{n}and Q_{n + 1}is shows to 01, the multiplicand bits (M) will be added to the AC (Accumulator register). After that, we perform the right shift operation to the AC and QR bits by 1. - If the bits of Q
_{n}and Q_{n + 1}is shows to 10, the multiplicand bits (M) will be subtracted from the AC (Accumulator register). After that, we perform the right shift operation to the AC and QR bits by 1.
- When two bits Q
- The operation continuously works till we reached n - 1 bit in the booth algorithm.
- Results of the Multiplication binary bits will be stored in the AC and QR registers.
There are two methods used in Booth's Algorithm: ## 1. RSC (Right Shift Circular)It shifts the right-most bit of the binary number, and then it is added to the beginning of the binary bits. ## 2. RSA (Right Shift Arithmetic)It adds the two binary bits and then shift the result to the right by 1-bit position.
The numerical example of the Booth's Multiplication Algorithm is 7 x 3 = 21 and the binary representation of 21 is 10101. Here, we get the resultant in binary 00010101. Now we convert it into decimal, as (000010101)
Here, M = 23 = (010111) and Q = -9 = (110111)
Hence, 23 * -9 = 2's complement of 111100110001 => |