Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary Adder DesignSpring 2003 1 Binary Adders. Binary Adder DesignSpring 2003 2 n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead.

Similar presentations


Presentation on theme: "Binary Adder DesignSpring 2003 1 Binary Adders. Binary Adder DesignSpring 2003 2 n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead."— Presentation transcript:

1 Binary Adder DesignSpring 2003 1 Binary Adders

2 Binary Adder DesignSpring 2003 2 n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead Adder)

3 Binary Adder DesignSpring 2003 3 Ripple Carry Adder

4 Binary Adder DesignSpring 2003 4 Ripple Carry Adder

5 Binary Adder DesignSpring 2003 5 Ripple Carry Adder

6 Binary Adder DesignSpring 2003 6 Ripple Carry Adder

7 Binary Adder DesignSpring 2003 7 Ripple Carry Adder

8 Binary Adder DesignSpring 2003 8 Ripple Carry Adder

9 Binary Adder DesignSpring 2003 9 Ripple Carry Adder

10 Binary Adder DesignSpring 2003 10 Ripple Carry Adder

11 Binary Adder DesignSpring 2003 11 Ripple Carry Adder

12 Binary Adder DesignSpring 2003 12 Ripple Carry Adder

13 Binary Adder DesignSpring 2003 13 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

14 Binary Adder DesignSpring 2003 14 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

15 Binary Adder DesignSpring 2003 15 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

16 Binary Adder DesignSpring 2003 16 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

17 Binary Adder DesignSpring 2003 17 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

18 Binary Adder DesignSpring 2003 18 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

19 Binary Adder DesignSpring 2003 19 Conditional Sum Adder Main principle: pre-computing upper sums for the cases: c[k]=1 and c[k]=0 Assume n is power of 2:

20 Binary Adder DesignSpring 2003 20 Conditional Sum Adder

21 Binary Adder DesignSpring 2003 21 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

22 Binary Adder DesignSpring 2003 22 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

23 Binary Adder DesignSpring 2003 23 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

24 Binary Adder DesignSpring 2003 24 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

25 Binary Adder DesignSpring 2003 25 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

26 Binary Adder DesignSpring 2003 26 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

27 Binary Adder DesignSpring 2003 27 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

28 Binary Adder DesignSpring 2003 28 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

29 Binary Adder DesignSpring 2003 29 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

30 Binary Adder DesignSpring 2003 30 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

31 Binary Adder DesignSpring 2003 31 Conditional Sum Adder full adder implements adder for n=1: CSA(1) = FA !!!!

32 Binary Adder DesignSpring 2003 32 Carry Lookahead Adder Main principle: combine carry computations of substrings Carry into bit position i: c[i] is computed from bits: a[i-1:0],b[i-1:0], cin condition:

33 Binary Adder DesignSpring 2003 33 Carry Lookahead Adder Main principle: combine carry computations of substrings Carry into bit position i: c[i] is computed from bits: a[i-1:0],b[i-1:0], cin condition: Definition propagate signals: Definition generate signals:

34 Binary Adder DesignSpring 2003 34 Carry Lookahead Adder Definition propagate signals: Definition generate signals: for i>0: for i=0: relation to carries: Computation of the signals, : for i>0: for i=0:

35 Binary Adder DesignSpring 2003 35 Carry Lookahead Adder Combination of carry and propagate signals:

36 Binary Adder DesignSpring 2003 36 Carry Lookahead Adder Combination of carry and propagate signals:

37 Binary Adder DesignSpring 2003 37 Carry Lookahead Adder Combination of carry and propagate signals:

38 Binary Adder DesignSpring 2003 38 Carry Lookahead Adder Combination of carry and propagate signals: Given two such pairs of generate and propagate signals and we define the operation :

39 Binary Adder DesignSpring 2003 39 Carry Lookahead Adder Carry computation based on computation of generate and propagate signals:

40 Binary Adder DesignSpring 2003 40 Carry Lookahead Adder Carry computation based on computation of generate and propagate signals:

41 Binary Adder DesignSpring 2003 41 Carry Lookahead Adder

42 Binary Adder DesignSpring 2003 42 Carry Lookahead Adder

43 Binary Adder DesignSpring 2003 43 Carry Lookahead Adder

44 Binary Adder DesignSpring 2003 44 Carry Lookahead Adder

45 Binary Adder DesignSpring 2003 45 Carry Lookahead Adder

46 Binary Adder DesignSpring 2003 46 Carry Lookahead Adder

47 Binary Adder DesignSpring 2003 47 Carry Lookahead Adder

48 Binary Adder DesignSpring 2003 48 Carry Lookahead Adder

49 Binary Adder DesignSpring 2003 49 Carry Lookahead Adder

50 Binary Adder DesignSpring 2003 50 Carry Lookahead Adder

51 Binary Adder DesignSpring 2003 51 Carry Lookahead Adder

52 Binary Adder DesignSpring 2003 52 Carry Lookahead Adder

53 Binary Adder DesignSpring 2003 53 Carry Lookahead Adder

54 Binary Adder DesignSpring 2003 54 Carry Lookahead Adder Structure Implementation using Parallel Prefix Computation

55 Binary Adder DesignSpring 2003 55 Parallel Prefix Computation For associative operation o, we define Parallel Prefix Operation: n-bit INPUT: n-bit OUTPUT: Compute the operation o on all prefixes of X[n:1]

56 Binary Adder DesignSpring 2003 56 Carry Lookahead Adder Parallel Prefix Computation: n=1:n=2^k:

57 Binary Adder DesignSpring 2003 57 Carry Lookahead Adder Parallel Prefix Computation:

58 Binary Adder DesignSpring 2003 58 Carry Lookahead Adder Parallel Prefix Computation:

59 Binary Adder DesignSpring 2003 59 Carry Lookahead Adder Parallel Prefix Computation:

60 Binary Adder DesignSpring 2003 60 Carry Lookahead Adder Parallel Prefix Computation:

61 Binary Adder DesignSpring 2003 61 Carry Lookahead Adder

62 Binary Adder DesignSpring 2003 62 Carry Lookahead Adder

63 Binary Adder DesignSpring 2003 63 Carry Lookahead Adder

64 Binary Adder DesignSpring 2003 64 Carry Lookahead Adder cost:

65 Binary Adder DesignSpring 2003 65 Carry Lookahead Adder delay:

66 Binary Adder DesignSpring 2003 66 Carry Lookahead Adder Example for n=8 –design –computation of 183+43

67 Binary Adder DesignSpring 2003 67 Carry Lookahead Adder

68 Binary Adder DesignSpring 2003 68 Carry Lookahead Adder

69 Binary Adder DesignSpring 2003 69 Carry Lookahead Adder

70 Binary Adder DesignSpring 2003 70 Carry Lookahead Adder

71 Binary Adder DesignSpring 2003 71 Carry Lookahead Adder

72 Binary Adder DesignSpring 2003 72 Carry Lookahead Adder

73 Binary Adder DesignSpring 2003 73 Carry Lookahead Adder

74 Binary Adder DesignSpring 2003 74 Carry Lookahead Adder

75 Binary Adder DesignSpring 2003 75 Carry Lookahead Adder

76 Binary Adder DesignSpring 2003 76 Carry Lookahead Adder

77 Binary Adder DesignSpring 2003 77 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

78 Binary Adder DesignSpring 2003 78 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

79 Binary Adder DesignSpring 2003 79 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

80 Binary Adder DesignSpring 2003 80 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

81 Binary Adder DesignSpring 2003 81 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1):

82 Binary Adder DesignSpring 2003 82 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1): assumption: add/sub result is representable with n bits

83 Binary Adder DesignSpring 2003 83 Addition/Substraction Addition and Subtration for n-bit two’s complement inputs –bit op signals the case of subtraction (op=1): assumption: add/sub result is representable with n bits Detection of the case that the result can not be represented with n bits (overflow)

84 Binary Adder DesignSpring 2003 84 Overflow Overflow: result too large for finite computer word –e.g., adding two n-bit numbers does not yield an n-bit number 0111 + 0001 note that overflow term is somewhat misleading, 1000 it does not mean a carry “overflowed” Detecting Overflow –No overflow when adding a positive and a negative number –No overflow when signs are the same for subtraction –Overflow occurs when the value affects the sign: overflow when adding two positives yields a negative or, adding two negatives gives a positive or, subtract a negative from a positive and get a negative or, subtract a positive from a negative and get a positive –Consider the operations A + B, and A – B Can overflow occur if B is 0 ? Can overflow occur if A is 0 ?

85 Binary Adder DesignSpring 2003 85 Effects of Overflow An exception (interrupt) occurs –Control jumps to predefined address for exception –Interrupted address is saved for possible resumption Details based on software system / language –example: flight control vs. homework assignment correct sign has to be computed even for overflows –branches should also work correctly after overflows –neg signal:

86 Binary Adder DesignSpring 2003 86 Overflow & Sign Overflow detection:

87 Binary Adder DesignSpring 2003 87 Overflow & Sign Overflow detection:

88 Binary Adder DesignSpring 2003 88 Overflow & Sign Overflow detection:

89 Binary Adder DesignSpring 2003 89 Overflow & Sign Overflow detection:

90 Binary Adder DesignSpring 2003 90 Overflow & Sign Overflow detection:

91 Binary Adder DesignSpring 2003 91 Overflow & Sign Overflow detection:

92 Binary Adder DesignSpring 2003 92 Overflow & Sign Overflow detection:

93 Binary Adder DesignSpring 2003 93 Overflow & Sign Overflow detection:

94 Binary Adder DesignSpring 2003 94 Overflow & Sign Sign condition:

95 Binary Adder DesignSpring 2003 95 Overflow & Sign Sign condition: consider sign extended sum:

96 Binary Adder DesignSpring 2003 96 Overflow & Sign Sign condition: consider sign extended sum: sign computation:

97 Binary Adder DesignSpring 2003 97 Overflow & Sign Sign condition: consider sign extended sum: sign computation:

98 Binary Adder DesignSpring 2003 98 Overflow & Sign Sign condition: consider sign extended sum: sign computation:

99 Binary Adder DesignSpring 2003 99 Overflow & Sign Sign condition: consider sign extended sum: sign computation:

100 Binary Adder DesignSpring 2003 100 Design of an Add/Subtract Unit

101 Binary Adder DesignSpring 2003 101 Design of an Add/Subtract Unit

102 Binary Adder DesignSpring 2003 102 Design of an Add/Subtract Unit

103 Binary Adder DesignSpring 2003 103 Design of an Add/Subtract Unit

104 Binary Adder DesignSpring 2003 104 Design of an Add/Subtract Unit

105 Binary Adder DesignSpring 2003 105 Design of an Add/Subtract Unit


Download ppt "Binary Adder DesignSpring 2003 1 Binary Adders. Binary Adder DesignSpring 2003 2 n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead."

Similar presentations


Ads by Google