Professional Documents
Culture Documents
Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement
representation in efficient way, i.e., less number of additions/subtractions required. It
operates on the fact that strings of 0’s in the multiplier require no addition but just shifting and
a string of 1’s in the multiplier from bit weight 2^k to weight 2^m can be treated as 2^(k+1 ) to
2^m.
Ans. Here we have two numbers, 7 and 3. First of all, we need to convert 7 and 3 into
binary numbers like 7 = (0111) and 3 = (0011). Now set 7 (in binary 0111) as multiplicand
(M) and 3 (in binary 0011) as a multiplier (Q). And SC (Sequence Count) represents the
number of bits, and here we have 4 bits, so set the SC = 4. Also, it shows the number of
iteration cycles of the booth's algorithms and then cycles run SC = SC - 1 time.
Qn Qn + 1 M = (0111) AC Q Qn + 1 SC
M' + 1 = (1001) & Operation
1 0 Initial 0000 0011 0 4
Subtract (M' + 1) 1001
1001
Perform Arithmetic Right Shift operations 1100 1001 1 3
(ashr)
1 1 Perform Arithmetic Right Shift operations 1110 0100 1 2
(ashr)
0 1 Addition (A + M) 0111
0101 0100
Perform Arithmetic right shift operation 0010 1010 0 1
0 0 Perform Arithmetic right shift operation 0001 0101 0 0
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)10 = 2*4 + 2*3 + 2*2 + 2*1 + 2*0 => 21.
Qn Qn + 1 M=010111 AC Q Qn + 1 SC
M' + 1 = 1 0 1 0 0 1
Initially 000000 110111 0 6
1 0 Subtract M 101001
101001
Perform Arithmetic right shift 110100 111011 1 5
operation
1 1 Perform Arithmetic right shift 111010 011101 1 4
operation
1 1 Perform Arithmetic right shift 111101 001110 1 3
operation
0 1 Addition (A + M) 010111
010100
Perform Arithmetic right shift 001010 000111 0 2
operation
1 0 Subtract M 101001
110011
Perform Arithmetic right shift 111001 100011 1 1
operation
1 1 Perform Arithmetic right shift 111100 110001 1 0
operation
Bit pair recoding halves the maximum number of summands. Group the Booth-recoded multiplier
bits in pairs and observe the following: The pair (+1 -1) is equivalent to the pair (0 +1). That is
instead of adding -1 times the multiplicand m at shift position i to +1 (M at position i+1, the same
result is obtained by adding +1 (M at position i. Eg: 11010 – Bit Pair recoding value is 0 -1 -2
Bit-pair recoding is the product of the multiplier results in using at most one summand for each
pair of bits in the multiplier. It is derived directly from the Booth algorithm. Grouping the Booth-
recoded multiplier bits in pairs will decrease the multiplication only by summands.
Fast multiplication (Bit – pair recoding of multiplier) - This is derived from the Booth’s algorithm. It pairs
the multiplier bits and gives one multiplier bit per pair, thus reducing the number of summands by half.
This is shown below.
Example: Multiply each of the following pairs of signed 2’s-complement numbers using the Booth
algorithm. In each case, assume that A is the multiplicand and B is the multiplier.
(a) A = 010111 and B = 110110
(b) A = 110011 and B = 101100
Multiply the signed 2’s complement numbers using the bit-pair recoding of the multiplier.
(b)
Consider the following binary numbers:
Multiply the signed 2’s complement numbers using the bit-pair recoding of the multiplier.
A division algorithm provides a quotient and a remainder when we divide two number. They are
generally of two type slow algorithm and fast algorithm. Slow division algorithm are restoring,
non-restoring, non-performing restoring, SRT algorithm and under fast comes Newton–Raphson
and Goldschmidt.
In this article, will be performing restoring algorithm for unsigned integer. Restoring term is due
to fact that value of register A is restored after each iteration.
Here, register Q contain quotient and register A contain remainder. Here, n-bit dividend is loaded
in Q and divisor is loaded in M. Value of Register is initially kept 0 and this is the register whose
value is restored during iteration due to which it is named Restoring.
Let’s pick the step involved:
Step-1: First the registers are initialized with corresponding values (Q = Dividend, M = Divisor,
A = 0, n = number of bits in dividend)
Step-2: Then the content of register A and Q is shifted left as if they are a single unit
Step-3: Then content of register M is subtracted from A and result is stored in A
Step-4: Then the most significant bit of the A is checked if it is 0 the least significant bit of Q
is set to 1 otherwise if it is 1 the least significant bit of Q is set to 0 and value of register A is
restored i.e the value of A before the subtraction with M
Step-5: The value of counter n is decremented
Step-6: If the value of n becomes zero we get of the loop otherwise we repeat from step 2
Step-7: Finally, the register Q contain the quotient and A contain remainder
Remember to restore the value of A most significant bit of A is 1. As that register Q contain the
quotient, i.e. 3 and register A contain remainder 2.
Non-Restoring division, it is less complex than the restoring one because simpler operation are
involved i.e. addition and subtraction, also now restoring step is performed. In the method,
rely on the sign bit of the register which initially contain zero named as A.
Here is the flow chart given below.
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-
point computation which was established in 1985 by the Institute of Electrical and Electronics
Engineers (IEEE). The standard addressed many problems found in the diverse floating point
implementations that made them difficult to use reliably and reduced their portability. IEEE
Standard 754 floating point is the most common representation today for real numbers on
computers, including Intel-based PC’s, Macs, and most Unix platforms.
There are several ways to represent floating point number but IEEE 754 is the most efficient in
most cases. IEEE 754 has 3 basic components:
1. The Sign of Mantissa –
This is as simple as the name. 0 represents a positive number while 1 represents a negative
number.
The exponent field needs to represent both positive and negative exponents. A bias is added
to the actual exponent in order to get the stored exponent.
1(63rd bit)
Double precision 11(62-52) 52(51-0) 1023
Example –
85.125
85 = 1010101
0.125 = 001
85.125 = 1010101.001
=1.010101001 x 2^6
sign = 0
1. Single precision:
biased exponent 127+6=133
133 = 10000101
Normalised mantisa = 010101001
we will add 0's to complete the 23 bits
2. Double precision:
biased exponent 1023+6=1029
1029 = 10000000101
Normalised mantisa = 010101001
we will add 0's to complete the 52 bits
We cannot add these numbers directly. First, we need to align the exponent and then, we can
add significand.
After aligning exponent, we get 50 = 0.05 * 103
Now adding significand, 0.05 + 1.1 = 1.15
So, finally we get (1.1 * 103 + 50) = 1.15 * 103
Here, notice that we shifted 50 and made it 0.05 to add these numbers.
Now we get the difference of exponents to know how much shifting is required.
(10000010 – 01111110)2 = (4)10
Now, we find the difference of exponents to know how much shifting is required.
(10000010 – 01111110)2 = (4)10
Now, we shift the mantissa of lesser number right side by 4 units.
Mantissa of – 0.5625 = 1.00100000000000000000000
(note that 1 before decimal point is understood in 32-bit representation)
Shifting right by 4 units, 0.00010010000000000000000
Mantissa of 9.75= 1. 00111000000000000000000
All the examples are in base10 (decimal) to enhance the understanding. Doing in binary is similar.
In case of parallel adders, the binary addition of two numbers is initiated when all the bits of the
augend and the addend must be available at the same time to perform the computation. In a
parallel adder circuit, the carry output of each full adder stage is connected to the carry input of
the next higher-order stage, hence it is also called as ripple carry type adder.
In such adder circuits, it is not possible to produce the sum and carry outputs of any stage until
the input carry occurs. So there will be a considerable time delay in the addition process , which
through the gates before the correct output sum is available in the output terminals.
Consider the above figure, in which the sum S4 is produced by the corresponding full adder as
soon as the input signals are applied to it. But the carry input C4 is not available on its final steady
state value until carry c3 is available at its steady state value. Similarly C3 depends on C2 and C2
on C1. Therefore, carry must propagate to all the stages in order that output S4 and carry C5
The propagation time is equal to the propagation delay of the typical gate times the number of
gate levels in the circuit. For example, if each full adder stage has a propagation delay of 20n
seconds, then S4 will reach its final correct value after 80n (20 × 4) seconds. If we extend the
number of stages for adding more number of bits then this situation becomes much worse.
So the speed at which the number of bits added in the parallel adder depends on the carry
propagation time. However, signals must be propagated through the gates at a given enough
addition.
1. By employing faster gates with reduced delays, we can reduce the propagation delay. But
2. Another way is to increase the circuit complexity in order to reduce the carry delay time.
There are several methods available to speeding up the parallel adder, one commonly
used method employs the principle of look ahead-carry addition by eliminating inter stage
carry logic.
Back to top
Carry-Lookahead Adder
A carry-Lookahead adder is a fast parallel adder as it reduces the propagation delay by more
complex hardware, hence it is costlier. In this design, the carry logic over fixed groups of bits of
the adder is reduced to two-level logic, which is nothing but a transformation of the ripple carry
design.
This method makes use of logic gates so as to look at the lower order bits of the augend and
addend to see whether a higher order carry is to be generated or not. Let us discuss in detail.
Pi = Ai ⊕ Bi
Gi = Ai Bi
Si = Pi ⊕ Ci
C i +1 = Gi + Pi Ci
Where Gi is a carry generate which produces the carry when both Ai, Bi are one regardless of the
input carry. Pi is a carry propagate and it is associate with the propagation of carry from Ci to Ci
+1.
expressed as
C1 = G0 + P0 Cin
C2 = G1 + P1 C1
= G1 + P1 G0 + P1 P0 Cin
C3 = G2 + P2 C2
= G2 + P2 G1+ P2 P1 G0 + P2 P1 P0 Cin
C4 = G3 + P3 C3
= G3 + P3 G2+ P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 Cin
From the above Boolean equations we can observe that C4 does not have to wait for C3 and C2
to propagate but actually C4 is propagated at the same time as C3 and C2. Since the Boolean
expression for each carry output is the sum of products so these can be implemented with one
The implementation of three Boolean functions for each carry output (C2, C3 and C4) for a carry-
increase the speed of binary addition as shown in below figure. In this, two Ex-OR gates are
required by each sum output. The first Ex-OR gate generates Pi variable output and the AND gate
generates Gi variable.
Hence, in two gates levels all these P’s and G’s are generated. The carry-Lookahead generators
allows all these P and G signals to propagate after they settle into their steady state values and
produces the output carriers at a delay of two levels of gates. Therefore, the sum outputs S2 to
adders with carry logic. A 16 bit carry-Lookahead adder is constructed by cascading the four 4 bit
adders with two more gate delays, whereas the 32 bit carry-Lookahead adder is formed by
cascading of two 16 bit adders. In a 16 bit carry-Lookahead adder, 5 and 8 gate delays are
required to get C16 and S15 respectively, which are less as compared to the 9 and 10 gate delay
for C16 and S15 respectively in cascaded four bit carry-Lookahead adder blocks. Similarly, in 32
bit adder, 7 and 10 gate delays are required by C32 and S31 which are less compared to 18 and
17 gate delays for the same outputs if the 32 bit adder is implemented by eight 4 bit adders.