Professional Documents
Culture Documents
Chapter 3
GATE LEVEL MINIMIZATION
Overvie
w
° K-maps: an alternate approach to representing Boolean
functions
° K-map representation can be used to minimize Boolean
functions
° Easy conversion from truth table to K-map to
minimized SOP representation.
° Simple rules (steps) used to perform minimization
° Leads to minimized SOP representation.
• Much faster and more more efficient than previous minimization
techniques with Boolean algebra.
Kar
nau
°ghAlternate way of representing Boolean function
ma
ps• All rows of truth table represented with a square
• Each square represents a minterm
B0 1 B0 1
A A
00 1 F=AB +A’B 00 1 F=AB +AB +AB
11 0 11 1
A B C F
° Three variable maps. 0 0 0 0
0 0 1 1
BC 0 1 0 1
00 01 11 10 0 1 1 0
A 1 0 0 1
00 1 0 1 1 0 1 1
11 1 1 1 1
1
1 0
1 1
1
1
+
Example
Karnaugh
Maps
° A Karnaugh map is a graphical tool for assisting in the
general simplification procedure.
° Two variable maps.
B0 1 B0 1
A A
00 1 F=AB +A’B 00 1 F=AB +AB +AB
11 0 11 1 F=A+B
° Three variable maps.
BC
00 01 11 10
A
00 1 0 1
1 1 1 1 1 F=A+B C +BC
AB A
C 00 01 11 10
0
A
0 0 1 1 C 1
G(A,B,C) = A
C 0 0 1 1 B
B
A
1 0 0 1
F(A,B,C) = m(0,4,5,7) = AC + B’C’
C 0 0 1 1
B
More Karnaugh Map Examples
° Examples a
b 0 1 a
0 0 1 b 0 1
1 0 1 0 1 1
1 0 0
f=a
g = b'
ab ab
c 00 01 11 10 c 00 01 11 10
0 0 0 1 0 0 0 0 1 1
1 0 1 1 1 1 0 0 1 1
cout = ab + bc + ac
f=a
F(x,y,z) = z’ + xy’
Example 2:
F= C + A’B
App
licat
ion
of
Kar C
nau A
0
B C
0 0
S Cout
0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The How to use a Karnaugh
1 0 1 0 1
Map instead of the
One 1 1 0 0 1
Algebraic simplification?
Cout 1 1 1 1 1
-bit +
Add
er 0 0 1 0 Now we have to cover all the 1s in the
Karnaugh Map using the largest
B 0 1 1 1
rectangles and as few rectangles
as we can.
C
Karnaugh Map for Cout
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
C
Cout = AC
Karnaugh Map for Cout
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
C
Cout = AC + AB
Karnaugh Map for Cout
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
C
Cout = AC + AB + BC
Karnaugh Map for Cout
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
Add
er 0 1 0 1
B 1 0 1 0
C S = A’BC’
Karnaugh Map for S
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
Add
er 0 1 0 1
B 1 0 1 0
C S = A’BC’ + A’B’C
Karnaugh Map for S
App
licat
ion
of
Kar C
A B Cin S Cout
nau 0 0 0 0 0
gh 0 0 1 1 0
A
Map 0 1 0 1 0
Adder S 0 1 1 0 1
s:
B 1 0 0 1 0
The 1 0 1 0 1
One 1
1
1 0
1 1
0
1
1
1
Cout
-bit A
+
Add
er 0 1 0 1
B 1 0 1 0
Add
er 0 1 0 1
B 1 0 1 0
1 0 0 0 0 1 0 0 0 0 1 1
D D D
1 1 0 1 0 0 1 0 0 0 0 0
C C C
1 1 0 0 0 0 0 1 0 0 1 0
B B B
0 1 0 0
D
0 0 1 0
C
0 0 0 1
B
K-map for EQ
Kar
nau
° Fourgh
variable maps.
Map
CD
s 00 01 11 10
AB F=ABC +ACD +ABC
00 0 0 0 1
01 1 1 0 1 +AB CD +ABC +AB C
11 1 1 1 1 F=BC +CD + AC+ AD
10 1 0 1 1
A
AB
CD 00 01 11 10
00 0 0 X 0 - Treat X’s like either 1’s or 0’s
- Very useful
01 1 1 X 1
D - OK to leave some X’s uncovered
11 1 1 0 0
C
10 0 X 0 0
B
Karnaugh maps: Don’t cares
° f(A,B,C,D) = m(1,3,5,7,9) + d(6,12,13)
• without don't cares
- f=
A B C D f
0 0 0 0 0
A’D + C’D
0 0 0 1 1
0 0 1 0 0
A 0 0 1 1 1
AB 0 1 0 0 0
CD 00 01 11 10 0 1 0 1 1
00 0 0 X 0
0 1 1 0 X
+
0 +
1 1 1 1
01 1 1 X 1 1 0 0 0 0
D 1 0 0 1 1
11 1 1 0 0 1 0 1 0 0
C 1 0 1 1 0
10 0 X 0 0 1 1 0 0 X
1 1 0 1 X
B 1 1 1 0 0
1 1 1 1 0
Don’t Care Conditions
CD
00 01 11 10
AB
00 0 1 0 0
01 x x x 1 F=ACD+B+AC
11 1 1 1 x
10 x 0 1 1
° Alternative covering.
CD
00 01 11 10
AB
00 0 1 0 0
01 x x x 1 F=ABCD+ABC+BC+AC
11 1 1 1 x
10 x 0 1 1
Kar
nau
°ghf(A,B,C,D) = m(1,3,5,7,9) + d(6,12,13)
ma
ps:• f = A'D + B'C'D without don't cares
don• f= with don't cares
’t A'D + C'D
car
es
(co A
nt’d0 0 X 0 by using don't care as a "1"
) a 2-cube can be formed
1 1 X 1
rather than a 1-cube to cover
D this node
1 1 0 0
C don't cares can be treated as
0 X 0 0 1s or 0s
B depending on which is more
advantageous
Defi
niti
° Implicant
on
•ofSingle product term of the ON-set (terms that create a logic 1)
ter
° Prime
ms implicant
• Implicant that can't be combined with another to form an implicant with
for
fewer literals.
two
° Essential
- prime implicant
•leve
Prime implicant is essential if it alone covers a minterm in the K-map
•l Remember that all squares marked with 1 must be covered
sim
° Objective:
plifi
•cati
Grow implicant into prime implicants (minimize literals per term)
•onCover the K-map with as few prime implicants as possible
(minimize number of product terms)
Exa
mpl
es
to
A
illus 6 prime implicants:
trat
0 X 1 0
A'B'D, BC', AC, A'C'D, AB, B'CD
e 1 1 1 0
D
ter essential
1 0 1 1
Cms
0 0 1 1 minimum cover: AC + BC' + A'B'D
B
A
5 prime implicants: 0 0 1 0
BD, ABC', ACD, A'BC, A'C'D
1 1 1 0
D
essential 0 1 1 1
C
0 1 0 0
minimum cover: 4 essential implicants
B
Prime
Implicants
° Exclusive OR
• Comparison with SOP
a) b)
a
b
c
d
c) d)
Imp
lem
°ent
Sum-of-products
atio
ns • AND gates to form product terms
(minterms)
of • OR gate to form sum
Two
-
leve
l
°Log
Product-of-sums
ic • OR gates to form sum terms
(maxterms)
• AND gates to form product
Two
-
°leve
lReplace minterm AND gates with NAND gates
°Log
Place compensating inversion at inputs of OR gate
ic
usi
ng
NA
ND
Gat
es
Two
-
°leve
lOR gate with inverted inputs is a NAND gate
• de Morgan's: A' + B' = (A • B)'
Log
°ic
Two-level NAND-NAND network
usi• Inverted inputs are not counted
ng • In a typical circuit, inversion is done once and signal distributed
NA
ND
Gat
es
(co
nt’d
)
Con
ver
°sio
nConvert from networks of ANDs and ORs to
networks of NANDs and NORs
Bet•
Introduce appropriate inversions ("bubbles")
wee
°nEach introduced "bubble" must be matched by a
corresponding "bubble"
For
ms• Conservation of inversions
• Do not alter logic function
A A
NAND
B B
Z NAND Z
C C
NAND
D D
Con
ver
°sio
nExample: verify equivalence of two forms
Bet
wee
An A
For NAND
B B
ms Z NAND Z
C(co C
NAND
Dnt’d D
)
A
B
C
X
D
E
F
G
Conversion of Multi-level Logic to NAND
° FGates
= A (B + C D) + B C'
Level 1 Level 2 Level 3 Level 4
C
D
original F
B
AND-OR A
network
B
C’
C
D
introduction and F
B
conservation of
A
bubbles
B
C’
C
redrawn in terms D
F
of conventional B’
NAND gates A
B
C’
Con
ver
°sio
nExample
Bet
A A
(a) wee
B B (b)
F F
n C X C X
D D
For
Add double bubbles at inputs
msOriginal circuit
A
A X
(c) B F
C (d)
X’ B F
D’ C X’
D’
Distribute bubbles
Insert inverters to fix mismatches
some mismatches
Exclusive-OR and Exclusive-NOR
Circuits
Exclusive-OR (XOR) produces a HIGH output whenever the two
inputs are at opposite levels.
Exclusive-NOR Circuits
Exclusive-NOR (XNOR) :
Exclusive-NOR (XNOR) produces a HIGH output whenever the two
inputs are at the same level.
Exclusive-NOR Circuits
XNOR gate may be used to simplify circuit implementation.
XOR
Function
° XOR function can also be implemented with
AND/OR gates (also NANDs).
XOR
Function
° Even function – even number of inputs are 1.
° Odd function – odd number of inputs are 1.
Parity Generation and
Checking
FIGURE 4-25 XOR gates used to implement the parity generator and the parity
checker for an even-parity system.
Summary