Binary Adders - PowerPoint PPT Presentation

1 / 105
About This Presentation
Title:

Binary Adders

Description:

Binary Adders n-bit Addition Ripple Carry Adder Conditional Sum Adder (Carry Lookahead Adder) Ripple Carry Adder Ripple Carry Adder Ripple Carry Adder Ripple Carry ... – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 106
Provided by: PeterM204
Category:

less

Transcript and Presenter's Notes

Title: Binary Adders


1
Binary Adders

2
n-bit Addition
  • Ripple Carry Adder
  • Conditional Sum Adder
  • (Carry Lookahead Adder)

3
Ripple Carry Adder

4
Ripple Carry Adder

5
Ripple Carry Adder

6
Ripple Carry Adder

7
Ripple Carry Adder

8
Ripple Carry Adder

9
Ripple Carry Adder

10
Ripple Carry Adder

11
Ripple Carry Adder

12
Ripple Carry Adder

13
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

14
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

15
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

16
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

17
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

18
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

19
Conditional Sum Adder
  • Main principle pre-computing upper sums for the
    cases ck1 and ck0
  • Assume n is power of 2

20
Conditional Sum Adder
21
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

22
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

23
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

24
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

25
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

26
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

27
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

28
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

29
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

30
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

31
Conditional Sum Adder
  • full adder implements adder for n1 CSA(1)
    FA !!!!

32
Carry Lookahead Adder
  • Main principle combine carry computations of
    substrings
  • Carry into bit position i ci is computed from
    bits ai-10,bi-10, cin
  • condition

33
Carry Lookahead Adder
  • Main principle combine carry computations of
    substrings
  • Carry into bit position i ci is computed from
    bits ai-10,bi-10, cin
  • condition
  • Definition propagate signals
  • Definition generate signals

34
Carry Lookahead Adder
  • Definition propagate signals
  • Definition generate signals
  • for igt0
  • for i0
  • relation to carries
  • Computation of the signals ,
  • for igt0
  • for i0

35
Carry Lookahead Adder
  • Combination of carry and propagate signals

36
Carry Lookahead Adder
  • Combination of carry and propagate signals

37
Carry Lookahead Adder
  • Combination of carry and propagate signals

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
Carry Lookahead Adder
  • Carry computation based on computation of
    generate and propagate signals

40
Carry Lookahead Adder
  • Carry computation based on computation of
    generate and propagate signals

41
Carry Lookahead Adder
42
Carry Lookahead Adder
43
Carry Lookahead Adder
44
Carry Lookahead Adder
45
Carry Lookahead Adder
46
Carry Lookahead Adder
47
Carry Lookahead Adder
48
Carry Lookahead Adder
49
Carry Lookahead Adder
50
Carry Lookahead Adder
51
Carry Lookahead Adder
52
Carry Lookahead Adder
53
Carry Lookahead Adder
54
Carry Lookahead Adder
  • Structure
  • Implementation using Parallel Prefix Computation

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
    Xn1

56
Carry Lookahead Adder
  • Parallel Prefix Computation
  • n1 n2k

57
Carry Lookahead Adder
  • Parallel Prefix Computation

58
Carry Lookahead Adder
  • Parallel Prefix Computation

59
Carry Lookahead Adder
  • Parallel Prefix Computation

60
Carry Lookahead Adder
  • Parallel Prefix Computation

61
Carry Lookahead Adder
62
Carry Lookahead Adder
63
Carry Lookahead Adder
64
Carry Lookahead Adder
  • cost

65
Carry Lookahead Adder
  • delay

66
Carry Lookahead Adder
  • Example for n8
  • design
  • computation of 18343

67
Carry Lookahead Adder
68
Carry Lookahead Adder
69
Carry Lookahead Adder
70
Carry Lookahead Adder
71
Carry Lookahead Adder
72
Carry Lookahead Adder
73
Carry Lookahead Adder
74
Carry Lookahead Adder
75
Carry Lookahead Adder
76
Carry Lookahead Adder
77
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)

78
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)

79
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)

80
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)

81
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)

82
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)
  • assumption add/sub result is representable with
    n bits

83
Addition/Substraction
  • Addition and Subtration for n-bit twos
    complement inputs
  • bit op signals the case of subtraction (op1)
  • 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
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
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
Overflow Sign
  • Overflow detection

87
Overflow Sign
  • Overflow detection

88
Overflow Sign
  • Overflow detection

89
Overflow Sign
  • Overflow detection

90
Overflow Sign
  • Overflow detection

91
Overflow Sign
  • Overflow detection

92
Overflow Sign
  • Overflow detection

93
Overflow Sign
  • Overflow detection

94
Overflow Sign
  • Sign condition

95
Overflow Sign
  • Sign condition
  • consider sign extended sum

96
Overflow Sign
  • Sign condition
  • consider sign extended sum
  • sign computation

97
Overflow Sign
  • Sign condition
  • consider sign extended sum
  • sign computation

98
Overflow Sign
  • Sign condition
  • consider sign extended sum
  • sign computation

99
Overflow Sign
  • Sign condition
  • consider sign extended sum
  • sign computation

100
Design of an Add/Subtract Unit

101
Design of an Add/Subtract Unit

102
Design of an Add/Subtract Unit

103
Design of an Add/Subtract Unit

104
Design of an Add/Subtract Unit

105
Design of an Add/Subtract Unit
Write a Comment
User Comments (0)
About PowerShow.com