Presentation is loading. Please wait.

Presentation is loading. Please wait.

07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.

Similar presentations


Presentation on theme: "07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating."— Presentation transcript:

1 07 KM Page 1 ECEn/CS 224 Karnaugh Maps

2 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating logic functions. Hooray !!

3 07 KM Page 3 ECEn/CS 224 Karnaugh Map Advantages Can be done more systematically Much simpler to find minimum solutions Easier to see what is happening (graphical) Almost always use instead of boolean minimization…

4 07 KM Page 4 ECEn/CS 224 Truth Table Adjacencies F = A’ These are adjacent in a gray code sense - they differ by 1 bit We can apply XY + XY’ = X A’B’ + A’B = A’(B’+B) = A’(1) = A’ F = B Same idea: A’B + AB = B Key idea: Gray code adjacency allows use of simplification theorem> Problem: Physical adjacency in truth table  gray code adjacency

5 07 KM Page 5 ECEn/CS 224 2 Variable Karnaugh Map A=0, B=0 A=0, B=1 A=1, B=0 A=1, B=1 A different way to draw a truth table by folding it

6 07 KM Page 6 ECEn/CS 224 KMap Physical adjacency does imply gray code adjacency F = A’B + AB = BF =A’B’ + A’B = A’

7 07 KM Page 7 ECEn/CS 224 2 Variable Karnaugh Map

8 07 KM Page 8 ECEn/CS 224 2 Variable Karnaugh Map

9 07 KM Page 9 ECEn/CS 224 2 Variable Karnaugh Map

10 07 KM Page 10 ECEn/CS 224 2 Variable Karnaugh Map F = A’B’ + A’B = A’

11 07 KM Page 11 ECEn/CS 224 2 Variable Karnaugh Map A = 0 B = 0 or 1 F = A’B’ + A’B = A’

12 07 KM Page 12 ECEn/CS 224 Another Example F = A’B + AB’ + AB = A + B Each ‘1’ must be covered at least once

13 07 KM Page 13 ECEn/CS 224 Yet Another Example F = A’B’ + A’B + AB’ + AB = 1 Groups of more than two 1’s can be combined

14 07 KM Page 14 ECEn/CS 224 3 Variable Karnaugh Map Showing Minterm Locations ABC=010 ABC = 101 Note the order of the B C variables: 0 0 0 1 1 1 1 0

15 07 KM Page 15 ECEn/CS 224 Adjacencies Adjacent squares differ by exactly one variable There is wrap-around: top and bottom rows are adjacent

16 07 KM Page 16 ECEn/CS 224 Truth Table to Karnaugh Map

17 07 KM Page 17 ECEn/CS 224 Solution Example A’BC+A’BC’ = A’B AB’C+ABC = AC F = A’B + AC

18 07 KM Page 18 ECEn/CS 224 Another Example A’B’C+A’BC = A’C AB’C’+ABC’ = AC’ F = A’C + AC’ = A ⊕ C

19 07 KM Page 19 ECEn/CS 224 Minterm Expansion to KMap F =  m( 1, 3, 4, 6 ) Minterms are the 1’s, everything else is 0

20 07 KM Page 20 ECEn/CS 224 Maxterm Expansion to KMap F = π M(0, 2, 5, 7) Maxterms are the 0’s, everything else is 1

21 07 KM Page 21 ECEn/CS 224 Yet Another Example A’B’C’+AB’C’+A’B’C+AB’C = B’ AB’C+ABC = AC F = B’ + AC 2 n 1’s can be circled at a time 1, 2, 4, 8, … OK 3 not OK The larger the group of 1’s – the simpler the resulting product term

22 07 KM Page 22 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

23 07 KM Page 23 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

24 07 KM Page 24 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

25 07 KM Page 25 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’ Remaining spaces are 0

26 07 KM Page 26 ECEn/CS 224 Boolean Algebra to Karnaugh Map F = B’C’ + BC + A’ This is a simpler equation than we started with. Do you see how it was arrived at?

27 07 KM Page 27 ECEn/CS 224 Mapping Sum of Product Terms The 3 variable map has 12 possible groups of 2 spaces These become terms with 2 literals

28 07 KM Page 28 ECEn/CS 224 Mapping Sum of Product Terms The 3 variable map has 6 possible groups of 4 spaces These become terms with 1 literal

29 07 KM Page 29 ECEn/CS 224 4 Variable Karnaugh Map Note the row and column orderings Required for adjacency D A’BC AB’C’ F = A’BC + AB’C’ + D

30 07 KM Page 30 ECEn/CS 224 Find a POS Solution Find solutions to groups of 0’s to find F’ Invert to get F using DeMorgan’s C’D F’ = C’D + BC’ + AB’CD’ F = (C+D’)(A’+B+C’+D)(B’+C) AB’CD’ BC’

31 07 KM Page 31 ECEn/CS 224 Dealing With Don’t Cares A’B’C+AB’C+A’BC+ABC = C F = C Circle the x’s that help get bigger groups of 1’s (or 0’s if POS) Don’t circle the x’s that don’t F =  m(1, 3, 7) +  d(0, 5)

32 07 KM Page 32 ECEn/CS 224 Minimal K-Map Solutions Some Terminology and An Algorithm to Find Them

33 07 KM Page 33 ECEn/CS 224 Prime Implicants A group of 1’s which are adjacent and can be combined on a Karnaugh Map is called an implicant. The biggest group of 1’s which can be circled to cover a 1 is called a prime implicant. –they are the only implicants we care about.

34 07 KM Page 34 ECEn/CS 224 Prime Implicants Non-prime Implicants Are there any additional prime implicants in the map that are not shown above?

35 07 KM Page 35 ECEn/CS 224 All The Prime Implicants Prime Implicants When looking for a minimal solution – only circle prime implicants… A minimal solution will never contain non-prime implicants

36 07 KM Page 36 ECEn/CS 224 Essential Prime Implicants Not all prime implicants are required… A prime implicant which is the only cover of some 1’s is essential – a minimal solution requires it. Essential Prime ImplicantsNon-essential Prime Implicants

37 07 KM Page 37 ECEn/CS 224 A Minimal Solution Example Minimum Not required… F = AB’ + BC + AD

38 07 KM Page 38 ECEn/CS 224 Another Example Minimum A’B’ is not required… Every one one of its locations is covered by multiple implicants After choosing essentials, everything is covered… F = A’D + BCD + B’D’

39 07 KM Page 39 ECEn/CS 224 Finding the Minimum Sum of Products 1. Find each essential prime implicant and include it in the solution. 2. Determine if any minterms are not yet covered. 3. Find the minimal # of remaining prime implicants which finish the cover.

40 07 KM Page 40 ECEn/CS 224 Essentials: A’D’ and AD Non-essentials: A’C and CD Solution: A’D’ + AD + A’C or A’D’ + AD+ CD Yet Another Example (Use of non-essential primes) AD CD A’C A’D’

41 07 KM Page 41 ECEn/CS 224 K-Map Solution Summary Identify prime implicants Add essentials to solution Find minimum # non-essentials required to cover rest of map

42 07 KM Page 42 ECEn/CS 224 5- and 6-Variable K-Maps

43 07 KM Page 43 ECEn/CS 224 5 Variable Karnaugh Map The planes are adjacent to one another (one is above the other in 3D) This is the A=0 planeThis is the A=1 plane

44 07 KM Page 44 ECEn/CS 224 Some Implicants in a 5-Variable KMap A=0A=1 D’E’ AB’C’D A’BCD B’C’DE’ ABC’DE

45 07 KM Page 45 ECEn/CS 224 5-Variable KMap Example A=0A=1 F = B’D’ + BCD + A’BDE Find the minimum sum-of-products for: F =  m (0,1,4,5,11,14,15,16,17,20,21,30,31)

46 07 KM Page 46 ECEn/CS 224 6 Variable Karnaugh Map AB=00 AB=01 AB=10 AB=11

47 07 KM Page 47 ECEn/CS 224 AB=10 AB=11 = CDEF= AC’D’ Solution = AC’D’ + CDEF AB=00 AB=01

48 07 KM Page 48 ECEn/CS 224 KMap Summary A Kmap is simply a folded truth table –where physical adjacency implies logical adjacency KMaps are most commonly used hand method for logic minimization KMaps have other uses for visualizing boolean equations –you may seem some later.


Download ppt "07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating."

Similar presentations


Ads by Google