Anda di halaman 1dari 7

CS222

ASSIGNMENT

Discussion on

BOOTHS, BARRELS

&

ARRAY

Algorithms for Multiplication

CREATED BY

BINGI N. KATHIK (11010160) NAGELLI KARTHEEK (11010162) VISHAL ANAND (11010171)

What is the Array Multiplication Algorithm for binary multiplication?


The Array Multiplication Algorithm basically employs no clock pulse and there is a delay involved. Unlike the general multiplication wherein, we find the sum of the corresponding final bit and then accordingly take the carry bit to the ensuing bit, here we actually use cascading type of addition and carry. That is the carry bits are carried in a diagonal fashion and thus we traverse down the graphical image and thus we arrive at the output. ILLUSTRATION:

Array Multiplication Algorithm Schematics Thus, the two operands M and Q each of four bits are multiplied into the variable
P and the carry at each step is given over to the carry of the next bit-level and thus the time of execution of such kind of process is reduced. (i). It is a combinatorial circuit. (ii). It requires 3+3 full adders over here in this example, thus it would need less than or equal to 2n full adders, where n stands for the number of bits corresponding to the larger input of the two.

What is the Barrels Algorithm for binary multiplication?


The Barrels algorithm actually consists of an adder, two registers and a shift register. At the first clock, it looks at the LSB of the second number (B) and it just shifts the number if the bit encountered is a 0. Else if the bit encountered is a 1, it shifts A and then adds A to it. At the next clock pulse, it looks at the LSB-1th position and hence, in totality it requires n clock pulses. Thus it is slower than the Array multiplier as the latter has just ripple carry along the diagonal longest path, which acts as a n-bit ripple carry adder. ILLUSTRATION:

Barrels Multiplication Algorithm Schematics


Thus, if we are doing a multiplication for two 4-bit numbers, we need a 8-bit register.

A sample execution of the algorithm on the binary numbers 1011(M=11) and 1101(Q=13) should output 10001111(i.e. 143). The algorithm produces the desired output:

The difference between the Sequential (Barrels) and Array algorithms are : (i). Sequential takes lesser area in terms of circuit space as compared to the Array multiplication setup. (ii). Sequential method is comparatively used by most processors, but the Array method has become obsolete and outdated.

[Turn Leaf Over]

Flowchart for the execution of Barrels Multiplication Algorithm :

This explains the flow of the execution while multiplying two binary numbers vide the Barrels Algorithm.

[Turn Leaf Over]

What is the Booths Algorithm for binary multiplication?


The Booths Algorithm for multiplication for two binary numbers extends itself in some sense from the Barrels Algorithm. Here, the flowchart of the execution goes like this:

An example illustrating the Booths Algorithm :

Differences between the Barrels Algorithm and the Booths Algorithm for Multiplication of Binary Numbers :
(i) (ii) The Barrels algorithm does not work for negative numbers, while the Booths algorithm works for negative numbers. The Booths algorithm uses lower space as it optimizes on the stagnant bit spaces of the Barrels algorithm counterpart. Thus we do not use as many registers as in the former algorithm. We use Q0 and Q-1 to determine the changes in A in the case of Booths algorithm, but in the Barrels algorithm, we just compare the last bit of multiplicand to add either 0 or multiplier to A.

(iii)