0% found this document useful (0 votes)
58 views

Module 2 AnimatedDataRepCompArith Bhanu Chander

The document discusses different methods for fixed point division operations in computers, including restoring division, non-restoring division, and Booth's algorithm for multiplication. It describes restoring division as needing to restore the register after subtraction if negative, while non-restoring division avoids this by adding or subtracting depending on the sign. Booth's algorithm allows multiplying two signed binary numbers by considering adjacent bits of the multiplier and adding or subtracting the multiplicand.

Uploaded by

Avv Reddy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Module 2 AnimatedDataRepCompArith Bhanu Chander

The document discusses different methods for fixed point division operations in computers, including restoring division, non-restoring division, and Booth's algorithm for multiplication. It describes restoring division as needing to restore the register after subtraction if negative, while non-restoring division avoids this by adding or subtracting depending on the sign. Booth's algorithm allows multiplying two signed binary numbers by considering adjacent bits of the multiplier and adding or subtracting the multiplicand.

Uploaded by

Avv Reddy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Module 2

Data Representation And


Computer Arithmetic

Dr. B. Bhanu Chander


Sr. Assistant Professor, SCOPE, VIT Chennai
Outline:
 Fixed Point Division Operation:
● Restoring Division
● Non-Restoring Division
Integer Division Operation
 Division is more complex than multiplication
 It involves repetitive shifting and addition or subtraction
 In integer division operation, a divisor M and a dividend D are given.
 We need to find quotient Q and remainder R.
 The relationship between the components is given by,

D=Q*M+R
Simple Integer Division: Pencil-Paper Method

Let,
Dividend, D=1000011
Divisor, M=1001
Fixed Point Division

 Restoring Division
 Non-Restoring Division
Restoring Division Algorithm
Restoring Division Flowchart
Q=7=0111
M=3=0011

Solution:
Quotient =0010=2
Remainder=0001=1
Non-restoring Division
Modifying the basic division algorithm by eliminating restoring step is
non-restoring division

Algorithm
1. Start by initializing register A to 0 and repeat steps (2-4) n times
2. If A is positive,
2.1 Shift A and Q left by one bit position
2.2 Subtract M from A
3. If A is negative
3.1 Shift A and Q left by one bit position
3.2 Add M to A
4. If A is positive, set Q0 to 1, else Q0 to 0
5. If A is negative, add M to A as a final corrective step
Non-Restoring Division
Flowchart
Q=7=0111
M=3=0011

Solution:
Quotient =0010=2
Remainder=0001=1
Restoring Division Non-Restoring Division

Needs restoring of register A if resultant of subtraction Doesn't need restoring


is negative

In each cycle content of register A is first shifted left In each cycle content of register A is first shifted left
and then divisor is subtracted from it. and then divisor is added or subtracted with A
depending on the sign of A

Does not need restoring of remainder Needs restoring of remainder if it is negative

Slower algorithm Faster than restoring method


Booth’s Algorithm
 Booth's algorithm is a multiplication algorithm that multiplies two
signed binary numbers in 2's compliment notation.
Procedure:
1. Let M be the multiplicand and Q be the multiplier
2. Consider a 1-bit register Q-1 and initialize it to 0
3. Consider a register A and initialize it to 0
Steps for Booth’s Algorithm
 If Q0 and Q-1 are same i.e. 00 or 11 then perform right shift by 1 bit
 If Q0 and Q-1 is 10, then perform A=A-M and perform right shift by
1 bit
 If Q0 and Q-1 is 01, then perform A=A+M and perform right shift by
1 bit
Multiplicand M
Multiplier Q

Initialize A
and Q-1 to 0

10
01 Q0 Q-1

00 or 11
A=A+M A=A-M

ashr A, Q and
count = count-1

No
Count=0

Yes

End
Modified Booth’s Algorithm

You might also like