DOC PREVIEW
MASON ECE 645 - Lecture 9 Basic Dividers

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

11Basic DividersLecture 92Required ReadingParhami,Chapter 13 Basic Division Schemes23Notationz Dividend z2k-1z2k-2. . . z2z1z0d Divisor dk-1dk-2. . . d1d0q Quotient qk-1qk-2. . . q1q0s Remainder sk-1sk-2. . . s1s0(s = z - dq)4Basic Equations of Divisionz = d q + ssign(s) = sign(z)| s | < | d |z > 00  s < | d |z < 0- | d | < s  035Unsigned Integer Division Overflowz = zH2k+ zL< d 2kCondition for no overflow:z = q d + s < (2k-1) d + d = d 2kzH< d6Sequential Integer DivisionBasic Equationss(0)= zs(j)= 2 s(j-1)- qk-j(2kd)s(k)= 2ks47Sequential Integer DivisionJustifications(1)= 2 z - qk-1(2kd)s(2)= 2(2 z - qk-1(2kd)) - qk-2(2kd)s(3)= 2(2(2 z - qk-1(2kd)) - qk-2(2kd)) - qk-3(2kd). . . . . .s(k)= 2(. . . 2(2(2 z - qk-1(2kd)) - qk-2(2kd)) - qk-3(2kd) . . .- q0(2kd) == 2kz - (2kd) (qk-12k-1+ qk-22k-2+ qk-32k-3+ … + q020) == 2kz - (2kd) q = 2k(z - d q) = 2ks8Fig. 13.2 Examples of sequential division with integerand fractional operands.59Unsigned Fractional DivisionzfracDividend .z-1z-2. . . z-(2k-1)z-2kdfracDivisor .d-1d-2. . . d-(k-1)d-kqfracQuotient .q-1q-2. . . q-(k-1)q-ksfracRemainder .000…0s-(k+1). . . s-(2k-1)s-2kk bits10Integer vs. Fractional DivisionFor Integers:z = q d + s 2-2kz 2-2k= (q 2-k) (d 2-k) + s (2-2k)zfrac= qfracdfrac+ sfracFor Fractions:wherezfrac= z 2-2kdfrac= d 2-kqfrac= q 2-ksfrac= s 2-2k611Unsigned Fractional Division OverflowCondition for no overflow:zfrac< dfrac12Sequential Fractional DivisionBasic Equationss(0)= zfracs(j)= 2 s(j-1)- q-jdfrac2k· sfrac= s(k)sfrac= 2-k· s(k)713Sequential Fractional DivisionJustifications(1)= 2 zfrac- q-1dfracs(2)= 2(2 zfrac- q-1dfrac) - q-2dfracs(3)= 2(2(2 zfrac- q-1dfrac) - q-2dfrac) - q-3dfrac. . . . . .s(k)= 2(. . . 2(2(2 zfrac- q-1dfrac) - q-2dfrac) - q-3dfrac. . .- q-kdfrac== 2kzfrac- dfrac(q-12k-1+ q-22k-2+ q-32k-3+ … + q-k20) == 2kzfrac- dfrac2k(q-12-1+ q-22-2+ q-32-3+ … + q-k2-k) == 2kzfrac- (2kdfrac) qfrac= 2k(zfrac- dfracqfrac) = 2ksfrac14Restoring Unsigned Integer Divisions(0)= zfor j = 1 to kif 2 s(j-1)- 2kd > 0qk-j= 1s(j)= 2 s(j-1)- 2kdelseqk-j= 0s(j)= 2 s(j-1)815Fig. 13.5 Shift/subtract sequential restoring divider.16Fig. 13.6 Example of restoring unsigned division.917Restoring Signed Integer Divisionzd| z | | d | sign(z) sign(d)| q | | s |sign(s) = sign(z)sign(q) =+-Unsigneddivisionsign(z) = sign(d)sign(z)  sign(d)q s18Non-Restoring Unsigned Integer Divisions(1)= z-24dfor j = 2 to kif s(j-1) 0qk-(j-1)= 1s(j)= 2 s(j-1)- 2kdelseqk-(j-1)= 0s(j)= 2 s(j-1)+ 2kdend forif s(k) 0q0= 1elseq0= 0if s(k)< 0Correction step1019Fig. 13.7 Example of nonrestoring unsigned division.20Fig. 13.8 Partial remainder variations for restoring andnonrestoring division.1121s(j)= 2 s(j-1)s(j+1)= 2 s(j)- 2kd == 4 s(j-1)- 2kds(j)= 2 s(j-1)- 2kds(j+1)= 2 s(j)+ 2kd == 2 (2 s(j-1)- 2kd)+ 2kd == 4 s(j-1)- 2kdRestoring divisionNon-Restoring divisionNon-Restoring Unsigned Integer DivisionJustification22Non-Restoring Signed Integer DivisionCorrection stepz = q d + sz = (q-1) d + (s+d)z = q’ d + s’z = (q+1) d + (s-d)z = q” d + s”1223Fig. 13.10 Shift-subtract sequential nonrestoring divider.24Non-Restoring Signed Integer Divisions(0)= zfor j = 1 to kif sign(s(j-1)) == sign(d)qk-j= 1s(j)= 2 s(j-1)- 2kd = 2 s(j-1)- qk-j(2kd)elseqk-j= -1s(j)= 2 s(j-1)+ 2kd = 2 s(j-1)- qk-j(2kd)Correction_stepq = BSD_2’s_comp_conversion(q);1325Fig. 13.9 Example of nonrestoring signed division.26BSD  2’s Complement Conversionq = (qk-1qk-2. . . q1q0)BSD== (pk-1pk-2. . . p1p01)2’s complementwherepiqi-1 011Example:1 -1 1 1qBSDpq2’scomp1 0 1 10 0 1 1 1 = 0 1 1 1no overflow if pk-2= pk-1(qk-1


View Full Document

MASON ECE 645 - Lecture 9 Basic Dividers

Documents in this Course
Load more
Download Lecture 9 Basic Dividers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 9 Basic Dividers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 9 Basic Dividers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?