Beruflich Dokumente
Kultur Dokumente
Part I
Adders
1 Ripple Carry adder
5 Serial Adders
Arithemtic Circuits
Half Adder
A B Sum Carry
0 0 0 0
sum = A · B + B · A
0 1 1 0
carry = A · B
1 0 1 0
1 1 0 1
Full Adder
Truth Table for the addition of
three bits is: Which leads to the following Karnaugh
A B Cin Sum Cout
maps:
0 0 0 0 0
AB
0 1 0 1 0 Cin 00 01 11 10
1 0 0 1 0 0 0 1 0 1
SUM
1 1 0 0 1 1 1 0 1 0
0 0 1 1 0
AB
0 1 1 0 1 Cin 00 01 11 10
0 0 0 1 0 CARRY
1 0 1 0 1
1 0 1 1 1
1 1 1 1 1
A2 B2 A1 B1 A0 B0
S2 S1 S0
Cout = A · B + Cin · (A + B)
= (A + B) · (Cin + A · B)
= A · Cin + B · Cin + A · B
Cout · (A + B + Cin ) = A · B · Cin + A · B · Cin + A · B · Cin
CMOS Implementation
VDD VDD
A A B
Cin
B
B
A
Cout Cout Cout A
Sum Sum
Cin
A A
B
B
A
A Cin
B
Gnd
Complementation Property
This shows that the same hardware that produces sum from A,
B and Cin , will produce sum if the inputs are changed to A, B
and Cin
Arithemtic Circuits
Ripple Carry adder
Complementation Property
Cout = A · B + Cin · (A + B)
Cout = A · B + Cin · (A + B)
= (A + B) · (Cin + A · B)
= A · Cin + B · Cin + A · B
B A A A B Cin A
Cin B
Cin A B
B Cin Cout Cout A Cout Cin
Sum Sum
Cout
Cin B Cin
Cout
B
B A A B
A Cin
Gnd A
Gnd
Cout = A.B + Cin . (A+B)
These are called mirror gates because the n and p transistors
have the same series parallel combination.
This is highly unusual.
Arithemtic Circuits
Ripple Carry adder
Vdd
P When the clock is low, the output is
Cin Cout
unconditionally charged by the pMOS.
When the clock goes high, the output will be
G pulled low if G = 1 or if P = 1 and Cin = 0.
In all other cases, the output will remain high.
Ck Thus this circuit implements the required logic.
Gnd
This circuit can be concatenated for all bits and since P and G
are ready before Cin arrives, the carry quickly ripples through
from bit to bit.
Arithemtic Circuits
Carry Look Ahead
Manchester Carry Chain
Ck Cin group
Ck
Gnd Gnd Gnd
Arithemtic Circuits
Carry Select Adder
a b
(0) (0)
Mux
The two alternatives for the carry output are ready at (m+1)
units of time.
If the actual Cin is available at n units of time, the output
will be available at (m+2) or (n+1), whichever is later.
In case of 4 bit adders, this is at 6 units of time or at Cin
arrival + 1, whichever is later.
Arithemtic Circuits
Carry Select Adder
Stacking Carry Select Adders
Linear Stacking
gen G,P,K gen G,P,K gen G,P,K gen G,P,K Bits cy in alt cy.s cy out
(1) (1) (1) (1)
(0)
4 bit 4 bit
(0) (0)
4 bit 4 bit
(0) (0)
4 bit 4 bit
(0) (0)
4 bit 4 bit
(0) 0-3 0 5 6
adder adder adder adder adder adder adder adder
(5) (5)
(6)
(5) (5)
(7)
(5) (5) (5) (5)
(13)
4-7 6 5 7
Cin Mux Mux Mux Mux
(0)
8-11 7 5 8
The sum generation will take 12-15 8 5 9
another unit of time, so the overall 16-19 9 5 10
results will be available in 14 units 20-23 10 5 11
of time. 24-27 11 5 12
28-31 12 5 13
Arithemtic Circuits
Carry Select Adder
Stacking Carry Select Adders
Square-root Stacking
Square-root Stacking
We can do more bits of addition in the same time, if each
successive stage is 1 bit longer than the previous one.
Thus, the number of bits which can be added is given by
s(n0 + n0 + s − 1)
m = n0 +n0 +(n0 +1)+(n0 +2)+· · · = n0 +
2
where s is the number of stages following the first one
without carry select.
The total delay will be n0 + 1 for the first stage. Each
subsequent stage takes just 1 unit of time since the
candidates for selection are available just in time. Thus the
time take is just n0 + s + 1 units. When s ≫ n0 , we have
m ≈ s2 /2, while the time taken is nearly s.
√
Thus the time taken to add m bits is ≈ 2m
Arithemtic Circuits
Carry Select Adder
Stacking Carry Select Adders
Less than 3 bits is not efficient for a carry select adder and
Starting with more than 3 bits does not give faster performance.
Our sum will be ready at 11 - which is much faster. This gain
will be even higher for wider additions.
Arithemtic Circuits
Serial Adders
Serial Adders
Serial Adders
A single full adder adds the incoming bits. Bits to be added
are fed to it serially, LSB first.
The sum bit goes to the output while carry is stored in a
flip-flop.
Carry then gets added to the more significant bits which
arrive next.
Output can be converted to parallel form if needed, using
another shift register.
co Reset
Shift Register ci
a FF
b s
Shift Register Shift Register