














































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various division algorithms used in computer arithmetic, including restoring and nonrestoring division, radix-2 srt division, and modular dividers. It also discusses the design of quotient digit selection logic and convergence in division. These methods are essential for digital arithmetic operations in computer architecture and numerical analysis.
Typology: Study notes
1 / 86
This page cannot be seen from the preview
Don't miss anything!















































































May 2007^
Computer Arithmetic, Division
Number Representation
Numbers and ArithmeticRepresenting Signed NumbersRedundant Number SystemsResidue Number Systems Addition / Subtraction
Basic Addition and CountingCarry-Lookahead AddersVariations in Fast AddersMultioperand Addition Multiplication
Basic Multiplication SchemesHigh-Radix MultipliersTree and Array MultipliersVariations in Multipliers Division
Basic Division SchemesHigh-Radix DividersVariations in DividersDivision by Convergence Real Arithmetic
Floating-Point ReperesentationsFloating-Point OperationsErrors and Error ControlPrecise and Certifiable Arithmetic Function Evaluation
Square-Rooting MethodsThe CORDIC AlgorithmsVariations in Function EvaluationArithmetic by Table Lookup Implementation Topics
High-Throughput ArithmeticLow-Power ArithmeticFault-Tolerant ArithmeticPast, Present, and Future Parts^
Chapters I. II. III. IV. V. VI. VII.
1.2.3.4. 5.6.7.8. 9.10.11.12. 13.14.15.16. 17.18.19.20. 21.22.23.24. 25.26.27.28. Elementary Operations
May 2007^
Computer Arithmetic, Division About This Presentation
Released^
Revised^
Revised^
Revised^
Revised
First^
Jan. 2000^
Sep. 2001^
Sep. 2003^
Oct. 2005^
May 2007
May 2007^
Computer Arithmetic, Division
Be fruitful and multiply...
Now, divide.
May 2007^
Computer Arithmetic, Division 13 Basic Division Schemes Chapter Goals^ Study shift/subtract or bit-at-a-time dividersand set the stage for faster methods andvariations to be covered in Chapters 14-16 Chapter Highlights^ Shift/subtract divide vs shift/add multiplyHardware, firmware, software algorithmsDividing 2’s-complement numbersThe special case of a constant divisor
May 2007^
Computer Arithmetic, Division
13.1 Shift/Subtract Division Algorithms Notation for our discussion of division algorithms:^ z^
May 2007^
Computer Arithmetic, Division
Slide 8
q z s Divisor d
q
-^3^ q^ –^2^ q^ –^1^ q^ –^0
May 2007^
Computer Arithmetic, Division
Integer division
Fractional division
======================
z^
z frac^
42 d^
d. 1 0 1 0frac^
======================
(0)^ s
(0)^ s
(0)^2 s 0 1 1 1 0 1 0 1
2 s
(^4) – q 2 d^ 3 1 0 1 0^ { q^3
= 1}^ – q
d^. 1 0 1 0–
{ q =1}–
(1)^ s
(1) s
(1)^2 s 0 1 0 0 1 0 1
(1)^ s 0. 1 0 0 1 0 1 (^4) – q 2 d^ 2 0 0 0 0^ { q^2
= 0}^ – q
d^. 0 0 0 0–
{ q =0}–
(2)^ s
(2)^ s. 1 0 0 1 0 1 (2)^2 s 1 0 0 1 0 1
(2)^2 s 1. 0 0 1 0 1 (^4) – q 2 d^ 1 1 0 1 0^ { q^1
= 1}^ – q
d^. 1 0 1 0–
{ q =1}–
(3)^ s
(3)^ s. 1 0 0 0 1 (3)^2 s 1 0 0 0 1
(3)^2 s 1. 0 0 0 1 (^4) – q 2 d^ 0 1 0 1 0^ { q^0
= 1}^ – q
d^. 1 0 1 0–
{ q =1}–
(4)^ s
(4)^ s. 0 1 1 1
s^
s 0. 0 0 0 0 0 1 1 1frac^
q^
q. 1 0 1 1frac^
======================
May 2007^
Computer Arithmetic, Division 13.2 Programmed Division^ Rs^ Fig. 13.3^ Register usage for programmed division.
Rq Rd
0 0^...^
0 0 0 0 k 2 d
CarryFlag
Shifted PartialRemainder
Shifted PartialQuotient Partial Remainder(2k – j Bits)
Partial Quotient(j Bits)
Nextquotientdigitinsertedhere
Divisor d
May 2007^
Computer Arithmetic, Division
May 2007^
Computer Arithmetic, Division 13.3 Restoring Hardware Dividers^ Fig. 13.^
Quotient^ q Partial remainder 0 1 Mux^ Adder c out
s^ (initial value
z ) Divisor^ d
Shift^ Load ( j ) Shift^1 c in
qk – j Quotientdigitselector MSB of( j –1) 2 s k k k Trial difference
May 2007^
Computer Arithmetic, Division
======================= z^
42 d^^0
(^4) –2 d^^1
=======================(0)^ s^0
(0)^2 s^0
(^4) +(–2 d )^1
––––––––––––––––––––––––(1)^ s^0
Positive, so set
q = 1^3
(1)^2 s^0
(^4) +(–2 d )^1
––––––––––––––––––––––––(2)^ s^1
Negative, so set
q = 0^2
(2)^ (1)^ s =2 s^0
and restore (2)^2 s^1
(^4) +(–2 d )^1
––––––––––––––––––––––––(3)^ s^0
Positive, so set
q = 1^1
(3)^2 s^1
(^4) +(–2 d )^1
––––––––––––––––––––––––(4)^ s^0
Positive, so set
q = 1^0
s^
q^
two
May 2007^
Computer Arithmetic, Division
Slide 17
13.4 Nonrestoring and Signed Division The cycle time in restoring division must accommodate:Shifting the registersAllowing signals to propagate through the adderDetermining and storing the next quotient digitStoring the trial difference, if required
Quotient^ q Partial remainder^ s^ (initial value 0 1 Mux^ Adder c out
z ) Divisor^ d
Shift^ Load ( j ) Shift^1 c in qk – j Quotient MSB ofdigit( j –1) 2 s selector k^ k k Trial difference
May 2007^
Computer Arithmetic, Division
Slide 19
======================= z^
42 d^^0
(^4) –2 d^^1
=======================(0)^ s^0
(0)^2 s^0
Positive, (^4) +(–2 d )^1
so subtract
––––––––––––––––––––––––(1)^ s^0
(1)^2 s^0
Positive, so set
q = 1^3
(^4) +(–2 d )^1
and subtract
––––––––––––––––––––––––(2)^ s^1
(2)^2 s^1
Negative, so set
q = 0^2
(^4) +2 d^^0
and add
––––––––––––––––––––––––(3)^ s^0
(3)^2 s^1
Positive, so set
q = 1^1
(^4) +(–2 d )^1
and subtract
––––––––––––––––––––––––(4)^ s^0
Positive, so set
q = 1^0
s^
q^
No overflow: (0111)
< (1010)two^
two
May 2007^
Computer Arithmetic, Division
Slide 20
(^300234200117100740) –
(^296148136) – 272 112 (0) s (1)s
(3)s (^) (2)s (4)s =16s ×^2 × 2 – ×^2 –160 × 2 –
(^148) (a) Restoring (^300234200117100740) –
148136 –12^ –
272 112 (0) s (1)s
(3)s (^) (2)s (4)s =16s ×^2 –160 ×^2
×^2 ×^2 –
–160 + Partial remainder
(b) Nonrestoring
two
ten