0% found this document useful (0 votes)
140 views12 pages

Tutorial 5 (BE19F06F018)

The document provides information about Booth's algorithm and restoring division algorithm. It explains: 1) Booth's algorithm is a method to efficiently multiply two signed binary numbers in two's complement notation. It is demonstrated by multiplying +13 and -6. 2) Restoring division algorithm is demonstrated by dividing 10101 by 100 using long division steps. 3) 2's complement arithmetic is used to perform addition and subtraction on signed 5-bit numbers, indicating in each case if overflow occurs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views12 pages

Tutorial 5 (BE19F06F018)

The document provides information about Booth's algorithm and restoring division algorithm. It explains: 1) Booth's algorithm is a method to efficiently multiply two signed binary numbers in two's complement notation. It is demonstrated by multiplying +13 and -6. 2) Restoring division algorithm is demonstrated by dividing 10101 by 100 using long division steps. 3) 2's complement arithmetic is used to perform addition and subtraction on signed 5-bit numbers, indicating in each case if overflow occurs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

TUTORIAL - 5

1.Explain Booth’s algorithm.Apply Booth’s algorithm to multiply the


signed numbers +13 and -6.

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

Booth’s algorithm to multiply the signed numbers +13 and -6:


->
Step 1: We will consider Q=Multiplier and M=Multiplicand. In our
example let us consider Q=-6 and M=+13.

Step 2: Convert the Multiplier and Multiplicand to its binary numbers. To


convert negative numbers, we use the rule — First Convert the Number
without the negative sign to its binary term, Second Find the complement
term and add 1 with it and Third to represent negative term add an extra 1
before the added value you have got in the second step.
So for +13 it’s binary value with sign bit will be 01101 and for -6 it will be
11010.
Step 3: Now, by recoding the value of multiplier we get 11010 as 0 -1 1
-1 0

Step 4:Now multiplying this recoded value(0 -1 1 -1 0) with multiplicand


(0 1 1 0 1) we get 1 1 1 0 1 1 0 0 1 0 i.e (-78)

2.Given A=10101 and B=00100 perform A/B using restoring division


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.

Subtract 100 from 101 to get remainder (101-100=1).

100 1 0 1 0 1
− 1 0 0 =100 × 1

Step-3 :

Now, bring down 0 from the dividend, to make 10

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.

Subtract 0 from 10 to get remainder (10-0=10).

1 0

100 1 0 1 0 1

− 1 0 0 =100 × 1

1 0

− 0 =100 × 0
1 0

Step-5 :

Now, bring down 1 from the dividend, to make 101

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.

Subtract 100 from 101 to get remainder (101-100=1).

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 :

Now, bring down 0 from the dividend, to make 10

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.

Subtract 0 from 10 to get remainder (10-0=10).


1 0 1 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 :

Now, bring down 0 from the dividend, to make 100

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.

Subtract 100 from 100 to get remainder (100-100=0).

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

3.Perform the following operations on the 5 bit signed numbers


using 2’s complement representation system.Also indicate whether
overflow has occurred.

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

4.With figure explain circuit arrangements for binary division.

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

Hardware Implementation of binary division


• An n-bit positive divisor is loaded into register M
• An n-bit positive dividend is loaded into register Q
• Register AC(A) is Set to 0
• Initial carry C is set to 0
• After the division is complete, the n-bit quotient is in register Q and the
remainder is in register AC

Non-restoring Division Technique


• It avoiding restoring after unsuccessful subtraction ,that is result of
substation is negative
• Step1: if the sign of AC is positive (C=0),then shift C,AC and Q left one
bit position and subtract M from AC
Else shift C,AC and Q left one bit position and add M to AC
If the sign of AC is positive then
Set q0 to 1
Else Set q0 to 0

Non-restoring Division Technique


• Step 2: If the sign of AC is negative then add M to AC
• Step 2 is needed to leave the proper positive reminder in Ac at the end
of n cycles

You might also like