Файл: Digital design with CPLD applications and VHDL (R. Dueck, 2000).pdf
ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 13.06.2025
Просмотров: 8104
Скачиваний: 6
6.6 • Binary Adders and Subtractors |
241 |
FIGURE 6.5
Full Adder from K-Map Simplification
(A B AB) CIN (A B A B) CIN
(A B) CIN (A B) CIN |
Let x A B |
x CIN x CIN |
|
x CIN |
|
(A B) CIN |
|
The simplified expressions are as follows: |
N O T E
COUT (A B) CIN A B
(A B) CIN
Figure 6.6 shows the logic circuit derived from these equations. If you refer back to the half adder circuit in Figure 6.2, you will see that the full adder can be constructed from two half adders and an OR gate, as shown in Figure 6.7.
FIGURE 6.6
Full Adder from Logic Gates
6.6 • Binary Adders and Subtractors |
243 |
||
d. COUT (1 1) 0 1 1 |
|||
0 0 1 |
|||
0 1 1 |
|||
(1 1) 0 |
|||
0 0 0 |
(Binary equivalent: COUT 10) |
||
In each case, the binary equivalent is the same as the number of HIGH inputs, regard- |
|||
less of which inputs they are. |
|||
EXAMPLE 6.19 |
Combine a half adder and a full adder to make a circuit that will add two 2-bit numbers. |
||
Check that the circuit will work by adding the following numbers and writing the binary |
|||
equivalents of the inputs and outputs: |
|||
a. A2 A1 01, B2 B1 01 b. A2 A1 11, B2 B1 10
SOLUTION The 2-bit adder is shown in Figure 6.9. The half adder combines A1 and B1; A2, B2, and C1 are added in the full adder. The carry output, C1, of the half adder is connected to the carry input of the full adder. (A half adder can be used only in the LSB of a multiple-bit addition.)
FIGURE 6.9
Example 6.19
2-Bit Adder
Sums: |
||||||
a. 01 |
01 010 |
|||||
A1 1, B1 1 |
C1 1, 1 0 |
|||||
A2 0, B2 0, C1 1 |
C2 0, 2 1 |
|||||
(Binary equivalent: A2 A1 B2 B1 C2 2 1 010) |
||||||
b. 11 10 101 |
||||||
A1 1, B1 0 |
C1 0, 1 1 |
|||||
A2 1, B2 1, C1 0 |
C2 1, 2 0 |
|||||
(Binary equivalent: A2 A1 |
B2 B1 C2 2 1 |
101) |
||||
6.6 • Binary Adders and Subtractors |
245 |
b.1111 0001 10000
(1510 110 1610)
A1 1, B1 1, C0 0; C1 1, 1 0 A2 1, B2 0, C1 1; C2 1, 2 0 A3 1, B3 0, C2 1; C3 1, 3 0 A4 1, B4 0, C3 1; C4 1, 4 0
(Binary equivalent: C4 4 3 2 1 10000)
The internal carries in the parallel binary adder in Figure 6.10 are achieved by a system called ripple carry. The carry output of one full adder cascades directly to the carry input of the next. Every time a carry bit changes, it “ripples” through some or all of the following stages. A sum is not complete until the carry from another stage has arrived. The equivalent circuit of a 4-bit ripple carry is shown in Figure 6.11.
A4 B4 |
A |
B4 |
|
A3B3 |
4 |
||
A3 B3 |
|||
A2B2 |
C4 |
||
A2 B2 |
|||
A1B1 |
|||
A1 B1 |
|||
C3 |
|||
C2 |
|||
C0 |
C1 |
FIGURE 6.11
4-bit Ripple Carry Chain
A potential problem with this design is that the adder circuitry does not switch instantaneously. A carry propagating through a ripple adder adds delays to the summation time and, more importantly, can introduce unwanted intermediate states.
Examine the sum (1111 0001 10000). For a parallel adder having a ripple carry, the output goes through the following series of changes as the carry bit propagates through the circuit:
C4 4 3 2 1 01111
01110
01100
01000
10000
If the output of the full adder is being used to drive another circuit, these unwanted intermediate states may cause erroneous operation of the load circuit.
Fast Carry
K E Y T E R M
Fast carry (or look-ahead carry) A gate network that generates a carry bit directly from all incoming operand bits, independent of the operation of each full adder stage.
An alternative carry circuit is called fast carry or look-ahead carry. The idea behind fast carry is that the circuit will examine all the A and B bits simultaneously and produce an output carry that uses fewer levels of gating than a ripple carry circuit. Also, since there is