Here are a couple of worked examples with the Quine-McCluskey technique. Remember that the objective is to simplify a boolean function so that it will use fewer operations or logic gates. After some practice, I hope that you see that is not as difficult or tedious as it first appears. First example: F(w, x, y, z) = Sigma(1, 2, 3, 5, 7, 9, 10, 11, 13, 15) First we write the binary representations of the minterm numbers. 1 = 0001 (one 1) 2 = 0010 (one 1) 3 = 0011 (two 1s) 5 = 0101 (two 1s) 7 = 0111 (three 1s) 9 = 1001 (two 1s) 10 = 1010 (two 1s) 11 = 1011 (three 1s) 13 = 1101 (three 1s) 15 = 1111 (four 1s) We need to group the minterm according to how many 1's exist in the binary representation. 1 2 ------ 3 5 9 10 ------ 7 11 13 ------ 15 Next, we need to combine minterms. Look for numbers in adjacent families that differ by a power of two. In parentheses, you will see what that difference is. Be sure to check off the minterms that you account for. Note that there is more than one possible way to combine minterms. 1 ok 2 ok ------ 1,3 (2) 3 ok 2,10 (8) 5 ok 1,5 (4) 9 ok 1,9 (8) 10 ok ------ 3,7 (4) 7 ok 9,11 (2) 11 ok 9,13 (4) 13 ok ------ 11,15 (4) 15 ok At this point, we notice that all minterms got used up, and we have the following combined minterms: 1,3 (2) 2,10 (8) 1,5 (4) 1,9 (8) --------- 3,7 (4) 9,11 (2) 9,13 (4) --------- 11,15 (4) We repeat the process: combine these combined minterms wherever possible. In adjacent families, look for combined minterms that have the same number in ( ) and also differ by the same power of 2. We notice that the 1,5 (4) and the 3,7 (4) differ by 2. We notice that the 1,3 (2) and the 9,11 (2) differ by 8. We notice that the 1,5 (4) and the 9,13 (4) differ by 8. We notice that the 3,7 (4) and the 11,15 (4) differ by 8. We also notice that the combined minterms 2,10 (8) and 1,9 (8) can't combine with anything. So, we have these combined minterms: 1,5,3,7 (2,4) 1,3,9,11 (2,8) 1,5,9,13 (4,8) -------------- 3,7,11,15 (4,8) We still have two families, so once again we see if it's possible to combine anything. We see that two of the combined minterms have differences of (4,8) which means they omit the same variables, and they differ by 2. Therefore, this step looks like this: 1,5,3,7 (2,4) 1,3,9,11 (2,8) 1,5,9,13 (4,8) ok -------------- 1,5,9,13,3,7,11,15 (2,4,8) 3,7,11,15 (4,8) ok We note that the first two combined minterms, 1,5,3,7 and 1,3,9,11 are not able to combine with anything. So, we are done finding the prime implicants (terms). What terms do we have? Basically these are the terms that we have found that can't be combined further: 2,10 1,9 1,5,3,7 1,3,9,11 1,5,9,13,3,7,11,15 This seems like a lot of terms! To see if we have too many terms, we create a prime implicant table like the Mano book does on page 107. Prime implicants Minterms 1 2 3 5 7 9 10 11 13 15 1,5,9,13,3,7,11,15 X X X X X X X X 1,5,3,7 X X X X 1,3,9,11 X X X X 2,10 X X 1,9 X X Look at each minterm. Is there any minterm that is covered by just one term (i.e one prime implicant)? If so, this term is called an essential prime implicant and must be included in our answer. We see that (1,5,9,13,3,7,11,15) and (2,10) both contain some unique minterms. We also notice that the other three terms have nothing new to contribute. So, it turns out we can solve the problem with just two terms: 1,5,9,13,3,7,11,15 2,10 For each term, we must figure out how to write it out in letters. Write out the binary representations of the minterms that make up a term: see what they have in common. For the term 1,3,5,7,9,11,13,15: 1 = 0001 3 = 0011 5 = 0101 7 = 0111 9 = 1001 11 = 1011 13 = 1101 15 = 1111 All of these have a final 1 in common, which is the term z. For the term 2,10: 2 = 0010 10 = 1010 These terms both have a 0 in the x position and z position, and a 1 in the y position. This is the term x'yz'. Our final answer is z + x'yz'. It's interesting that we never use w in our answer. -------------------------------------------------------------------------- Second example: F(a,b,c,d,e,f,g) = Sigma(20,28,38,39,52,60,102,103,127) First, we write the minterm numbers in binary. Count how many ones there are in each representation, so that we can group the minterms into families. 20 = 0010100 (two 1s) 28 = 0011100 (three 1s) 38 = 0100110 (three 1s) 39 = 0100111 (four 1s) 52 = 0110100 (three 1s) 60 = 0111100 (four 1s) 102 = 1100110 (four 1s) 103 = 1100111 (five 1s) 127 = 1111111 (seven 1s) The families of minterms are as follows: 20 ------ 28 38 52 ------ 39 60 102 ------ 103 ------ ------ 127 Right away, we see that 127 will never be able to combine with anything, so it will persist right to the end. Elsewhere, we look for numbers in adjacent families that differ by a power of 2. Check off the minterms that we are able to combine. We wind up with this: 20 ok ------ 20,28 (8) 28 ok 38 ok 52 ok ------ 38,39 (1) 39 ok 52,60 (8) 60 ok 38,102 (64) 102 ok ------ 39,103 (64) 103 ok ------ ------ 127 Our combined minterms, arranged in families, are as follows: 20,28 (8) --------- 38,39 (1) 52,60 (8) 38,102 (64) --------- 39,103 (64) Is it possible to combine anything? We look for combined minterms that have the same number in parentheses (meaning they omit the same variable), and differ by the same power of two. We notice that 20,28 (8) and 52,60 (8) differ by 32. We notice that 38,102 (64) and 39,103 (64) differ by 1. Then, we see that 38,39 (8) can't combine with anything. This will be a term that sticks around. The combined minterms are: 20,28,52,60 (8,32) 38,102,39,103 (1,64) These combined minterms cannot be combined themselves, because they do not match. As a result, we have the following terms in our expression: 127 38,39 20,28,52,60 38,102,39,103 We notice that the 38,39 term is unnecessary because the numbers 38 and 39 are included elsewhere. So, our answer has 3 terms. Term 127 is just abcdefg. Term 20,28,52,60: 20 = 0010100 28 = 0011100 52 = 0110100 60 = 0111100 They have in common: a=0, c=1, e=1, f=0, g=0. The term is a'cef'g'. Term 38,39,102,103: 38 = 0100110 39 = 0100111 102 = 1100110 103 = 1100111 They have in common: b=1, c=0, d=0, e=1, f=1. The term is bc'd'ef. Our answer is abcdefg + a'cef'g' + bc'd'ef. It's not hard to check our answer. Look at the terms we combined to eliminate variables. Every primed variable is a 0, every unprimed variable is a 1, and every omitted variable is "don't care" or x: a'cef'g' = 0x1x100. Do we have all 4 minterms that have this general pattern? In other words, we need to have 0010100 0011100 0110100 0111100 Yes: we can convert each into base 10, and we have: 20,28,52,60. bc'd'ef = x10011x, which represents these 4 terms: 0100110 0100111 1100110 1100111 Do we have all 4 of these minterms in our problem? In base 10, they are: 38,39,102,103. Yes.