UNIT 5 KRNUGH MPS Spring 2
Karnaugh Maps 2 Contents Minimum forms of switching functions Two- and three-variable Four-variable Determination of minimum expressions using essential prime implicants Five-variable Other forms of Other uses of Reading Unit 5
Recap: Logic Design 3 Design a combinational logic circuit starting with a word description of the desired circuit behavior Steps:. Translate the word description into a switching function (Unit 4) Truth table Boolean expression: SOP/POS derived from minterm/maxterm expansion (Unit 4) 2. Simplify the function Boolean algebra (Units 2&3) Karnaugh map (Unit 5) Quine-McCluskey (Unit 6) etc 3. Realize it using available logic gates Minterm & maxterm expansions
Difficulties in lgebraic Simplification 4 Problems: Difficult to apply in a systematic way Difficult to tell when you have arrived at a minimum solution Minimum SOP/POS. Minimum # of terms (i.e., # of gates) 2. Minimum # of literals (i.e., # of gate inputs) Solutions: systematic methods. Karnaugh map (K-map) (Unit 5) Especially useful for 3 or 4 variables Faster and easier than other methods 2. Quine-McCluskey (Unit 6) 3. etc.
5 Two- & Three-Variable Karnaugh Maps
Two-Variable Karnaugh Maps (/2) 6 Truth table = minterm expansion = Karnaugh map Each square of the K-map corresponds to a combination of values of inputs i.e., each square = a minterm = a row in truth table Truth table Karnaugh map m i B F 2 3 a a a 2 a 3 =, B= =, B= B 'B' 'B B' B Minterm =, B= =, B= B' B B ' m m 2 m m 3
7 Two-Variable Karnaugh Maps (2/2) e.g.,. Truth table 2. K-map 3. Simplification in K-map XY'+XY = X(Y'+Y) = X m i B F 2 3 B B One circle eliminates one variable F = 'B'+'B = '(B'+B) = '
Three-Variable Karnaugh Maps 8 Minterms in adjacent squares of K-map differ in only ONE bit Combine them, XY'+XY = X(Y'+Y) = X BC BC m m 4 is adjacent to Minterm m m 5 m 3 m 7 C B m 2 m 6
Example: F(, B, C) = Σ m(, 3, 5) 9 e.g., F(, B, C) = Σ m(, 3, 5) = Π M(, 2, 4, 6, 7). Truth table 2. K-map m i B C F 2 3 4 5 6 7 BC 4 3 5 7 2 F 3. Simplification in K-map F = 'B'C + 'BC + B'C = 'C + B'C Minimum SOP form 6
Product Terms in Karnaugh Maps e.g., BC BC BC C C C B B B B ('BC + BC + 'BC' + BC' = B) BC' C'
Example: f(a, b, c) = abc' + b'c + a' e.g., f(a, b, c) = abc' + b'c + a'. Mark s 2. Make circles (simplify) a bc a bc a b'c simplify c b a' abc' f = a' + b'c + bc' X + X = X Make the circle as large as possible
The Consensus Theorem in K-Map 2 Overlapped circles imply redundant terms e.g., the consensus theorem XY + X'Z + YZ = XY + X'Z (YZ is redundant) X X X YZ X YZ X'Z YZ (consensus term) Z simplify Z Y XY Y
3 ll Solutions re Shown in Karnaugh Maps ll possible minimum SOPs can be determined from K-map # of terms and # of literals e.g., F = Σ m(,, 2, 5, 6, 7) a bc Make each circle as large as possible Select as few circles as possible to cover all minterms a bc a bc simplify. F = a'b' + bc' + ac 2. F = a'c' + b'c + ab
Summary 4 Truth table = minterm expansion = Karnaugh map Simplification in pply XY'+XY = X(Y'+Y) = X and X + X = X Minimum SOP = (min # of terms, min # of literals) Steps: (djacent squares differ in only one bit). Mark s 2. Make circles Make each circle as large as possible (# of literals) Select as few circles as possible to cover all s (# of terms) lgebraic simplification also holds in Rule : combining terms: XY + XY' = X Rule B: eliminating terms: X + XY = X; XY + X'Z + YZ = XY + X'Z Rule C: eliminating literals: X + X'Y = X + Y Rule D: adding redundant terms: XY + X'Z = XY + X'Z + YZ; X = X + XY
5 Four-Variable Karnaugh Maps
6 Four-Variable Karnaugh Maps djacent squares differ in only one bit e.g., f(a, b, c, d) = acd + a'b + d' B CD cd ab 4 2 8 C 3 5 7 3 9 5 D a'b acd d' 2 6 4 B f = acd + a'b + d' = ac + a'b + d Make the circle as large as possible
Two More Examples 7 f = Σ m(,3,4,5,,2,3) ab cd f 2 = Σ m(,2,3,5,6,7,8,,,4,5) Four corner terms ab combined into b'd' cd f = bc' + a'b'd + ab'cd' f 2 = c + b'd' + a'bd
Karnaugh Maps with Don t Cares 8 Don t cares can be assigned with s or s fter assignment, the function becomes completely specified e.g., f(a, b, c, d) = Σ m(, 3, 5, 7, 9) + Σ d(6, 2, 3) ab cd X X X f = a'd + c'd = Σ m(, 3, 5, 7, 9, 3)
Minimum POS? 9 Minimum SOP = circle s of f Minimum POS = circle s of f' Find min. SOP of f', then complement it e.g., f = x'z' + wyz + w'y'z' + x'y wx yz f' = y'z + w'xy + wxz' By DeMorgan s law, f = (y'z + w'xy + wxz)' = (y + z')(w + x' + y')(w' + x' + z)
2 Prime Implicants
Prime Implicants (/2) 2 Implicant: a product term i.e., any single or any group of s in the K-map Prime implicant (PI): an implicant that cannot be covered by other implicants i.e., a circle that cannot be enlarged any more single is a PI if not adjacent to any other s Two adjacent s form a PI if not contained in a group of 4 s cd ab a'b'd' a'b'c'd' ac' ab'c' a'b'c a'c'd' abc' Not PI PI
Prime Implicants (2/2) 22 Cover: a set of prime implicants which covers all s minimum SOP contains only prime implicants (Why?) Minimum cover = (min # of PIs, min # of literals) Don t cares are treated just like s e.g., cd ab X PI: a'b'd, bc', ac, a'c'd, ab, b'cd Min SOP:. a'b'd + bc' + ac 2. a'c'd + ab + b'cd. is better X
Essential Prime Implicants 23 Essential prime implicant: If a minterm is covered by only one PI, the PI is essential Essential PI MUST be included in minimum SOP Find essential PI s = find the s circled only once e.g., f = CD + BD + B'C + C CD B CD B m 5 Essential m 2 m 4 f = BD + B'C + C
One More General Example 24 Find minimum cover:. Find all PI s 2. Find essential PI s 3. Find a minimum set of PI s to cover the remaining s CD B CD B 4 2 8 4 2 8 5 3 9 Essential 5 3 9 3 7 5 3 7 5 2 6 4 2 f = 'C' + 'B'D' + CD + 6 4 'BD BCD
Summary 25 Minimum SOP = minimum cover = a minimum set of PI s which cover all s Minimum cover = (min # of PIs, min # of literals) Steps:. Find all PI s 2. Find essential PI s 3. Find a minimum set of PI s to cover the remaining s Recap: steps of simplification in. Mark s 2. Make circles Make each circle as large as possible = find PI Select as few circles as possible to cover all s = find min cover
26 Flowchart B CD Chooses a uncovered Find all adjacent s & X s X 4 5 8 3 9 N re the chosen and its adjacent s & X s covered by a single term? X 7 X 5 6 Y That term is an essential prime implicant. Loop it. Note: ll essential PI s have been determined at this point ll uncovered s checked? Y Find a min. set of prime implicants which cover the remaining s on the map. N stop
27 Five-Variable Karnaugh Maps
Five-Variable Karnaugh Maps 28 e.g., / DE BC These terms do not combine 6 7 9 8 2 28 24 4 2 8 2 29 25 5 3 9 23 3 27 3 7 5 22 3 26 2 6 4 These 8 terms combine into BD' These 4 terms combine into CDE These 2 terms combine into B'DE'
djacency in 5-Variable Karnaugh Maps 29 4 in the same layer, one in the other layer DE BC /
3 Other Forms of 5-Variable K-Maps
Form 3 Two maps side-by-side DE BC DE BC = = F = D'E' + B'C'D' + BCE + 'BC'E' + CDE
Form 2 32 mirror image map B E D C F = D'E' + B'C'D' + BCE + 'BC'E' + CDE C
33 Other Uses of Karnaugh Maps Many operations that can be performed using a truth table or algebraically can be done using a Karnaugh Map (Unit 5.6)