Sunteți pe pagina 1din 38

Digital Logic and Design

Lecture 22 :Quine-McCluskey method

Dated : 31 Oct 2017


Fall 2017

By Nasir Mahmood
nasir.mahmood@seecs.edu.pk,
nasirm15@gmail.com
Today’s Lecture
– Quine-McCluskey method
– Alternative name (Tabulation Method)
Find the minimal sum of products for the Boolean expression


F ( U, V, W, X ) =∑(0,2,3,5,7,8,9,10,11,13,15)


using Quine-McCluskey Method

Binary Representation of Minterms
Minterms U V W X
0 0 0 0 0
2 0 0 1 0
3 0 0 1 1
5 0 1 0 1
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
13 1 1 0 1
15 1 1 1 1
Group of Minterms for different number of 1's
No of 1's Minterms U V W X
0 0 0 0 0 0
1 2 0 0 1 0
1 8 1 0 0 0
2 3 0 0 1 1
2 5 0 1 0 1
2 9 1 0 0 1
2 10 1 0 1 0
3 7 0 1 1 1
3 11 1 0 1 1
3 13 1 1 0 1
4 15 1 1 1 1
Any two numbers in the groups on left side which
differ from each other by only one variable can be
chosen and combined, to get 2-cell combination.

6
Any two numbers in the groups on left side which differ from each
other by only one variable can be chosen and combined, to get 2-cell
combination.
No Minterms U V W X Combinations U V W X
of
0 ✓ 0 0 0 0 0 (0,2) 0 0 X 0
1 ✓ 2 0 0 1 0 (0,8) X 0 0 0
1 ✓ 8 1 0 0 0 (2,3) 0 0 1 X
2 ✓ 3 0 0 1 1 (2,10) X 0 1 0
2 ✓ 5 0 1 0 1 (8,9) 1 0 0 X
2 9 1 0 0 1 (8,10) 1 0 X 0
2 ✓ 10 1 0 1 0 (3,7) 0 X 1 1
3 ✓ 7 0 1 1 1 (3,11) X 0 1 1
3 ✓ 11 1 0 1 1 (5,7) 0 1 X 1
3 13 1 1 0 1 (5,13) X 1 0 1
4 15 1 1 1 1 (9,11) 1 0 X 1
(9,13) 1 X 0 1
(10,11) 1 0 1 x
Any two numbers in the groups on left side which differ from each
other by only one variable can be chosen and combined, to get 2-cell
combination.
No Minterms U V W X Combinations U V W X
of
0 ✓ 0 0 0 0 0 (0,2) 0 0 X 0
1 ✓ 2 0 0 1 0 (0,8) X 0 0 0
1 ✓ 8 1 0 0 0 (2,3) 0 0 1 X
2 ✓ 3 0 0 1 1 (2,10) X 0 1 0
2 ✓ 5 0 1 0 1 (8,9) 1 0 0 X
2 ✓ 9 1 0 0 1 (8,10) 1 0 X 0
2 ✓ 10 1 0 1 0 (3,7) 0 X 1 1
3 ✓ 7 0 1 1 1 (3,11) X 0 1 1
3 ✓ 11 1 0 1 1 (5,7) 0 1 X 1
3 ✓ 13 1 1 0 1 (5,13) X 1 0 1
4 ✓ 15 1 1 1 1 (9,11) 1 0 X 1
(9,13) 1 X 0 1
(10,11) 1 0 1 x
(7,15) X 1 1 1
(11,15) 1 X 1 1
(13,15) 1 1 X 1
All possible 2-cell combinations are as follows

Combinations U V W X
(0,2) 0 0 X 0
(0,8) X 0 0 0
(2,3) 0 0 1 X
(2,10) X 0 1 0
(8,9) 1 0 0 X
(8,10) 1 0 X 0
(3,7) 0 X 1 1
(3,11) X 0 1 1
(5,7) 0 1 X 1
(5,13) X 1 0 1
(9,11) 1 0 X 1
(9,13) 1 X 0 1
(10,11) 1 0 1 x
(7,15) X 1 1 1
(11,15) 1 X 1 1
(13,15) 1 1 X 1
From the 2-cell combinations, one variable and ‘x’ in the same
position can be combined to form 4-cell combinations
Minterms U V W X Combinations U V W X Combinations U V W X
✓ 0 0 0 0 0 (0,2) 0 0 X 0
(0,8) X 0 0 0
✓ 2 0 0 1 0 (2,3) 0 0 1 X
✓ 8 1 0 0 0 (2,10) X 0 1 0
✓ 3 0 0 1 1 (8,9) 1 0 0 X
✓ 5 0 1 0 1 (8,10) 1 0 X 0
9 1 0 0 1 (3,7) 0 X 1 1
✓ 10 1 0 1 0 (3,11) X 0 1 1
✓ 7 0 1 1 1 (5,7) 0 1 X 1
✓ 11 1 0 1 1 (5,13) X 1 0 1
✓ 13 1 1 0 1 (9,11) 1 0 X 1
✓ 15 1 1 1 1 (9,13) 1 X 0 1
(10,11) 1 0 1 x
(7,15) X 1 1 1
(11,15) 1 X 1 1
(13,15) 1 1 X 1
From the 2-cell combinations, one variable and ‘x’ in the same
position can be combined to form 4-cell combinations

Minterms U V W X Combinations U V W X Combinations U V W X


✓ 0 0 0 0 0 ✓ (0,2) 0 0 X 0 (0,2,8,10) X 0 X 0
✓ 2 0 0 1 0 ✓ (0,8) X 0 0 0 (0,8,2,10) X 0 X 0
✓ 8 1 0 0 0 (2,3) 0 0 1 X
✓ 3 0 0 1 1 ✓ (2,10) X 0 1 0
✓ 5 0 1 0 1 (8,9) 1 0 0 X
9 1 0 0 1 ✓ (8,10) 1 0 X 0
✓ 10 1 0 1 0 (3,7) 0 X 1 1
✓ 7 0 1 1 1 (3,11) X 0 1 1
✓ 11 1 0 1 1 (5,7) 0 1 X 1
✓ 13 1 1 0 1 (5,13) X 1 0 1
✓ 15 1 1 1 1 (9,11) 1 0 X 1
(9,13) 1 X 0 1
(10,11) 1 0 1 x
(7,15) X 1 1 1
(11,15) 1 X 1 1
(13,15) 1 1 X 1
From the 2-cell combinations, one variable and ‘x’ in the same
position can be combined to form 4-cell combinations

Minterms U V W X Combinations U V W X Combinations U V W X


✓ 0 0 0 0 0 ✓ (0,2) 0 0 X 0 (0,2,8,10) X 0 X 0
✓ 2 0 0 1 0 ✓ (0,8) X 0 0 0 (0,8,2,10) X 0 X 0
✓ 8 1 0 0 0 ✓ (2,3) 0 0 1 X (2,3,10,11) X 0 1 X
✓ 3 0 0 1 1 ✓ (2,10) X 0 1 0 (2,10,3,11) X 0 1 X
✓ 5 0 1 0 1 (8,9) 1 0 0 X
9 1 0 0 1 ✓ (8,10) 1 0 X 0
✓ 10 1 0 1 0 (3,7) 0 X 1 1
✓ 7 0 1 1 1 ✓ (3,11) X 0 1 1
✓ 11 1 0 1 1 (5,7) 0 1 X 1
✓ 13 1 1 0 1 (5,13) X 1 0 1
✓ 15 1 1 1 1 (9,11) 1 0 X 1
(9,13) 1 X 0 1
(10,11) 1 0 1 X
(7,15) X 1 1 1
(11,15) 1 X 1 1
(13,15) 1 1 X 1
From the 2-cell combinations, one variable and ‘x’ in the same
position can be combined to form 4-cell combinations

Minterms U V W X Combinations U V W X Combinations U V W X


✓ 0 0 0 0 0 ✓ (0,2) 0 0 X 0 (0,2,8,10) X 0 X 0
✓ 2 0 0 1 0 ✓ (0,8) X 0 0 0 (0,8,2,10) X 0 X 0
✓ 8 1 0 0 0 ✓ (2,3) 0 0 1 X (2,3,10,11) X 0 1 X
✓ 3 0 0 1 1 ✓ (2,10) X 0 1 0 (2,10,3,11) X 0 1 X
✓ 5 0 1 0 1 ✓ (8,9) 1 0 0 X (8,9,10,11) 1 0 X X
9 1 0 0 1 ✓ (8,10) 1 0 X 0 (8,10,9,11) 1 0 X X
✓ 10 1 0 1 0 ✓ (3,7) 0 X 1 1 (3,7,11,15) X X 1 1
✓ 7 0 1 1 1 ✓ (3,11) X 0 1 1 (3,11,7,15) X X 1 1
✓ 11 1 0 1 1 (5,7) 0 1 X 1
✓ 13 1 1 0 1 (5,13) X 1 0 1
✓ 15 1 1 1 1 ✓ (9,11) 1 0 X 1
(9,13) 1 X 0 1
✓ (10,11) 1 0 1 X
✓ (7,15) X 1 1 1
✓ (11,15) 1 X 1 1
(13,15) 1 1 X 1
From the 2-cell combinations, one variable and ‘x’ in the same
position can be combined to form 4-cell combinations

Minterms U V W X Combinations U V W X Combinations U V W X


✓ 0 0 0 0 0 ✓ (0,2) 0 0 X 0 (0,2,8,10) X 0 X 0
✓ 2 0 0 1 0 ✓ (0,8) X 0 0 0 (0,8,2,10) X 0 X 0
✓ 8 1 0 0 0 ✓ (2,3) 0 0 1 X (2,3,10,11) X 0 1 X
✓ 3 0 0 1 1 ✓ (2,10) X 0 1 0 (2,10,3,11) X 0 1 X
✓ 5 0 1 0 1 ✓ (8,9) 1 0 0 X (8,9,10,11) 1 0 X X
9 1 0 0 1 ✓ (8,10) 1 0 X 0 (8,10,9,11) 1 0 X X
✓ 10 1 0 1 0 ✓ (3,7) 0 X 1 1 (3,7,11,15) X X 1 1
✓ 7 0 1 1 1 ✓ (3,11) X 0 1 1 (3,11,7,15) X X 1 1
✓ 11 1 0 1 1 ✓ (5,7) 0 1 X 1 (5,7,13,15) X 1 X 1
✓ 13 1 1 0 1 ✓ (5,13) X 1 0 1 (5,13,7,15) X 1 X 1
✓ 15 1 1 1 1 ✓ (9,11) 1 0 X 1 (9,11,13,15) 1 X X 1
✓ (9,13) 1 X 0 1 (9,13,11,15) 1 X X 1
✓ (10,11) 1 0 1 X
✓ (7,15) X 1 1 1
✓ (11,15) 1 X 1 1
✓ (13,15) 1 1 X 1
All possible 4-cell combinations are as follows


Combinations U V W X
(0,2,8,10) X 0 X 0
(0,8,2,10) X 0 X 0
(2,3,10,11) X 0 1 X
(2,10,3,11) X 0 1 X
(8,9,10,11) 1 0 X X
(8,10,9,11) 1 0 X X
(3,7,11,15) X X 1 1
(3,11,7,15) X X 1 1
(5,7,13,15) X 1 X 1
(5,13,7,15) X 1 X 1
(9,11,13,15) 1 X X 1
(9,13,11,15) 1 X X 1
4xCell combinations

Combination Prime U V W X
s
(0,2,8,10) Implicant
V’X’ x 0 x 0
(2,3,10,11) V’W x 0 1 x
(8,9,10,11) UV’ 1 0 x x
(3,7,11,15) WX x x 1 1
(5,7,13,15) VX x 1 x 1
(9,11,13,15) UX 1 x x 1

16
Quine-McCluskey Minimization Method
• The next step is to identify the essential prime
implicants, which can be done using a prime implicant
chart.
– Where a prime implicant covers a minterm, the intersection of
the corresponding row and column is marked with a cross.
– Those columns with only one cross identify the essential prime
implicants. These prime implicants must be in the final answer.
– The single crosses on a column are circled and all the crosses
on the same row are also circled, indicating that these crosses
are covered by the prime implicants selected.
– Once one cross on a column is circled, all the crosses on that
column can be circled since the minterm is now covered.
– If any non-essential prime implicant has all its crosses circled,
the prime implicant is redundant and need not be considered
further.
17
Prime Implicants Table
From above 4-cell combination table, the prime implicants chart
can be plotted as shown in table below. The don’t care
minterms are not included
Prime Combination 0 2 3 5 7 8 9 10 11 13 15
Implicant
V’X’ (0,2,8,10) X X - - - X - X - - -
V’W (2,3,10,11) - X X - - - - X X - -
UV’ (8,9,10,11) - - - - - X X X X - -
WX (3,7,11,15) - - X - X - - - X - X
VX (5,7,13,15) - - - X X - - - X X
UX (9,11,13,15) - - - - - - X - X X X

18
Prime Implicants Table
The columns having only one cross mark correspond to essential
prime implicants. A red cross is used against every essential
prime implicant.
Prime Combination 0 2 3 5 7 8 9 10 11 13 15
Implicant
V’X’ (0,2,8,10) X X - - - X - X - - -
V’W (2,3,10,11) - X X - - - - X X - -
UV’ (8,9,10,11) - - - - - X X X X - -
WX (3,7,11,15) - - X - X - - - X - X
VX (5,7,13,15) - - - X X - - - X X
UX (9,11,13,15) - - - - - - X - X X X

19
Prime Implicants Table

All crosses on the rows corresponding to the essential prime


implicants are circled.
Prime
Implicant Combination 0 2 3 5 7 8 9 10 11 13 15
s
V’X’ (0,2,8,10) X X - - - X - X - - -
V’W (2,3,10,11) - X X - - - - X X - -
UV’ (8,9,10,11) - - - - - X X X X - -
WX (3,7,11,15) - - X - X - - - X - X
VX (5,7,13,15) - - - X X - - - X X
UX (9,11,13,15) - - - - - - X - X X X

20
Prime Implicants Table
Next all crosses in a column with a circle are also circled to
indicate that minterm is covered.

Prime
Implicant Combination 0 2 3 5 7 8 9 10 11 13 15
s
V’X’ (0,2,8,10) X X - - - X - X - - -
V’W (2,3,10,11) - X X - - - - X X - -
UV’ (8,9,10,11) - - - - - X X X X - -
WX (3,7,11,15) - - X - X - - - X - X
VX (5,7,13,15) - - - X X - - - X X
UX (9,11,13,15) - - - - - - X - X X X

21
Prime Implicants Table
Remove the rows corresponding to Essential Prime Implicants
and the columns covered by the circles from the PI Chart. These
two PIs are part of the final solution.

Prime
Combination 0 2 3 5 7 8 9 10 11 13 15
Implicants
V’X’ (0,2,8,10) X X - - - X - X - - -
V’W (2,3,10,11) - X X - - - - X X - -
UV’ (8,9,10,11) - - - - - X X X X - -
WX (3,7,11,15) - - X - X - - - X - X
VX (5,7,13,15) - - - X X - - - X X
UX (9,11,13,15) - - - - - - X - X X X

F = V’X’ + VX + ……..
22
Reduced Prime Implicants Table

Prime
Combination 3 9 11
Implicants
V’W (2,3,10,11) X - X
UV’ (8,9,10,11) - X X
WX (3,7,11,15) X - X
UX (9,11,13,15) - X X

23
Petrick's Method
• Petrick's method is a technique for finding all minimum sum-of-products solutions
from a prime implicant chart.
• Remove all essential prime implicants and the minterms they cover from the chart.
• Label the rows of the reduced chart K, L, M, etc.
• Form a logic function G that is true when all columns are covered. G consists of a
product of sum terms - one for each column with at least one X.
• Reduce G to a minimum sum of products by multiplying out and applying
X + XY = X or (X+Y) (X+Z) = X+YZ
• Each term in the sum represents a solution. Choose the terms with the fewest
number of variables. Each of these terms represents a solution with the minimum
number of prime implicants.
• Choose the remaining term or terms that correspond to the fewest total number of
literals.

24
Petrick’s Method
G = (K+M) (L+N) (K+L+M+N)
G = (K+M) (L+N) (K+M+L+N)
G = (K+M) (L+N) Absorption Theorem
G = KL + KN + LM + MN
Any one of these combinations is part of final solution
Prime
• Here, Combination 3 9 11
Implicants
KL = V’W + UV’ V’W (2,3,10,11) X - X
KN = V’W + UX
UV’ (8,9,10,11) - X X
LM = UV’ + WX
MN = WX + UX WX (3,7,11,15) X - X

• We shall have four solutions: UX (9,11,13,15) - X X


F = V’X’ + VX + V’W + UV’
F = V’X’ + VX + V’W + UX
F = V’X’ + VX + UV’ + WX
F = V’X’ + VX + WX + UX 25
Example of Prime Implicants

• Two essential prime implicants (caused by m0 and m5)


– This gives us two terms: x’z’ and xz

• Finding prime implicants for the remainders results in four


expressions:
– F = xz + x’z’ + yz + wz
– F = xz + x’z’ + yz + wx’
– F = xz + x’z’ + x’y + wz
26
– F = xz + x’z’ + x’y + wx’
27
28
29
30
31
32
33
34
35
36
37
THE END

S-ar putea să vă placă și