Org3 - Arithmetic Chapter 3 Computer Organization and...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
    Arithmetic Chapter 3 Computer Organization and Design
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Addition Addition is similar to decimals   0000 0111 + 0000 0101 = 0000 1100 Subtraction (negate)   0000 0111 + 1111 1011 = 0000 0010
Background image of page 2
    Over(under)flow For signed addition If signs are the same It has to agree with the arguments If signs different There can be no over(under)flow.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Over(under)flow For signed subtraction If signs are the same There can be no over(under)flow If signs are different It has to match the subtractant (zero?)
Background image of page 4
    Over(under)flow For unsigned addition If result smaller than the argument, it is overflow For unsigned subtraction If the result is greater than the subtractant it is overflow
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    In practice. .. MIPS signed ops can cause overflow Causes exception and saves the offending instruction in  Exception PC (mfc0) Unsigned ops will not cause C ignores integer overflows.
Background image of page 6
    Multimedia Operations Operations like MMX, SSE, etc Graphics and image processing often work with 8  or 16 bits Treat a 32-bit register as 4 8-bit registers or 2 16  bits registers. Break the carry chain
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Multiplication          1000        x 1001          1000         0000        0000       1000 =     1001000
Background image of page 8
    Hardware Multiplicant Product Multiplier Control Adder
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Can we speed up? All operations could be done in parallel Have a cascade of adders and add them all Gate delays will be a problem Have a tree of additions Logarithmic time Use carry save adders
Background image of page 10
    Cascade of Adders Adder Adder Adder multiplicant multiplier &
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Tree of Adders Adder Adder Adder mplier2*mcant mplier1*mcant mplier0*mcant mplier3*mcant Pr0 Pr1 Pr6-2 Pr7
Background image of page 12
    Division unsigned long int rem, ldvsr; int i; rem   = divident; ldvsr = ((long)divisor)<<31; quot = 0; for (i=1; i<32; i++){   quot = quot<<1;   if (rem>=ldvsr){     rem-=ldvsr;     quot+=1;   } }
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Doing it faster Hard! The reason is that we do not know the reminder in 
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2012 for the course CSE 1720 taught by Professor Baljko during the Winter '12 term at York University.

Page1 / 36

Org3 - Arithmetic Chapter 3 Computer Organization and...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online