cmput329 - fall 2003

103
CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral CMPUT 329 - Computer Organization and Architecture II 1

Upload: xandy

Post on 07-Jan-2016

24 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

CMPUT329 - Fall 2000

CMPUT329 - Fall 2003Topic 5: Quine-McCluskey Method

Jos Nelson AmaralCMPUT 329 - Computer Organization and Architecture II1

1Reading AssignmentCMPUT 329 - Computer Organization and Architecture II2Section 4.4MotivationCMPUT 329 - Computer Organization and Architecture II3Karnaugh maps are very effective for the minimizationof expressions with up to 5 or 6 inputs. However theyare difficult to use and error prone for circuits withmany inputs.Karnaugh maps depend on our ability to visuallyidentify prime implicants and select a set of primeimplicants that cover all minterms. They do notprovide a direct algorithm to be implemented in acomputer.For larger systems, we need a programmable method!!Quine-McCluskeyCMPUT 329 - Computer Organization and Architecture II4Quine, Willard, A way to simplify truth functions. American Mathematical Monthly, vol. 62, 1955.Quine, Willard, The problem of simplifying truth functions. American Mathematical Monthly, vol. 59, 1952.

Willard van Orman Quine 1908-2000, Edgar Pierce Chair of Philosophy at Harvard University.http://members.aol.com/drquine/wv-quine.htmlMcCluskey Jr., Edward J. Minimization of Boolean Functions. Bell Systems Technical Journal, vol. 35, pp. 1417-1444, 1956

Edward J. McCluskey, Professor of ElectricalEngineering and Computer Science at Stanfordhttp://www-crc.stanford.edu/users/ejm/McCluskey_Edward.htmlOutline of the Quine-McCluskey MethodCMPUT 329 - Computer Organization and Architecture II51. 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 implicants that when ORed together produce F, and that contains a minimum number of literals.Determination of Prime Implicants by Combining MethodCMPUT 329 - Computer Organization and Architecture II6ABCD + ABCD = ABC

1 0 1 0 + 1 0 1 1 = 1 0 1 -(The dash indicates a missing variable)ABCD + ABCD

0 1 0 1 + 0 1 1 0We can combine the minterms above because theydiffer by a single bit. The minterms below wont combineQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II71. Find all the prime implicants

group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Group the minterms according to the numberof 1s in the minterm.

This way we only have tocompare minterms fromadjacent groups.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II8group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn IICombininggroup 0 andgroup 1:Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II9group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000-Combininggroup 0 andgroup 1:Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II10group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0Combininggroup 0 andgroup 1:Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II11group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000Does it makesense to nocombine group 0with group 2 or 3?No, there are atleast two bits thatare different.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II12group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000Does it makesense to nocombine group 0with group 2 or 3?No, there are atleast two bits thatare different.Thus, next we combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II13group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II14group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II15group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II16group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II17group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II18group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II19group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II20group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II21group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II22group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II23group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn II 0,1 000- 0,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010Combine group 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II24group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 1and group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II25group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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-0Again, there isno need to tryto combine group1 with group 2.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II26group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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-0Again, there isno need to tryto combine group1 with group 3.Lets try to combinegroup 2 with group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II27group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II28group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II29group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II30group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 -110Combine group 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II31group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 -110Combine group 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II32group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 -110Combine group 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II33group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110Column IColumn 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 -110Combine group 2and group 3.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II34Column IColumn 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 -11010,14 1-10group 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110We have nowcompleted thefirst step. Allminterms in column I wereincluded.

We can dividecolumn II intogroups.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II35Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II36Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column IIIQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II37Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column IIIQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II38Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column IIIQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II39Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column IIIQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II40Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column IIIQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II41Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II42Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II43Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II44Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II45Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II46Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II47Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II48Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II49Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II50Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II51Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00-Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II52Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II53Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II54Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II55Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II56Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II57Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II58Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10 2,10,6,14 --10Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II59Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10 2,10,6,14 --10Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II60Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10 2,10,6,14 --10Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II61Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10 2,10,6,14 --10No more combinationsare possible, thus westop here.Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II62Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 0,8,1,9 -00- 0,8,2,10 -0-0 2,6,10,14 --10 2,10,6,14 --10We can eliminate repeatedcombinationsQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II63Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acdNow we form f with theterms not checkedQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II64Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acd + abdQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II65Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acd + abd + abcQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II66Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acd + abd + abc + bcQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II67Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acd + abd + abc + bc + bdQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II68Column IColumn IIgroup 0group 1group 2group 30 00001 00012 00108 1000 5 0101 6 0110 9 100110 1010 7 011114 1110 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 -11010,14 1-10Column III 0,1,8,9 -00- 0,2,8,10 -0-0 2,6,10,14 --10f = acd + abd + abc + bc + bd + cdQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II69f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a1bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II70f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a11bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II71f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a111bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II72f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a111111bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II73f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a11111111bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II74f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized. Using a Karnaugh map we can obtain:a111111111bcd 1 Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II75f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a111111111bcd1 F = abdQuine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II76f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a111111111bcd1 F = abd + cd Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II77f = acd + abd + abc + bc + bd + cdBut, the form below is not minimized, using a Karnaugh map we can obtain:a111111111bcd1 F = abd + cd + bc Quine-McCluskey MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II78f = acd + abd + abc + bc + bd + cdWhat are the extra terms in the solution obtainedwith the Quine-McCluskey method?a111111111bcd1 F = abd + cd + bc Thus, we need a method to eliminate this redundant termsfrom the Quine-McCluskey solution.The Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II79The prime implicant chart is the second part ofthe Quine-McCluskey procedure.

It is used to select a minimum set of prime implicants.

Similar to the Karnaugh map, we first selectthe essential prime implicants, and then weselect enough prime implicants to cover allthe minterms of the function.Prime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II80

Question: Given the prime implicant chart above, how can we identify the essential prime implicants of the function?mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II81

Similar to the Karnaugh map, all we have to do is to look for minterms that are covered by a singleterm.mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II82

Once a term is included in the solution, all theminterms covered by that term are covered.

Therefore we may now mark the covered mintermsand find terms that are no longer useful.mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II83

mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II84

As we have not covered all the minterms withessential prime implicants, we must chooseenough non-essential prime implicants to cover the remaining minterms.mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II85

What strategy should we use to find a minimumcover for the remaining minterms?mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II86

We choose first prime implicants that cover themost minterms. Should this strategy always work??mintermsPrime ImplicantsPrime Implicant Chart (Example)CMPUT 329 - Computer Organization and Architecture II87

Therefore our minimum solution is:f(a,b,c,d) = bc + cd + abdmintermsPrime ImplicantsCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II88F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Which ones are the essential prime implicants in this chart?There is no essential prime implicants, how we proceed?mintermsPrime ImplicantsCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II89F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Also, all implicants cover the same number of minterms. We will have to proceed by trial and error. mintermsPrime ImplicantsF(a,b,c) = abCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II90F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Also, all implicants cover the same number of minterms. We will have to proceed by trial and error. mintermsPrime ImplicantsF(a,b,c) = ab + bcCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II91F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Thus, we get the minimization:F(a,b,c) = ab + bc + acmintermsPrime ImplicantsCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II92F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Lets try another set of prime implicants.mintermsPrime ImplicantsCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II93F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Lets try another set of prime implicants.mintermsPrime ImplicantsF(a,b,c) = ac Cyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II94F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Lets try another set of prime implicants.mintermsPrime ImplicantsF(a,b,c) = ac + bcCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II95F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

Lets try another set of prime implicants.mintermsPrime ImplicantsF(a,b,c) = ac + bc+ abCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II96F(a,b,c) = m(0, 1, 2, 5, 6, 7)0 000 1 001 2 010 5 101 6 110 7 111 0,1 00-0,2 0-01,5 -012,6 -105,7 1-16,7 11-

This time we obtain:F(a,b,c) = ac + bc+ abmintermsPrime ImplicantsCyclic Prime Implicant ChartCMPUT 329 - Computer Organization and Architecture II97Which minimal form is better?F(a,b,c) = ab + bc + acF(a,b,c) = ac + bc+ abDepends on what terms we must form for otherfunctions that we must also implement.Often we are interested in examining all minimalforms for a given function.Thus we need an algorithm to do so.Petricks MethodCMPUT 329 - Computer Organization and Architecture II98S. R. Petrick. A direct determination of the irredundant forms of a boolean function from the set of prime implicants. Technical Report AFCRC-TR-56-110, Air Force Cambridge Research Center, Cambridge, MA, April, 1956.Goal: Given a prime implicant chart, determine all minimum sum-of-products solutions.Petricks MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II99

Step 1: Label all the rows in the chart.Step 2: Form a logic function P with the logic variables P1, P2, P3 that is true when all the minterms in the chart are covered.mintermsPrime ImplicantsPetricks MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II100

The first column has an X in rows P1 and P2. Therefore we must include one of these rowsin order to cover minterm 0. Thus the followingterm must be in P:(P1 + P2)mintermsPrime ImplicantsPetricks MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II101

Following this technique, we obtain:P = (P1 + P2) (P1 + P3) (P2 + P4) (P3 + P5) (P4 + P6) (P5 + P6)P = (P1 + P2) (P1 + P3) (P4 + P2) (P5 + P3) (P4 + P6) (P5 + P6)P = (P1 + P2) (P1 + P3) (P4 + P2) (P4 + P6) (P5 + P3) (P5 + P6)P = (P1 + P2 P3) (P4 + P2 P6) (P5 + P3 P6)mintermsPrime ImplicantsPetricks MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II102P = (P1 + P2) (P1 + P3) (P2 + P4) (P3 + P5) (P4 + P6) (P5 + P6)P = (P1 + P2) (P1 + P3) (P4 + P2) (P5 + P3) (P4 + P6) (P5 + P6)P = (P1 + P2) (P1 + P3) (P4 + P2) (P4 + P6) (P5 + P3) (P5 + P6)P = (P1 + P2 P3) (P4 + P2 P6) (P5 + P3 P6)P = (P1 P4 + P1 P2 P6 + P2 P3 P4 + P2 P3 P6) (P5 + P3 P6)P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P2 P3 P5 P6 + P1 P3 P4 P6 + P1 P2 P3 P6 + P2 P3 P4 P6 + P2 P3 P6P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6Petricks MethodAn ExampleCMPUT 329 - Computer Organization and Architecture II103P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6This expression says that to cover all the mintermswe must include the terms in line P1 and line P4 and line P5, or we must include line P1, and line P2, and line P5, and line P6, or Considering that all the terms P1, P2, have the samecost, how many minimal forms the function has?The two minimal forms are P1 P4 P5 and P2 P3 P6: F = ab + bc + acF = ac + bc + ab012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567891014

(0,1,8,9)bcXXXX

(0,2,8,10)bdXXXX

(2,6,10,14)cdXXXX

(1,5)acdXX

(5,7)abdXX

(6,7)abcXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

(0,1)abXX

(0,2)acXX

(1,5)bcXX

(2,6)bcXX

(5,7)acXX

(6,7)abXX

012567

P1(0,1)abXX

P2(0,2)acXX

P3(1,5)bcXX

P4(2,6)bcXX

P5(5,7)acXX

P6(6,7)abXX

012567

P1(0,1)abXX

P2(0,2)acXX

P3(1,5)bcXX

P4(2,6)bcXX

P5(5,7)acXX

P6(6,7)abXX

012567

P1(0,1)abXX

P2(0,2)acXX

P3(1,5)bcXX

P4(2,6)bcXX

P5(5,7)acXX

P6(6,7)abXX