Binary Ripple Carry Adder

advertisement
Binary Ripple Carry Adder
• is a combinatorial logic cct. that produces the
arithmetic sum of two, parallel, binary numbers;
• one full adder’s carry output is connected to the
carry input of the next stage;
• n full adder stages are needed to add two n-bit
numbers;
• a carry bit may propagate through many full adders
to the most significant bit;
• a four bit adder as shown below can be used as a
building block to implement 8 or 16-bit adder
functions. Design via a truth table for anything
more than a 2-bit adder is not recommended!
B3
A3
C3
Full Adder
C4
B2
S3
13/03/2002
Lecture 5.
L5_COSC361_2002.ppt
A3
B1
C2
Full Adder
A1
C1
Full Adder
S2
COSC361
Microprocessor Systems
B0
S1
A0
C0
Full Adder
S0
2
S. J. Weddell
Adder Subtractor Circuits
• achieved by adding the 2’s complement of the
subtrahend to the minuend. If the result produces a
carry, discard it. If a carry is not produced the result
is negative so take the 2’s complement of the result;
• since the subtraction function has been eliminated
by the above procedure, adder circuits can be used
for subtraction however means of complementing
the subtrahend is needed;
• complement ccts can be created from Exclusive-OR
functions;
• adding logic-1 to obtain a 2’s complement
subtrahend is done via the C0/Sign bit;
• overflow can be detected simply by using an ExOR gate on a combined, adder-subtractor circuit;
B3
A3
C3
Full Adder
C4
B2
S3
13/03/2002
Lecture 5.
L5_COSC361_2002.ppt
A3
B1
C2
Full Adder
S2
B0
A1
C1
Full Adder
S1
COSC361
Microprocessor Systems
A0
S
C0
Full Adder
S0
3
S. J. Weddell
Download