CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral CMPUT 329 - Computer Organization and Architecture II 1 Reading Assignment Section 4.4 CMPUT 329 - Computer Organization and Architecture II 2 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 3 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. 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 CMPUT 329 - Computer Organization and Architecture II 4 Outline of the QuineMcCluskey 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 implicants that when ORed together produce F, and that contains a minimum number of literals. CMPUT 329 - Computer Organization and Architecture II 5 Determination of Prime Implicants AB’CD’ + AB’CD = AB’C (The dash indicates a missing variable) 1010 +1011=101- We can combine the minterms above because they differ by a single bit. The minterms below won’t combine A’BC’D + A’BCD’ 0101 +0110 CMPUT 329 - Computer Organization and Architecture II 6 Quine-McCluskey Method An Example 1. Find all the prime implicants f (a, b, c, d ) m(0,1,2,5,6,7,8,9,10,14) group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Group the minterms according to the number of 1s in the minterm. This way we only have to compare minterms from adjacent groups. CMPUT 329 - Computer Organization and Architecture II 7 Quine-McCluskey Method An Example Column I Combining group 0 and group 1: Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 8 Quine-McCluskey Method An Example Column I Combining group 0 and group 1: Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 000- 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 9 Quine-McCluskey Method An Example Column I Combining group 0 and group 1: Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 10 Quine-McCluskey Method An Example Column I Does it make group 0 sense to no combine group 0 group 1 with group 2 or 3? No, there are at least two bits that are different. Column II 0 0000 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 11 Quine-McCluskey Method An Example Column I Does it make group 0 sense to no combine group 0 group 1 with group 2 or 3? No, there are at least two bits that are different. Thus, next we combine group 1 and group 2. Column II 0 0000 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 12 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0,1 0,2 0,8 1,5 00000-0 -000 0-01 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 13 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0,1 0,2 0,8 1,5 00000-0 -000 0-01 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 14 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 00000-0 -000 0-01 -001 15 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 00000-0 -000 0-01 -001 16 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 00000-0 -000 0-01 -001 17 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 00000-0 -000 0-01 -001 18 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 00000-0 -000 0-01 -001 0-10 19 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 00000-0 -000 0-01 -001 0-10 20 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 00000-0 -000 0-01 -001 0-10 -010 21 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 00000-0 -000 0-01 -001 0-10 -010 22 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 00000-0 -000 0-01 -001 0-10 -010 23 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 1 and group 2. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 00000-0 -000 0-01 -001 0-10 -010 100- 24 Quine-McCluskey Method An Example Column I Again, there is no need to try to combine group 1 with group 2. Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 00000-0 -000 0-01 -001 0-10 -010 10010-0 25 Quine-McCluskey Method An Example Column I Again, there is no need to try to combine group 1 with group 3. Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 Lets try to combine group 2 group 2 with group 23. group 3 5 6 9 10 0101 0110 1001 1010 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 00000-0 -000 0-01 -001 0-10 -010 10010-0 7 0111 14 1110 CMPUT 329 - Computer Organization and Architecture II 26 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 27 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 28 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 6,7 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 011- 29 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 6,7 6,14 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 011-110 30 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 6,7 6,14 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 011-110 31 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 6,7 6,14 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 011-110 32 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 Combine group 2 and group 3. 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0,2 0,8 1,5 1,9 2,6 2,10 8,9 8,10 5,7 6,7 6,14 00000-0 -000 0-01 -001 0-10 -010 10010-0 01-1 011-110 33 Quine-McCluskey Method An Example Column I We have now completed the first step. All minterms in column I were included. We can divide column II into groups. Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 34 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 CMPUT 329 - Computer Organization and Architecture II 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 35 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column III 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II 36 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column III 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II 37 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column III 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II 38 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column III 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II 39 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column III 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II 40 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 41 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 42 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 43 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 44 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 45 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 46 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 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 0116,14 -110 10,14 1-10 CMPUT 329 - Computer Organization and Architecture II Column III 0,1,8,9 -00- 47 Quine-McCluskey Method An Example Column I group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column II Column III 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 0116,14 -110 10,14 1-10 0,1,8,9 -000,2,8,10 -0-0 CMPUT 329 - Computer Organization and Architecture II 48 Quine-McCluskey Method An Example Column I group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 5 6 9 10 group 3 7 0111 14 1110 0101 0110 1001 1010 Column II Column III 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 0116,14 -110 10,14 1-10 0,1,8,9 -000,2,8,10 -0-0 CMPUT 329 - Computer Organization and Architecture II 49 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 0,8,1,9 -00- CMPUT 329 - Computer Organization and Architecture II 50 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 0,8,1,9 -00- CMPUT 329 - Computer Organization and Architecture II 51 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 -00-0-0 -00-0-0 CMPUT 329 - Computer Organization and Architecture II 52 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 -00-0-0 -00-0-0 CMPUT 329 - Computer Organization and Architecture II 53 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 -00-0-0 -00-0-0 CMPUT 329 - Computer Organization and Architecture II 54 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 -00-0-0 -00-0-0 CMPUT 329 - Computer Organization and Architecture II 55 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 -00-0-0 -00-0-0 CMPUT 329 - Computer Organization and Architecture II 56 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 -00-0-0 -00-0-0 --10 CMPUT 329 - Computer Organization and Architecture II 57 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 2,10,6,14 -00-0-0 -00-0-0 --10 --10 CMPUT 329 - Computer Organization and Architecture II 58 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 2,10,6,14 -00-0-0 -00-0-0 --10 --10 CMPUT 329 - Computer Organization and Architecture II 59 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 0101 0110 1001 1010 group 2 5 6 9 10 group 3 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 2,10,6,14 -00-0-0 -00-0-0 --10 --10 CMPUT 329 - Computer Organization and Architecture II 60 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III CMPUT 329 - Computer Organization and Architecture II 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 2,10,6,14 -00-0-0 -00-0-0 --10 --10 No more combinations are possible, thus we stop here. 61 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 0,2,8,10 0,8,1,9 0,8,2,10 2,6,10,14 2,10,6,14 -00-0-0 -00-0-0 --10 --10 We can eliminate repeated combinations CMPUT 329 - Computer Organization and Architecture II 62 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 Now we form f with the terms not checked f = a’c’d CMPUT 329 - Computer Organization and Architecture II 63 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 f = a’c’d + a’bd CMPUT 329 - Computer Organization and Architecture II 64 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 f = a’c’d + a’bd + a’bc CMPUT 329 - Computer Organization and Architecture II 65 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 f = a’c’d + a’bd + a’bc + b’c’ CMPUT 329 - Computer Organization and Architecture II 66 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 f = a’c’d + a’bd + a’bc + b’c’ + b’d’ CMPUT 329 - Computer Organization and Architecture II 67 Quine-McCluskey Method An Example Column I Column II group 0 0 0000 group 1 1 0001 2 0010 8 1000 group 2 group 3 5 6 9 10 0101 0110 1001 1010 7 0111 14 1110 0,1 0000,2 00-0 0,8 -000 1,5 0-01 1,9 -001 2,6 0-10 2,10 -010 8,9 1008,10 10-0 5,7 01-1 6,7 0116,14 -110 10,14 1-10 Column III 0,1,8,9 -000,2,8,10 -0-0 2,6,10,14 --10 f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ CMPUT 329 - Computer Organization and Architecture II 68 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 d c b CMPUT 329 - Computer Organization and Architecture II 69 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 d 1 c b CMPUT 329 - Computer Organization and Architecture II 70 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 d 1 c 1 b CMPUT 329 - Computer Organization and Architecture II 71 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 1 1 1 d 1 c 1 b CMPUT 329 - Computer Organization and Architecture II 72 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 1 1 1 d 1 c 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 73 Quine-McCluskey Method An Example But, the form below is not minimized. Using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 1 1 1 1 d 1 c 1 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 74 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 F = a’bd 1 1 1 1 d 1 c 1 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 75 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 F = a’bd + cd’ 1 1 1 1 d 1 c 1 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 76 Quine-McCluskey Method An Example But, the form below is not minimized, using a Karnaugh map we can obtain: f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 F = a’bd + cd’ + b’c’ 1 1 1 1 d 1 c 1 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 77 Quine-McCluskey Method An Example What are the extra terms in the solution obtained with the Quine-McCluskey method? f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’ a 1 F = a’bd + cd’ + b’c’ 1 Thus, we need a method to c eliminate this redundant terms from the Quine-McCluskey solution. 1 1 1 d 1 1 1 1 1 b CMPUT 329 - Computer Organization and Architecture II 78 The Prime Implicant Chart The prime implicant chart is the second part of the Quine-McCluskey procedure. It is used to select a minimum set of prime implicants. Similar to the Karnaugh map, we first select the essential prime implicants, and then we select enough prime implicants to cover all the minterms of the function. CMPUT 329 - Computer Organization and Architecture II 79 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc Question: Given the prime implicant chart above, how can we identify the essential prime implicants of the function? CMPUT 329 - Computer Organization and Architecture II 80 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc Similar to the Karnaugh map, all we have to do is to look for minterms that are covered by a single term. CMPUT 329 - Computer Organization and Architecture II 81 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc Once a term is included in the solution, all the minterms covered by that term are covered. Therefore we may now mark the covered minterms and find terms that are no longer useful. CMPUT 329 - Computer Organization and Architecture II 82 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc CMPUT 329 - Computer Organization and Architecture II 83 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc As we have not covered all the minterms with essential prime implicants, we must choose enough non-essential prime implicants to cover the remaining minterms. CMPUT 329 - Computer Organization and Architecture II 84 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc What strategy should we use to find a minimum cover for the remaining minterms? CMPUT 329 - Computer Organization and Architecture II 85 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc We choose first prime implicants that cover the most minterms. Should this strategy always work?? CMPUT 329 - Computer Organization and Architecture II 86 Prime Implicants Prime Implicant Chart (Example) minterms 0 1 2 5 6 7 8 9 10 14 X X (0,1,8,9) b’c’ X X X X X (0,2,8,10) b’d’ X X X X X (2,6,10,14) cd’ X X (1,5) a’c’d X X (5,7) a’bd X X (6,7) a’bc Therefore our minimum solution is: f(a,b,c,d) = b’c’ + cd’ + a’bd CMPUT 329 - Computer Organization and Architecture II 87 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Which ones are the essential prime implicants in this chart? There is no essential prime implicants, how we proceed? CMPUT 329 - Computer Organization and Architecture II 88 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Also, all implicants cover the same number of minterms. We will have to proceed by trial and error. F(a,b,c) = a’b’ CMPUT 329 - Computer Organization and Architecture II 89 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Also, all implicants cover the same number of minterms. We will have to proceed by trial and error. F(a,b,c) = a’b’ + bc’ CMPUT 329 - Computer Organization and Architecture II 90 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Thus, we get the minimization: F(a,b,c) = a’b’ + bc’ + ac CMPUT 329 - Computer Organization and Architecture II 91 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Lets try another set of prime implicants. CMPUT 329 - Computer Organization and Architecture II 92 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Lets try another set of prime implicants. F(a,b,c) = a’c CMPUT 329 - Computer Organization and Architecture II 93 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Lets try another set of prime implicants. F(a,b,c) = a’c + b’c’ CMPUT 329 - Computer Organization and Architecture II 94 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab Lets try another set of prime implicants. F(a,b,c) = a’c + b’c’+ ab CMPUT 329 - Computer Organization and Architecture II 95 Cyclic Prime Implicant Chart 0 1 2 5 6 7 000 001 010 101 110 111 0,1 0,2 1,5 2,6 5,7 6,7 000-0 -01 -10 1-1 11- Prime Implicants F(a,b,c) = m(0, 1, 2, 5, 6, 7) minterms 0 1 2 5 6 7 (0,1) a’b’ X X X (0,2) a’c X X X (1,5) b’c X X (2,6) bc’ X X (5,7) ac X X (6,7) ab This time we obtain: F(a,b,c) = a’c + b’c’+ ab CMPUT 329 - Computer Organization and Architecture II 96 Cyclic Prime Implicant Chart F(a,b,c) = a’b’ + bc’ + ac F(a,b,c) = a’c + b’c’+ ab Which minimal form is better? Depends on what terms we must form for other functions that we must also implement. Often we are interested in examining all minimal forms for a given function. Thus we need an algorithm to do so. CMPUT 329 - Computer Organization and Architecture II 97 Petrick’s Method S. 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. CMPUT 329 - Computer Organization and Architecture II 98 Prime Implicants Petrick’s Method An Example minterms 0 1 2 5 6 7 P1 (0,1) a’b’ X X X P2 (0,2) a’c X X X P3 (1,5) b’c X X P4 (2,6) bc’ X X P5 (5,7) ac X X P6 (6,7) ab 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. CMPUT 329 - Computer Organization and Architecture II 99 Prime Implicants Petrick’s Method An Example minterms 0 1 2 5 6 7 P1 (0,1) a’b’ X X X P2 (0,2) a’c X X X P3 (1,5) b’c X X P4 (2,6) bc’ X X P5 (5,7) ac X X P6 (6,7) ab The first column has an X in rows P1 and P2. Therefore we must include one of these rows in order to cover minterm 0. Thus the following term must be in P: (P1 + P2) CMPUT 329 - Computer Organization and Architecture II 100 Prime Implicants Petrick’s Method An Example minterms 0 1 2 5 6 7 P1 (0,1) a’b’ X X X P2 (0,2) a’c X X X P3 (1,5) b’c X X P4 (2,6) bc’ X X P5 (5,7) ac X X P6 (6,7) ab 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) CMPUT 329 - Computer Organization and Architecture II 101 Petrick’s Method An Example 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) 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 P6 P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6 CMPUT 329 - Computer Organization and Architecture II 102 Petrick’s Method An Example P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6 This expression says that to cover all the minterms we 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 same cost, how many minimal forms the function has? The two minimal forms are F = a’b’ + bc’ + ac P1 P4 P5 and P2 P3 P6: F = a’c’ + b’c + ab CMPUT 329 - Computer Organization and Architecture II 103
© Copyright 2026 Paperzz