Quine-McCluskey Computer Organization I 1 March 2010 © McQuain Introduction Recall that the procedure we've seen for forming a Boolean function from a truth table leads to a sum-of-products form. It's often the case that the sum-of-products form is not the simplest possible expression for the function: Clearly, the second form would require far less time to evaluate by hand, and far fewer gates if we were to implement it as a logic circuit. Fortunately, there are relatively straightforward algorithms for determining a minimal form for such an expression.
Quine-McCluskey Computer Organization I 2 March 2010 © McQuain Quine-McCluskey Method: Representation Represent each product in the function as a Boolean sequence, according to whether the variables or their negations occur in the product. Recall the expression for the carry bit in the full adder we examined earlier: ~A B Cin 011 A ~B Cin 101 A B ~Cin 110 A B C 111 We would represent the four product terms as:
Quine-McCluskey Computer Organization I 3 March 2010 © McQuain Quine-McCluskey Method: Combining Order the terms by the number of 1's in them; then form all the 3-term sequences you can by looking for 4-term sequences that differ in only one position. The key is the observation that, from the axioms of a Boolean algebra: This is sometimes known as the resolution rule. We may use this rule to identify equivalences that simplify the expression of a Boolean function. For example: ~w*~x*~y*z + ~w*~x*y*z = ~w*~x*(~y+y)*z = ~w*~x*1*z = ~w*~x*z or, more compactly, = 00-1 where the hyphen is just a placeholder indicating that the value of the third variable in this term doesn’t matter.
Quine-McCluskey Computer Organization I 4 March 2010 © McQuain Quine-McCluskey Method: Combining > 3, > 5, > 6, none Order the terms by the number of 1's in them; then form all the 2-term sequences you can by looking for 3-term sequences that differ in only one position; note that we only need to compare each sequence to ones that have exactly one more 1 in them. Label each term with its numeric value.
Quine-McCluskey Computer Organization I 5 March 2010 © McQuain Q-M Method: Selecting Prime Implicants ,7 -11 X X 5,7 1-1 X X 6,7 11- X X Next, determine a subset of the terms that cover all of the original terms: First, we look for columns that contain only one X. Those identify essential terms, which must be included in any solution. In this case, that applies to all of the terms we've found.
Quine-McCluskey Computer Organization I 6 March 2010 © McQuain Q-M Method: Forming the Solution -11 B * Cin 1-1 A * Cin 11- A * B Next, translate each of the included terms to the equivalent Boolean expression in terms of the original variables: Finally, add them up to obtain a minimized form of the original function: Cout = A * B + A * Cin + B * Cin
Quine-McCluskey Computer Organization I 7 March 2010 © McQuain Quine-McCluskey Method: Outline 1.Express each minterm in n variables by a bit string of length n with the i-th position filled by 1 if x_i occurs in the expression and 0 if ~x_i occurs. 2.Group the bit strings according to the number of 1's in them. 3.Use the Resolution Rule to combine as many n-variable terms into terms containing n- 1 variables as possible. 4.Continue applying the Resolution Rule to combine Boolean products into fewer variables as long as possible. 5.Find the smallest set of the resulting combined Boolean products, together with any of the original terms that were never combined with anything, so that the sum of these products represents the Boolean function.
Quine-McCluskey Computer Organization I 8 March 2010 © McQuain Quine-McCluskey Method: Representation Represent each product in the function as a Boolean sequence, according to whether the variables or their negations occur in the product. For the example on the previous slide, the seven products would be represented as: w x y ~z 1110 w ~x y z 1011 w ~x y ~z 1010 ~w x y z 0111 ~w x ~y z 0101 ~w ~x y z 0011 ~w ~x ~y z 0001
Quine-McCluskey Computer Organization I 9 March 2010 © McQuain Quine-McCluskey Method: Combining Order the terms by the number of 1's in them; then form all the 3-term sequences you can by looking for 4-term sequences that differ in only one position; note that we only need to compare each sequence to ones that have exactly one more 1 in them. Label each term with its numeric value. term F > 1, > 1, > 3, > 3, > 5, > 10, > 10, none none none
Quine-McCluskey Computer Organization I 10 March 2010 © McQuain Quine-McCluskey Method: Combining Repeat the process with the 3-term sequences, forming 2-term sequences: Second phase: , > 1,3,5, , > 1,3,5, (duplicate) 3, none 3, none 5, none 10, none 10, none
Quine-McCluskey Computer Organization I 11 March 2010 © McQuain Q-M Method: Selecting Prime Implicants Prime Coverage Map Implicants ,3,5, x x x x 1, x x 1, x 3, x x 3, x x 5, x x 10, x x 10, x x Essential for 14 or
Quine-McCluskey Computer Organization I 12 March 2010 © McQuain Quine-McCluskey Method: Formation Finally, translate the selected Boolean sequences back into the appropriate product terms: