1 / 57

Karnaugh Maps

Karnaugh Maps. What are Karnaugh Maps?. A simpler way to handle most (but not all) jobs of manipulating logic functions. Hooray !!. Karnaugh Map Advantages. Minimization can be done more systematically Much simpler to find minimum solutions Easier to see what is happening (graphical)

teigra
Download Presentation

Karnaugh Maps

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Karnaugh Maps ECEn/CS 224

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

  3. 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. ECEn/CS 224

  4. Gray Codes • Gray code is a binary value encoding in which adjacent values only differ by one bit ECEn/CS 224

  5. Truth Table Adjacencies 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 = 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 ECEn/CS 224

  6. 2-Variable Karnaugh Map A=1, B=0 A=0, B=0 A=1, B=1 A=0, B=1 A different way to draw a truth table: by folding it ECEn/CS 224

  7. Karnaugh Map • In a K-map, physical adjacency does imply gray code adjacency F =A’B’ + A’B = A’ F = A’B + AB = B ECEn/CS 224

  8. 2-Variable Karnaugh Map ECEn/CS 224

  9. 2-Variable Karnaugh Map ECEn/CS 224

  10. 2-Variable Karnaugh Map ECEn/CS 224

  11. 2-Variable Karnaugh Map ECEn/CS 224

  12. 2-Variable Karnaugh Map F = A’B’ + A’B = A’ ECEn/CS 224

  13. 2-Variable Karnaugh Map A = 0 F = A’ ECEn/CS 224

  14. Another Example F = A’B + AB’ + AB = (A’B + AB) + (AB’ + AB) = A + B ECEn/CS 224

  15. Another Example A = 1 B = 1 F = A + B ECEn/CS 224

  16. Yet Another Example F = 1 Groups of more than two 1’s can be combined ECEn/CS 224

  17. 3-Variable Karnaugh Map Showing Minterm Locations Note the order of the B C variables: 0 0 0 1 1 1 1 0 ABC = 101 ABC = 010 ECEn/CS 224

  18. 3-Variable Karnaugh Map Showing Minterm Locations Note the order of the B C variables: 0 0 0 1 1 1 1 0 ABC = 101 ABC = 010 ECEn/CS 224

  19. Adjacencies • Adjacent squares differ by exactly one variable There is wrap-around: top and bottom rows are adjacent ECEn/CS 224

  20. Truth Table to Karnaugh Map 0 0 1 0 1 1 0 1 ECEn/CS 224

  21. Minimization Example AB’C+ABC = AC A’BC+A’BC’ = A’B F = A’B + AC ECEn/CS 224

  22. Another Example AB’C’+ABC’ = AC’ A’B’C+A’BC = A’C F = A’C + AC’ = A C ECEn/CS 224

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

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

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

  26. Boolean Algebra to Karnaugh Map Plot: ab’c’ + bc + a’ ECEn/CS 224

  27. Boolean Algebra to Karnaugh Map Plot: ab’c’ + bc + a’ ECEn/CS 224

  28. Boolean Algebra to Karnaugh Map Plot: ab’c’ + bc + a’ ECEn/CS 224

  29. Boolean Algebra to Karnaugh Map Plot: ab’c’ + bc + a’ ECEn/CS 224

  30. Boolean Algebra to Karnaugh Map Plot: ab’c’ + bc + a’ Remaining spaces are 0 ECEn/CS 224

  31. Boolean Algebra to Karnaugh Map F = B’C’ + BC + A’ Now minimize . . . This is a simpler equation thanwe started with. Do you see how we obtained it? ECEn/CS 224

  32. Mapping Sum of Product Terms The 3-variable map has 12 possible groups of 2 spaces These become terms with 2 literals ECEn/CS 224

  33. Mapping Sum of Product Terms The 3-variable map has 6 possible groups of 4 spaces These become terms with 1 literal ECEn/CS 224

  34. 4-Variable Karnaugh Map AB’C’ D A’BC F = A’BC + AB’C’ + D Note the rowand column orderings. Required for adjacency ECEn/CS 224

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

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

  37. Dealing With Don’t Cares F = m(1, 3, 7) + d(0, 5) 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 ECEn/CS 224

  38. Minimal K-Map Solutions Some Terminology and An Algorithm to Find Them ECEn/CS 224

  39. 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. ECEn/CS 224

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

  41. 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 ECEn/CS 224

  42. 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 Implicants Non-essential Prime Implicants ECEn/CS 224

  43. A Minimal Solution Example Not required… F = AB’ + BC + AD Minimum ECEn/CS 224

  44. Another Example ECEn/CS 224

  45. Another Example A’B’ is not required…Every one one of itslocations is covered by multiple implicants After choosing essentials, everything is covered… F = A’D + BCD + B’D’ Minimum ECEn/CS 224

  46. 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. ECEn/CS 224

  47. Yet Another Example(Use of non-essential primes) ECEn/CS 224

  48. Yet Another Example(Use of non-essential primes) AD CD A’C Essentials: A’D’ and ADNon-essentials: A’C and CD Solution: A’D’ + AD + A’C or A’D’ + AD + CD A’D’ ECEn/CS 224

  49. K-Map Solution Summary • Identify prime implicants • Add essentials to solution • Find a minimum # non-essentials required to cover rest of map ECEn/CS 224

  50. 5- and 6-Variable K-Maps ECEn/CS 224

More Related