csce 211: digital logic design
DESCRIPTION
CSCE 211: Digital Logic Design. Chin-Tser Huang [email protected] University of South Carolina. Chapter 3: The Karnaugh Map. Karnaugh Map (K-map). The algebraic simplification method in Ch. 2 is not systematical and does not tell us whether the result is a minimum - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/2.jpg)
Chapter 3: The Karnaugh Map
![Page 3: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/3.jpg)
02/06/2014 3
Karnaugh Map (K-map) The algebraic simplification method in
Ch. 2 is not systematical and does not tell us whether the result is a minimum
We introduce the Karnaugh map, a graphical approach to finding suitable product terms for use in SOP expressions Particularly useful for problems of three or
four variables
![Page 4: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/4.jpg)
02/06/2014 4
Introduction to the K-map K-map consists of one square for
each possible minterm in a function A two-variable map has 4 squares A three-variable map has 8 squares A four-variable map has 16 squares
![Page 5: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/5.jpg)
02/06/2014 5
Example: Two-Variable K-map The upper right square correspond to A
= 1, B = 0, i.e. minterm 2 of f(A, B)
![Page 6: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/6.jpg)
02/06/2014 6
Example: Three-Variable K-map
Notice that the last two columns are not in numeric order! By organizing the map this way, the minterms in adjacent
squares can be combined using the adjacency propertyP9a. ab + ab’ = a
![Page 7: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/7.jpg)
02/06/2014 7
Example: Four-Variable K-map
![Page 8: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/8.jpg)
02/06/2014 8
Plot a Function on the K-map Two ways to do it
Use minterms and plot each square corresponding to each minterm
Put the function in SOP form and plot each of the product terms
How to plot the functionF = AB’ + AC + A’BC’ ?
![Page 9: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/9.jpg)
02/06/2014 9
Implicant An implicant of a function is a
product term that can be used in an SOP expression for that function
From the point of view of the map, an implicant is a rectangle of 1, 2, 4, 8, … (any power of 2) 1’s. That rectangle may not include any 0’s.
![Page 10: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/10.jpg)
02/06/2014 10
Implicant Example
The implicants of F areMinterms Groups of 2 Groups of 4A´B´C´D´ A´CD CDA´B´CD BCDA´BCD ACDABC´D´ B´CDABC´D ABC´ABCD ABDAB´CD
![Page 11: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/11.jpg)
02/06/2014 11
A prime implicant is an implicant that (from the point of view of the map) is not fully contained in any one other implicant.
An essential prime implicant is a prime implicant that includes at least one 1 that is not included in any other prime implicant.
Prime Implicant
![Page 12: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/12.jpg)
02/06/2014 12
Why Prime Implicants? The purpose of the map is to help
us find minimum SOP expressions The only product terms we need to
consider are prime implicants Essential prime implicants are the
prime implicants that must be used in any minimum SOP expression
![Page 13: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/13.jpg)
02/06/2014 13
Minimum SOP using K-map We will start with the most isolated 1’s on the
map The 1’s with the fewest (or no) adjacent squares with
1 in it
![Page 14: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/14.jpg)
02/06/2014 14
1. Find all essential prime implicants. Circle them on the map and mark the minterm(s) that make them essential with an asterisk (*). Do this by examining each 1 on the map that has not already been circled. It is usually quickest to start with the most isolated 1’s, that is, those that have the fewest adjacent squares with 1’s in them.
2. Find enough other prime implicants to cover the function. Do this using two criteria:a. Choose a prime implicant that covers as many new 1’s (that is, those not already covered by a chosen prime implicant).b. Avoid leaving isolated uncovered 1’s.
Map Method 1
![Page 15: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/15.jpg)
02/06/2014 15
minimum all prime implicantsf = y´z´ + wyz + w´xz
Example 1
![Page 16: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/16.jpg)
02/06/2014 16
Example 2Find the minimum SOP expression forx´yz´ + x´yz + xy´z´ + xy´z + xyz
![Page 17: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/17.jpg)
02/06/2014 17
x´ y + x y´ + x z x´ y + x y´ + y z
Example 2
![Page 18: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/18.jpg)
02/06/2014 18
Bad move!
minimum
G = A´BC´ + A´CD + ABC + AC´D
Example 3: “Don’t be greedy”
![Page 19: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/19.jpg)
02/06/2014 19
When there are don’t cares:
An implicant is a rectangle of 1, 2, 4, 8, … 1’s or X’s
A prime implicant is a rectangle of 1, 2, 4, 8, … 1’s or X’s not included in any one larger rectangle. Thus, from the point of view of finding prime implicants, X’s (don’t cares) are treated as 1’s.
An essential prime implicant is a prime implicant that covers at least one 1 not covered by any other prime implicant (as always). Don’t cares (X’s) do not make a prime implicant essential.
Don’t Cares
![Page 20: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/20.jpg)
02/06/2014 20
minimum other p.i.s
F = BD + A´C´D + AB´C
Example 1
![Page 21: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/21.jpg)
02/06/2014 21
Example 2
g1 = x´z + w´yz + w´y´z´ + wxy´
g2 = x´z + w´yz + xy´z´ + wxy´
g3 = x´z + w´yz + xy´z´ + wy´z
![Page 22: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/22.jpg)
02/06/2014 22
g1 = c´d´ + ab + b´d´ + a´cd
g2 = c´d´ + ab + b´d´ + a´b´c
g3 = c´d´ + ab + ad´ + a´b´c
Example 3
![Page 23: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/23.jpg)
02/06/2014 23
Finding a minimum product of sums expression requires no new theory. The following approach is the simplest:
1. Map the complement of the function. (If there is already a map for the function, replace all 0’s by 1’s, all 1’s by 0’s and leave X’s unchanged.)
2. Find the minimum sum of products expression for the complement of the function (using the techniques of the last two sections).
3. Use DeMorgan’s theorem (P11) to complement that expression, producing a product of sums expression.
Finding Minimum Product of Sums Expression
![Page 24: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/24.jpg)
02/06/2014 24
f(a, b, c, d) = ∑m(0, 1, 4, 5, 10, 11, 14)
Example
![Page 25: CSCE 211: Digital Logic Design](https://reader035.vdocuments.net/reader035/viewer/2022070502/56814c74550346895db99589/html5/thumbnails/25.jpg)
02/06/2014 25
f = a´c´ + ab´c + acd´ f´ = ac´ + a´c + abdf´ = ac´ + a´c + bcd
f = (a´ + c)(a + c´)(a´ + b´ + d´)f = (a´ + c)(a + c´)(b´ + c´ + d´)
Example (cont.)