Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quine-McCluskey Computer Organization I 1 March 2010 ©2008-10 McQuain Introduction Recall that the procedure we've seen for forming a Boolean function.

Similar presentations


Presentation on theme: "Quine-McCluskey Computer Organization I 1 March 2010 ©2008-10 McQuain Introduction Recall that the procedure we've seen for forming a Boolean function."— Presentation transcript:

1 Quine-McCluskey Computer Organization I 1 CS@VT March 2010 ©2008-10 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.

2 Quine-McCluskey Computer Organization I 2 CS@VT March 2010 ©2008-10 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:

3 Quine-McCluskey Computer Organization I 3 CS@VT March 2010 ©2008-10 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, 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.

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

5 Quine-McCluskey Computer Organization I 5 CS@VT March 2010 ©2008-10 McQuain Q-M Method: Selecting Prime Implicants 3 5 6 7 ------------------------- 3,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.

6 Quine-McCluskey Computer Organization I 6 CS@VT March 2010 ©2008-10 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

7 Quine-McCluskey Computer Organization I 7 CS@VT March 2010 ©2008-10 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.

8 Quine-McCluskey Computer Organization I 8 CS@VT March 2010 ©2008-10 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

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

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

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

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


Download ppt "Quine-McCluskey Computer Organization I 1 March 2010 ©2008-10 McQuain Introduction Recall that the procedure we've seen for forming a Boolean function."

Similar presentations


Ads by Google