How to understand Booth algorithm?

The Booth algorithm is a multiplication algorithm for signed binary numbers in two's complement representation, designed to increase computational efficiency by reducing the number of partial product additions required. Its core innovation lies in a systematic method for examining pairs of bits in the multiplier to determine operations on the multiplicand, thereby optimizing for sequences of ones and zeros. Unlike straightforward sequential addition, which would treat each '1' bit as an independent addition event, Booth's algorithm recognizes that a string of consecutive '1's, such as in multiplying by 0011110, can be recast as a single subtraction at the least significant bit of the string and a single addition at the most significant bit's next position. This transformation, based on the mathematical identity that a string of ones equals a power of two minus one, directly reduces the number of arithmetic operations, particularly beneficial in early computing hardware where addition was a primary bottleneck.

The algorithm's mechanism involves appending a single '0' bit to the right of the multiplier and then scanning the multiplier bits in overlapping pairs from right to left. The action taken in each step depends on the current and previous bit in this scan, following a simple state table: a transition from '0' to '1' instructs subtraction of the multiplicand from the partial product; a transition from '1' to '0' instructs addition; and identical bits ('0','0' or '1','1') instruct only an arithmetic right shift. This process iterates for as many steps as there are bits in the original multiplier. The arithmetic right shift is critical as it properly extends the sign bit of the partial product in two's complement format, maintaining mathematical correctness for negative intermediate values. The algorithm inherently handles both positive and negative multipliers and multiplicands correctly within the two's complement system without any need for pre-processing or sign correction, as the operations on the bit-pairs naturally account for the sign's weight.

Understanding Booth's algorithm requires appreciating its dual nature as both a specific procedure and a family of related techniques. The classic version, often termed Booth's Radix-2 algorithm, provides a foundation but may not always reduce the number of operations compared to naïve methods, especially with multipliers that have isolated '1's. This limitation led to advanced variants like Modified Booth's algorithm (Radix-4), which examines triplets of bits, thereby halving the number of steps and further optimizing for common bit patterns. The true significance of Booth's algorithm lies in its hardware implementation legacy. It provided a structured, sequential control logic that was highly suitable for the design of early arithmetic logic units (ALUs) and remains a pedagogical cornerstone in computer architecture for illustrating the optimization of fundamental operations. Its efficiency gain is not merely arithmetic but architectural, reducing the number of clock cycles or hardware complexity required for multiplication, a principle that continues to inform the design of modern high-performance multipliers.