Introduction QuineMc Cluskey 1 Recall that the procedure

  • Slides: 12
Download presentation
Introduction Quine-Mc. Cluskey 1 Recall that the procedure we've seen forming a Boolean function

Introduction Quine-Mc. Cluskey 1 Recall that the procedure we've seen 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. CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Representation Quine-Mc. Cluskey 2 Represent each product in the function as

Quine-Mc. Cluskey Method: Representation Quine-Mc. Cluskey 2 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: We would represent the four product terms as: ~A B Cin A ~B Cin A B ~Cin A B C CS@VT March 2010 011 101 110 111 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 3 Order the terms by the number of

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 3 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, 0001 + 0011 = 00 -1 where the hyphen is just a placeholder indicating that the value of the third variable in this term doesn’t matter. CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 4 Order the terms by the number of

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 4 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. 3 5 6 7 CS@VT March 2010 011 101 110 111 --> 3, 7 --> 5, 7 --> 6, 7 none Computer Organization I -11 1 -1 11 - © 2008 -10 Mc. Quain

Q-M Method: Selecting Prime Implicants Quine-Mc. Cluskey 5 Next, determine a subset of the

Q-M Method: Selecting Prime Implicants Quine-Mc. Cluskey 5 Next, determine a subset of the terms that cover all of the original terms: 3 5 6 7 ------------3, 7 -11 X X 5, 7 1 -1 X X 6, 7 11 X X 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. CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain

Q-M Method: Forming the Solution Quine-Mc. Cluskey 6 Next, translate each of the included

Q-M Method: Forming the Solution Quine-Mc. Cluskey 6 Next, translate each of the included terms to the equivalent Boolean expression in terms of the original variables: -11 1 -1 11 - B * Cin A * B Finally, add them up to obtain a minimized form of the original function: Cout = A * B + A * Cin + CS@VT March 2010 Computer Organization I B * Cin © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Outline Quine-Mc. Cluskey 7 1. Express each minterm in n variables

Quine-Mc. Cluskey Method: Outline Quine-Mc. Cluskey 7 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. CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Representation Quine-Mc. Cluskey 8 Represent each product in the function as

Quine-Mc. Cluskey Method: Representation Quine-Mc. Cluskey 8 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 w w ~w ~w CS@VT March 2010 x y ~z ~x y ~z x y z x ~y z ~x ~y z 1110 1011 1010 0111 0101 0011 0001 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 9 Order the terms by the number of

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 9 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 0001 1 ------3 0011 1 5 10 0101 1010 1 1 ------7 0111 1011 1 14 1110 1 ------CS@VT March 2010 --> 1, 3 --> 1, 5 00 -1 0 -01 --> --> --> 0 -11 -011 01 -1 1011 -10 3, 7 3, 11 5, 7 10, 11 10, 14 none Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 10 Repeat the process with the 3 -term

Quine-Mc. Cluskey Method: Combining Quine-Mc. Cluskey 10 Repeat the process with the 3 -term sequences, forming 2 -term sequences: Second phase: ------1, 3 00 -1 1, 5 0 -01 3, 7 0 -11 3, 11 -011 5, 7 01 -1 10, 11 10110, 14 1 -10 CS@VT March 2010 --> 1, 3, 5, 7 none none 0 --1 (duplicate) Computer Organization I © 2008 -10 Mc. Quain

Q-M Method: Selecting Prime Implicants Quine-Mc. Cluskey 11 --------------------Prime Implicants Coverage Map 1 3

Q-M Method: Selecting Prime Implicants Quine-Mc. Cluskey 11 --------------------Prime Implicants Coverage Map 1 3 5 7 10 11 14 --------------------1, 3, 5, 7 0 --1 x x 1, 3 00 -1 x x 1, 5 0 -01 x 3, 7 0 -11 x 3, 11 -011 x 5, 7 01 -1 10, 11 101 - x 10, 14 1 -10 x x or x x x Essential for 14 -------------------- CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain

Quine-Mc. Cluskey Method: Formation Quine-Mc. Cluskey 12 Finally, translate the selected Boolean sequences back

Quine-Mc. Cluskey Method: Formation Quine-Mc. Cluskey 12 Finally, translate the selected Boolean sequences back into the appropriate product terms: 0 --1 1 -10 101 - CS@VT March 2010 Computer Organization I © 2008 -10 Mc. Quain