CH5 Karnaugh Maps Lecturer: 吳安宇教授 Date:2006/0/20 CCESS IC L
Problems in lgebraic Simplification The procedures are difficult to apply in a systematic way. It is difficult to tell when you have arrived at a minimum solution. (minimum SOP, POS) => Karnaugh map (K-map) is the solution. pp. 2
Two- and Three-Variable K-MapsK 0 Minterm: 0 0 0 m 0 m 2 m m 3 m i F 0 0 0 0 2 0 0 3 0 0 0 0 => => 0 0 0 One circle => eliminates one variable + = ( +) = pp. 3
Two- and Three-Variable K-MapsK 3-variable C 0 0 0 000 00 0 00 0 0 0 00 0 C m 0 m 4 m m 5 => C m 3 m 7 m 2 m 6 pp. 4
Two- and Three-Variable K-MapsK Ex: K-map for F(a,b,c) = m(,3,5) = M(0,2,4,6,7) C 0 0 0 0 0 0 0 0 0 C F = C + C + C = C + C => Minimum SOP form pp. 5
Two- and Three-Variable K-MapsK Other combinations C 0 C C 0 0 0 0 C C F = (F = C+C+ C +C ) F = C +C = C F = C pp. 6
Two- and Three-Variable K-MapsK Ex: f(a,b,c) = abc + b c + a a a b c b c b c b c b c => K-map simplification c a b a abc => F = a + b c + bc pp. 7
Two- and Three-Variable K-MapsK Consensus theorem: XY+X Z +YZ = XY+X Z Y Z X X Y Z X X Z Y => Z Y pp. 8
b c c Graduate Institute of Electronics Engineering, NTU Same Simplification in K-MapsK F = m(0,,2,5,6,7) Check no. of terms and no. of literals a a a b c c a F(a,b,c) = a b +bc +ac b F(a,b,c) = a c +b c+ab b pp. 9
Four-Variable K-MapsK Ex: K-map of F(a,b,c,d) = acd + a b + d C D 00 0 0 b D 0 0 0 4 2 8 0 5 3 9 3 7 5 0 2 6 4 0 C d c a F = d + a b + ac pp. 0
Four-Variable K-MapsK Ex : F = m(,3,4,5,0,2,3) C D 00 0 0 0 0 F = C + D + CD D 0 0 C Circle of 2 k => Eliminate k variables Ex 2: F = m(0,2,3,5,6,7,8,0,,4,5) F = C + D + D F = SOP ( 選 0) => F = POS (De Morgan) pp.
K-Map with Don t t cares Ex 3: F(,,C,D) = m(,3,5,7,9)+ d(6,2,3) D X 0 X 0 X C F = D+C D (SOP) Ex 4: Obtain POS form of minimum f(a,b,c,d) Find the minimum SOP form of f (a,b,c,d) by looping the 0 s on a map of f(a,b,c,d) pp. 2
Four-Variable K-MapsK Ex: f = X Z + WYZ + W Y Z + X Y W X Y Z W f = () + (2) + (3) Z 0 0 0 0 0 0 0 0 0 0 0 0 (2) (3) () Y = Y Z + W YX + WXZ De Morgan s Law f = [Y Z+W XY+WXZ ] =(Y+Z )(W+X +Y )(W +X +Z) X pp. 3
Prime Implicants Implicant: ny single or any group of s in the K-map of F function. Prime Implicant: If it cannot be combined with another term to eliminate a variable. single on the K-map represents a PI if it is not adjacent to any other s. Two adjacent s on a map form a PI if they are not contained in a group of 4 s. pp. 4
Prime Implicants Implicant: product term ( terms) 5 minterms: { C, C, C, C, C} 5 group of 2-literal terms: {,, C, C, C} group of -literal term: {} C 00 0 0 0 Prime Implicant (PI): n implicant that is not covered by another implicant: {, C} pp. 5
Essential Prime Implicants Essential Prime Implicant (EPI): PI that covers at least one minterm that is not covered by another PI. => {, C} are also Essential PI. => n essential PI in the K-map by noting that it covers at least one minterm that is circled only once. C 00 0 0 0 Cover: set of PI s which covers all s. (all minterms) pp. 6
Essential Prime Implicants Ex: a b c d 00 0 0 0 0 0 0 c ll PI s: {a b d, bc, acd, a c d, ab, b cd} F = b c + ac + a b d Ex: C D D a C ll PI s: {CD, D, C, C} Essential PI s: {D, C,C} f = D+ C+C pp. 7
Essential Prime Implicants Ex: C D D EPI EPI EPI C Essential PI s: { C, D, CD} Two PI s can cover CD: { D, CD} D f = C + D +CD+ or CD pp. 8
Essential Prime Implicants Ex: C D 00 0 0 0 0 X 0 0 X X PI (3) F = ()+(2)+(3) Rule: () EPI EPI (2). Find all Essential PI s. 2. Find a minimum set of PI s to cover the remaining s on the map. pp. 9
Flowchart for determining a minimum Sum of Products based on EPIs and PIs pp. 20
K-map for 5 Variables pp. 2
Other forms of 5-variable 5 K-mapK pp. 22