Back

Booth’s Multiplication Algorithm in Computer Organization

29 Nov 2024
6 min read

The Booth Algorithm is a widely used technique for multiplying binary integers particularly in signed 2’s complement representation. It was proposed by Andrew D in 1951. This algorithm is an efficient way to perform multiplication, minimizing the number of additions and subtractions. The algorithm optimizes the multiplication process to identify the patterns in binary representation of numbers. It makes highly efficient hardware implementations such as processors and digital signal processors (DSPs).

In this article, we will explore Booth’s algorithm, its working, advantages, limitations, and applications.

What is the Booth Algorithm in Computer Organization?

Booth's algorithm is a technique used for multiplying binary numbers. It reduces the number of operations required for multiplication by encoding the multiplier in a specific way. When compared to traditional multiplication algorithms, it treats both positive and negative numbers in a consistent manner, which makes it highly efficient for computer systems where signed numbers are commonly used.

In Booth’s Algorithm, the multiplication process involves:

  • Inspecting two consecutive bits of the multiplier at a time.
  • Adding, subtracting, or leaving unchanged the current product based on these bits.
  • Shifting the product right after each operation gradually forms the final result.

Implementation of Booth’s Algorithm

custom img

How the Booth’s Algorithm Works?

Booth’s algorithm operates by examining consecutive pairs of bits in the multiplier and performing arithmetic operations based on these pairs. It uses the 2’s complement representation of numbers to handle both positive and negative values. 

Below is the step-by-step procedure for Booth's Multiplication Algorithm in Computer Architecture. Let’s take an example of the numbers such as m = 5 (multiplicand) and r = −3 (multiplier)

Step 1: Initialize the registers

We first convert both numbers to their binary forms.

Now, m = 5 (binary: 0101), r = −3 (binary: 1101) in 4-bit 2’s complement representation, as we are working with 4-bit registers. We will assume we are using 4 bits for the multiplicand and multiplier.

  • Multiplicand M = 0101
  • Multiplier Q =1101

Now we initialize the following registers:

  • AC (Accumulator) = 0000 (4-bit register)
  • QR (Multiplier Register) = Q =1101
  • Qn+1 = 0 (additional bit, initialized to 0)
  • SC (Sequence Counter) = 4 (since the multiplier has 4 bits)

Step 2: Start the algorithm We need to check the last two bits of the multiplier Qn and Qn+1 and follow Booth’s algorithm rules: First iteration (SC = 4): Qn = 1 (from QR), Qn+1 = 0 (initialized to 0) The last two bits are 10, so we perform a subtraction of the multiplicand from AC: 

  • AC = AC−M
  • AC = 0000−0101 = 1011 (in 2’s complement representation of 4 bits)

Now perform the arithmetic right shift operation on AC and QR:

  • Before shift: AC = 101, QR = 1101, Qn+1 = 0
  • After the right shift: AC = 1101, QR = 1110, Qn+1 = 1

Decrement the sequence counter SC = 3.  Second iteration (SC = 3): Qn = 0, Qn+1 = 1The last two bits are 01, so we perform an addition of the multiplicand to AC: 

  • AC = AC+M
  • AC = 1101+0101 = 0010 (in 4-bit 2’s complement representation)

Perform the arithmetic right shift operation on AC and QR:

  • Before shift: AC = 0010, QR = 1110, Qn+1 = 1
  • After right shift: AC = 0001, QR = 1111, Qn+1 = 0

Decrement the sequence counter SC = 2. Third iteration (SC = 2): Qn = 1, Qn+1 = 0The last two bits are 10, so we perform a subtraction of the multiplicand from AC: 

  • AC=AC−M
  • AC = 0001−0101=1011 (in 2’s complement)

Perform the arithmetic right shift operation on AC and QR:

  • Before shift: AC = 1011, QR = 1111, Qn+1 = 0
  • After right shift: AC = 1101, QR = 1111, Qn+1 = 1

Decrement the sequence counter SC = 1. Fourth iteration (SC = 1): Qn = 1, Qn+1 = 1The last two bits are 11, so we do not perform any addition or subtraction. We just perform the arithmetic right shift:

  • Before shift: AC = 1101, QR = 1111, Qn+1 = 1
  • After right shift: AC = 1110, QR = 1111, Qn+1 = 1

Decrement the sequence counter SC = 0. Step 3: Result At the end of the algorithm, the result of the multiplication will be stored in the AC and QR registers. Where, AC = 1110, QR = 1111To interpret this result:

  • The AC and QR together form the final product in 8-bit 2’s complement representation: 11101111.
  • This is the 8-bit 2’s complement representation of -15, which is the product of 5× (−3) = −15

Final Answer

The product of 5× (−3) using Booth's algorithm is -15.

custom img

What are the Advantages of Booth’s Multiplication Algorithm?

The advantages of Booth’s multiplication algorithm are:

  • This algorithm is used to multiply signed binary numbers, handling both positive and negative numbers effectively without requiring separate logic for negative numbers.
  • The algorithm minimizes the number of additions and subtractions required during multiplication, leading to a faster computation compared to traditional methods.
  • Booth’s algorithm is well-suited for hardware implementation because it reduces the complexity of arithmetic operations, which is crucial for devices with limited resources like embedded systems.
  • The algorithm efficiently handles sequences of 0’s or 1’s in the multiplier, leading to fewer shifts and operations.
  • It is widely used in processors, digital signal processors (DSPs), and other hardware accelerators to optimize the speed of multiplication operations.

What are the Disadvantages of Booth’s Multiplication Algorithm?

The disadvantages of Booth’s Multiplication Algorithm are:

  • It can be more difficult to understand and implement compared to traditional multiplication methods. It requires careful handling of sign bits and conditional additions or subtractions.
  • It is primarily designed for signed binary numbers. To use it for unsigned numbers, modifications are required, making it less versatile for all types of binary multiplication.
  • The algorithm involves multiple iterations of addition, subtraction, and shifting, which may lead to higher latency compared to simpler multiplication methods.
  • Although it reduces the number of operations, the algorithm may still consume more power due to the multiple cycles involved in shifting and adding or subtracting the multiplicand.

Applications of Booth’s Multiplication Algorithm

The applications of Booths’ Multiplication Algorithm:

  • This algorithm is often integrated into the Arithmetic Logic Unit (ALU) of microprocessors to perform efficient binary multiplication.
  • In DSP applications, where the algorithm helps to reduce computation time for multiplication operations such as filtering and convolution.
  • The systems often require efficient exponentiation and multiplication of large numbers. 
  • This is used in custom hardware accelerators to speed up specific tasks, such as image processing or machine learning, where large-scale multiplications are frequently performed.

Conclusion

In conclusion, Booth’s algorithm is an essential technique in modern computer organization, designed to efficiently multiply signed binary numbers. While it offers substantial performance benefits in terms of reduced operations and hardware efficiency, it also comes with challenges such as complexity and increased latency.

Frequently Asked Questions

1. What is the importance of Booth’s Multiplication Algorithm?

Booth’s algorithm is important because it optimizes the multiplication of signed binary numbers, reducing the number of additions and subtractions required. It is crucial in hardware implementations, especially in processors and digital signal processors, where speed and hardware efficiency are vital.

2. How many bits are in the Booth Algorithm?

The number of bits in the Booth Algorithm depends on the bit width of the multiplier. If the multiplier is n bits, the algorithm operates with n bits for both the multiplicand and the multiplier, and an additional bit (Qn+1) is used for the least significant bit of the multiplier.

3. What are the two attractive features of Booth’s algorithm?

The two attractive features of Booth’s algorithm are:

  • Reduced number of additions/subtractions for multiplication.
  • Efficient handling of signed binary numbers, making it ideal for computing in digital systems.

4. What is the time complexity of Booth’s algorithm?

The time complexity of Booth's algorithm is O(n), where n is the number of bits in the multiplier. This is because the algorithm requires a constant number of operations (add, subtract, shift) per bit in the multiplier.

5. What is the Radix 4 and Radix 8 Booth’s Multiplier?

  • Radix-4 Booth Multiplier: It uses two bits of the multiplier at each step, effectively reducing the number of cycles compared to the standard Booth algorithm. This results in faster multiplication and fewer operations.
  • Radix-8 Booth Multiplier: The multiplication takes optimization even further by processing three bits of the multiplier at a time. This can significantly speed up the multiplication process, especially in hardware implementations for large numbers.

Read More Articles

Chat with us
Chat with us
Talk to career expert