Design Combinational Circuits - Adders
Design Combinational Circuits - Adders
Combinational Circuits
Introduction
▪ Two classes of logic circuits:
❖ combinational
❖ sequential
▪ Combinational Circuit:
Memory
Output depends on both present and past inputs.
Memory (via feedback loop) contains past
information.
Analysis Procedure
▪ Given a combinational circuit, can you analyze its
function?
A A+B
B F1 = (A+B).(A'+B')
F2 = (A'+B')' = A.B
A'+B'
▪ Steps:
❖ 1. Label the inputs and outputs.
❖ 2. Obtain the functions of
intermediate points and the outputs.
❖ 3. Draw the truth table.
❖ 4. Deduce the functionality of the circuit half adder.
Design Methods
▪ Different combinational circuit design methods:
❖ Gate-level method (with logic gates)
❖ Block-level design method
X Half S
Y Adder C
(X + Y)
3) Draw truth table.
Gate-level (SSI) Design: Half Adder
4) Obtain simplified Boolean function.
Example: C = XY
S = X'Y + XY' = X⊕Y
C
Gate-level (SSI) Design: Full Adder
▪ Half-adder adds up only two bits.
▪ To add two binary numbers, we need to add 3
bits (including the carry).
▪ Example:
form: YZ
00
S
01 11 10
X
C = XY + XZ + YZ 0 1 1
S = X'Y'Z + X'YZ'+XY'Z'+XYZ 1 1
1
Gate-level (SSI) Design: Full Adder
▪ Alternative formulae using algebraic manipulation:
C = XY + XZ + YZ
= XY + (X + Y)Z
= XY + ((X⊕Y) + XY)Z
= XY + (X⊕Y)Z + XYZ
= XY + (X⊕Y)Z
X (X⊕Y)
Y S
(XY)
Z
Full Adder made from two Half-Adders (+ OR gate).
Gate-level (SSI) Design: Full Adder
▪ Circuit for above formulae:
C = XY + (X⊕Y)Z Block diagrams.
S = (X⊕Y)⊕Z
X (X⊕Y)
X Sum X
Y Y Sum S
Y
Half Half
Adder Adder
(XY)
Carry Carry
C
Z
Full Adder made from two Half-Adders (+ OR gate).
Block-Level Design Method
▪ More complex circuits can also be built using
block-level method.
▪ In general, block-level design method (as opposed to
gate-level design) relies on algorithms or formulae of
the circuit, which are obtained by decomposing the
main problem to sub-problems recursively (until
small enough to be directly solved by blocks of
circuits).
▪ Simple examples using 4-bit parallel adder as
building blocks:
❖ (1) 16-Bit Parallel Adder
❖ (2) Adder cum Subtractor
4-bit Parallel Adder
▪ Cascading 4 full adders via their carries, we get:
Y4 X4 Y3 X3 Y2 X2 Y1 X1
C4 C3 C2
C5 FA FA FA FA C1
S4 S3 S2 S1
Input
Output
Parallel Adders
▪ Note that carry propagated by cascading the carry
from one full adder to the next.
▪ Called Parallel Adder because inputs are presented
simultaneously (in parallel). Also, called Ripple-Carry
Adder.
16-bit Parallel Adder
▪ Larger parallel adders can be built from smaller ones.
▪ Example: a 16-bit parallel adder can be constructed
from four 4-bit parallel adders:
X16..X13 Y16..Y13 X12..X9 Y12..Y9 X8..X5 Y8..Y5 X4..X1 Y4..Y1
4 4 4 4 4 4 4 4
4 is a shortened
notation for
S4 .. S1 S4 S 3 S2 S 1
16-bit parallel adder ripples carry from one 4-bit block to the
next.
Such ripple-carry circuits are “slow” because of long delays
needed to propagate the carries.
4-bit Parallel Adder cum Subtractor
*Optional
▪ Subtraction can be performed through addition using
2s-complement numbers.
▪ Hence, we can design a circuit which can perform
both addition and subtraction, using a parallel adder.
X4 X3 X2 X1 Y4 Y3 Y2 Y1
4-bit adder
S: control signal
cum subtractor for add/subtract
Y Y Y Y'
S=0 S=1
x
y' x'
S = xy' + x'y y'
x' S = (C+x'y')'
y x
y C
x
y C
x
y x
S=x⊕y
S = (x+y)(x'+y') y
x'
y'
C
x
y C
Arithmetic Circuits: Adders
Revision
▪ Full adder Σ
A Σ Sum
Input Output
B
bits Cout Carry bits
Cin
yz yz
X' x
00 01 11 10 x
00 01 11 10
y'
z 0 1 0 1 1
x'
y 1 1 1 1 1 1 1
z'
S C = xy + xz + yz S = x'y'z + x'yz' + xy'z' + xyz
x
y'
z'
x
y x⊕y
z x
y S = (x⊕y)⊕z
x
xy
y
C = xy + (x⊕y)z
x
z C z
y
z
Arithmetic Circuits: Parallel Adders
Revision
▪ Example: Adding two 4-bit numbers
2 ways:
u Serial (one FA)
u Parallel (n FAs for n bits)
Y4 X4 Y3 X3 Y2 X2 Y1 X1
C4 C3 C2
C5 FA FA FA FA C1
Binary Σ
no. A X 4-bit S4 S3 S2 S1
S sum
Binary
no. B Y
Cout Output carry
Input carry Cin
Arithmetic Circuits: Cascading Adders
Revision
▪ 4-bit parallel adder:
❖ cascade 4 full adders