Tutorial 5 (BE19F06F018)
Tutorial 5 (BE19F06F018)
Ans:
1.Booth’s multiplication algorithm is a multiplication algorithm that
multiplies two signed binary numbers in two’s complement notation.
2. The algorithm was invented by Andrew Donald Booth in 1950 while
doing research on crystallography at Birkbeck College in
Bloomsbury,London.
3.Booth algorithm gives a procedure for multiplying binary integers in
signed 2’s complement representation in an 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.
4.As in all multiplication schemes, booth algorithm requires examination
of the multiplier bits and shifting of the partial product. Prior to the
shifting, the multiplicand may be added to the partial product, subtracted
from the partial product, or left unchanged according to following rules:
1. The multiplicand is subtracted from the partial product upon
encountering the first least significant 1 in a string of 1’s in the
multiplier
2. The multiplicand is added to the partial product upon
encountering the first 0 (provided that there was a previous ‘1’)
in a string of 0’s in the multiplier.
3. The partial product does not change when the multiplier bit is
identical to the previous multiplier bit.
Booth’s Algorithm
Ans:
Step-1 :
Set up the problem with long division bracket. Put dividend inside bracket and
divisor on outside left.
100 1 0 1 0 1
Step-2 :
100 goes into 101 (1-times). Put a 1 in the next place of quotient and multiply
100 by 1 to get 100.
100 1 0 1 0 1
− 1 0 0 =100 × 1
Step-3 :
100 1 0 1 0 1
− 1 0 0 =100 × 1
1 0
Step-4 :
100 goes into 10 (0-times). Put a 0 in the next place of quotient and multiply
100 by 0 to get 0.
1 0
100 1 0 1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0
Step-5 :
1 0
100 1 0 1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
Step-6 :
100 goes into 101 (1-times). Put a 1 in the next place of quotient and multiply
100 by 1 to get 100.
1 0 1
100 1 0 1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
Step-7 :
1 0 1
100 1 0 1 0 1 .0
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
1 0
Step-8 :
100 goes into 10 (0-times). Put a 0 in the next place of quotient and multiply
100 by 0 to get 0.
100 1 0 1 0 1 .0
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0
Step-9 :
1 0 1 0
100 1 0 1 0 1 .0 0
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 0
Step-10 :
100 goes into 100 (1-times). Put a 1 in the next place of quotient and multiply
100 by 1 to get 100.
1 0 1 0 1
100 1 0 1 0 1 .0 0
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 0
− 1 0 0 =100 × 1
1 0 1 .0 1
100 1 0 1 0 1 .0 0
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 1
− 1 0 0 =100 × 1
1 0
− 0 =100 × 0
1 0 0
− 1 0 0 =100 × 1
0
∴ 10101 ÷ 100= 101.01
a. (-10)+(-13)
1 0 1 1 0 (-10)
+ 1 0 0 1 1 (-13)
____________
01001
Overflow
b. (-10)-(+4)
1 0 1 1 0 (-10)
- 1 1 1 0 0 (+4)
____________
1 0 0 1 0(-14)
No overflow
c. (-3)+(-8)
1 1 1 0 1 (-3)
+ 1 1 0 0 0 (-8)
____________
1 0 1 0 1 (-11)
No overflow
d. (-10)+(+7)
1 0 1 1 0 (-10)
- 1 1 0 0 1 (+7)
____________
01111
overflow
Ans:
Algorithm for Restoring Division:
• Register M <-----Divisor
• Register Q <-----Dividend
• Register AC <----- 0
• Register C <------ 0(1-bit carry register)
• Count <------ n(size of the register)
• Shift C,AC,Q left by 1 bit.
• AC<-AC-M
• If the sign of AC is negative(C=1),set Qo to 0 and add M back to AC
• Otherwise set Qo to 1