1 / 103

CMPUT329 - Fall 2003

CMPUT329 - Fall 2003. Topic 5: Quine-McCluskey Method José Nelson Amaral. Reading Assignment. Section 4.4. Motivation. Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are difficult to use and error prone for circuits with

xandy
Télécharger la présentation

CMPUT329 - Fall 2003

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. CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral CMPUT 329 - Computer Organization and Architecture II

  2. Reading Assignment Section 4.4 CMPUT 329 - Computer Organization and Architecture II

  3. Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are difficult to use and error prone for circuits with many inputs. Karnaugh maps depend on our ability to visually identify prime implicants and select a set of prime implicants that cover all minterms. They do not provide a direct algorithm to be implemented in a computer. For larger systems, we need a programmable method!! CMPUT 329 - Computer Organization and Architecture II

  4. Edward J. McCluskey, Professor of Electrical Engineering and Computer Science at Stanford http://www-crc.stanford.edu/users/ejm/McCluskey_Edward.html McCluskey Jr., Edward J. “Minimization of Boolean Functions.” Bell Systems Technical Journal, vol. 35, pp. 1417-1444, 1956 Quine-McCluskey Willard van Orman Quine 1908-2000, Edgar Pierce Chair of Philosophy at Harvard University. http://members.aol.com/drquine/wv-quine.html Quine, Willard, “The problem of simplifying truth functions.” American Mathematical Monthly, vol. 59, 1952. Quine, Willard, “A way to simplify truth functions.” American Mathematical Monthly, vol. 62, 1955. CMPUT 329 - Computer Organization and Architecture II

  5. Outline of the Quine-McCluskey Method 1. Produce a minterm expansion (standard sum-of-products form) for a function F 2. Eliminate as many literals as possible by systematically applying XY + XY’ = X. 3. Use a prime implicant chart to select a minimum set of prime implicantsthat when ORed together produce F, and that contains a minimum number of literals. CMPUT 329 - Computer Organization and Architecture II

  6. Determination of Prime Implicants by Combining Method AB’CD’ + AB’CD = AB’C 1 0 1 0 + 1 0 1 1 = 1 0 1 - (The dash indicates a missing variable) We can combine the minterms above because they differ by a single bit. The minterms below won’t combine A’BC’D + A’BCD’ 0 1 0 1 + 0 1 1 0 CMPUT 329 - Computer Organization and Architecture II

  7. Quine-McCluskey MethodAn Example 1. Find all the prime implicants Group the minterms according to the number of 1s in the minterm. This way we only have to compare minterms from adjacent groups. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 CMPUT 329 - Computer Organization and Architecture II

  8. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Combining group 0 and group 1: CMPUT 329 - Computer Organization and Architecture II

  9. 0,1 000-  group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Combining group 0 and group 1: CMPUT 329 - Computer Organization and Architecture II

  10. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0   Combining group 0 and group 1: CMPUT 329 - Computer Organization and Architecture II

  11. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Does it make sense to no combine group 0 with group 2 or 3?  0,1 000- 0,2 00-0 0,8 -000    No, there are at least two bits that are different. CMPUT 329 - Computer Organization and Architecture II

  12. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Does it make sense to no combine group 0 with group 2 or 3?  0,1 000- 0,2 00-0 0,8 -000    No, there are at least two bits that are different. Thus, next we combine group 1 and group 2. CMPUT 329 - Computer Organization and Architecture II

  13. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01    Combine group 1 and group 2.  CMPUT 329 - Computer Organization and Architecture II

  14. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01    Combine group 1 and group 2.  CMPUT 329 - Computer Organization and Architecture II

  15. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001    Combine group 1 and group 2.   CMPUT 329 - Computer Organization and Architecture II

  16. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001    Combine group 1 and group 2.   CMPUT 329 - Computer Organization and Architecture II

  17. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001    Combine group 1 and group 2.   CMPUT 329 - Computer Organization and Architecture II

  18. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001    Combine group 1 and group 2.   CMPUT 329 - Computer Organization and Architecture II

  19. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10    Combine group 1 and group 2.    CMPUT 329 - Computer Organization and Architecture II

  20. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10    Combine group 1 and group 2.    CMPUT 329 - Computer Organization and Architecture II

  21. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010    Combine group 1 and group 2.     CMPUT 329 - Computer Organization and Architecture II

  22. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010    Combine group 1 and group 2.     CMPUT 329 - Computer Organization and Architecture II

  23. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010    Combine group 1 and group 2.     CMPUT 329 - Computer Organization and Architecture II

  24. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100-    Combine group 1 and group 2.     CMPUT 329 - Computer Organization and Architecture II

  25. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 Again, there is no need to try to combine group 1 with group 2.        CMPUT 329 - Computer Organization and Architecture II

  26. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 Again, there is no need to try to combine group 1 with group 3.      Lets try to combine group 2 with group 3.   CMPUT 329 - Computer Organization and Architecture II

  27. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1    Combine group 2 and group 3.      CMPUT 329 - Computer Organization and Architecture II

  28. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1    Combine group 2 and group 3.      CMPUT 329 - Computer Organization and Architecture II

  29. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011-    Combine group 2 and group 3.      CMPUT 329 - Computer Organization and Architecture II

  30. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110    Combine group 2 and group 3.       CMPUT 329 - Computer Organization and Architecture II

  31. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110    Combine group 2 and group 3.       CMPUT 329 - Computer Organization and Architecture II

  32. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110    Combine group 2 and group 3.       CMPUT 329 - Computer Organization and Architecture II

  33. group 0 0 0000 1 0001 2 0010 8 1000 group 1 5 0101 6 0110 9 1001 10 1010 group 2 7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110    Combine group 2 and group 3.       CMPUT 329 - Computer Organization and Architecture II

  34.   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10 We have now completed the first step. All minterms in column I were included. We can divide column II into groups. CMPUT 329 - Computer Organization and Architecture II

  35. Column I Column II  0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example CMPUT 329 - Computer Organization and Architecture II

  36. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III CMPUT 329 - Computer Organization and Architecture II

  37. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III CMPUT 329 - Computer Organization and Architecture II

  38. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III CMPUT 329 - Computer Organization and Architecture II

  39. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III CMPUT 329 - Computer Organization and Architecture II

  40. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III CMPUT 329 - Computer Organization and Architecture II

  41. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  42. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  43. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  44. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  45. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  46. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  47. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00-  CMPUT 329 - Computer Organization and Architecture II

  48. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00- 0,2,8,10 -0-0    CMPUT 329 - Computer Organization and Architecture II

  49. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00- 0,2,8,10 -0-0    CMPUT 329 - Computer Organization and Architecture II

  50. 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 100- 8,10 10-0 5,7 01-1 6,7 011- 6,14 -110 10,14 1-10   group 0 0 0000  1 0001 2 0010 8 1000 group 1    5 0101 6 0110 9 1001 10 1010  group 2   7 0111 14 1110 group 3 Quine-McCluskey MethodAn Example Column I Column II Column III  0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00-      CMPUT 329 - Computer Organization and Architecture II

More Related