Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2003-2008 BYU 07 KM Page 1 ECEn/CS 224 Karnaugh Maps.

Similar presentations


Presentation on theme: "© 2003-2008 BYU 07 KM Page 1 ECEn/CS 224 Karnaugh Maps."— Presentation transcript:

1 © BYU 07 KM Page 1 ECEn/CS 224 Karnaugh Maps

2 © BYU 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 © BYU 07 KM Page 3 ECEn/CS 224 Karnaugh Map Advantages Minimization can be done more systematically Much simpler to find minimum solutions Easier to see what is happening (graphical) Almost always used instead of boolean minimization.

4 © BYU 07 KM Page 4 ECEn/CS 224 Gray Codes Gray code is a binary value encoding in which adjacent values only differ by one bit 2-bit Gray Code

5 © BYU 07 KM Page 5 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 theorems Problem: Physical adjacency in truth table does not indicate gray code adjacency

6 © BYU 07 KM Page 6 ECEn/CS 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 ABF

7 © BYU 07 KM Page 7 ECEn/CS 224 Karnaugh Map In a K-map, physical adjacency does imply gray code adjacency F = A’B + AB = BF =A’B’ + A’B = A’

8 © BYU 07 KM Page 8 ECEn/CS Variable Karnaugh Map

9 © BYU 07 KM Page 9 ECEn/CS Variable Karnaugh Map

10 © BYU 07 KM Page 10 ECEn/CS Variable Karnaugh Map

11 © BYU 07 KM Page 11 ECEn/CS Variable Karnaugh Map

12 © BYU 07 KM Page 12 ECEn/CS Variable Karnaugh Map F = A’B’ + A’B = A’

13 © BYU 07 KM Page 13 ECEn/CS Variable Karnaugh Map A = 0 F = A’

14 © BYU 07 KM Page 14 ECEn/CS 224 Another Example F = A’B + AB’ + AB = (A’B + AB) + (AB’ + AB) = A + B

15 © BYU 07 KM Page 15 ECEn/CS 224 F = A + B Another Example A = 1 B = 1

16 © BYU 07 KM Page 16 ECEn/CS 224 Yet Another Example F = 1 Groups of more than two 1’s can be combined

17 © BYU 07 KM Page 17 ECEn/CS Variable Karnaugh Map Showing Minterm Locations Note the order of the B C variables: ABC = 010 ABC = 101

18 © BYU 07 KM Page 18 ECEn/CS Variable Karnaugh Map Showing Minterm Locations ABC = 010 ABC = 101 Note the order of the B C variables:

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

20 © BYU 07 KM Page 20 ECEn/CS 224 Truth Table to Karnaugh Map

21 © BYU 07 KM Page 21 ECEn/CS 224 Minimization Example A’BC+A’BC’ = A’B AB’C+ABC = AC F = A’B + AC

22 © BYU 07 KM Page 22 ECEn/CS 224 Another Example A’B’C+A’BC = A’C AB’C’+ABC’ = AC’ F = A’C + AC’ = A  C

23 © BYU 07 KM Page 23 ECEn/CS 224 Minterm Expansion to K-Map F =  m( 1, 3, 4, 6 ) Minterms are the 1’s, everything else is

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

25 © BYU 07 KM Page 25 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

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

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

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

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

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

31 © BYU 07 KM Page 31 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 we obtained it? Now minimize...

32 © BYU 07 KM Page 32 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

33 © BYU 07 KM Page 33 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

34 © BYU 07 KM Page 34 ECEn/CS Variable Karnaugh Map Note the row and column orderings. Required for adjacency D A’BC AB’C’ F = A’BC + AB’C’ + D

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

36 © BYU 07 KM Page 36 ECEn/CS 224 Dealing With Don’t Cares F =  m(1, 3, 7) +  d(0, 5)

37 © BYU 07 KM Page 37 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)

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

39 © BYU 07 KM Page 39 ECEn/CS 224 Prime Implicants A group of one or more 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 given 1 is called a prime implicant. –They are the only implicants we care about.

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

41 © BYU 07 KM Page 41 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

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

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

44 © BYU 07 KM Page 44 ECEn/CS 224 Another Example

45 © BYU 07 KM Page 45 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’

46 © BYU 07 KM Page 46 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.

47 © BYU 07 KM Page 47 ECEn/CS 224 Yet Another Example (Use of non-essential primes)

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

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

50 © BYU 07 KM Page 50 ECEn/CS and 6-Variable K-Maps

51 © BYU 07 KM Page 51 ECEn/CS 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

52 © BYU 07 KM Page 52 ECEn/CS 224 D’E’ Some Implicants in a 5-Variable KMap A=0A=1 AB’C’D A’BCD B’C’DE’ ABC’DE Some of these are not prime…

53 © BYU 07 KM Page 53 ECEn/CS Variable KMap Example A=0A=1 Find the minimum sum-of-products for: F =  m (0,1,4,5,11,14,15,16,17,20,21,30,31)

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

55 © BYU 07 KM Page 55 ECEn/CS Variable Karnaugh Map AB=00 AB=01 AB=10 AB=11

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

57 © BYU 07 KM Page 57 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 see some later.


Download ppt "© 2003-2008 BYU 07 KM Page 1 ECEn/CS 224 Karnaugh Maps."

Similar presentations


Ads by Google