Anda di halaman 1dari 102

Quine-McCluskey Method

1
Motivation
Karnaugh maps are very effective for the minimization
of expressions with up to 5 or 6 inputs. However they
are difficult to use and error prone for circuits with
many inputs.
Karnaugh maps depend on our ability to visually
identify prime implicants and select a set of prime
implicants that cover all minterms. They do not
provide a direct algorithm to be implemented in a
computer.
For larger systems, we need a programmable method!!

2
Quine-McCluskey
Willard van Orman Quine 1908-2000,
Edgar Pierce Chair of Philosophy at
Harvard University.
http://members.aol.com/drquine/wv-quine.html
Quine, Willard, “The problem of simplifying truth functions.”
American Mathematical Monthly, vol. 59, 1952.
Quine, Willard, “A way to simplify truth functions.”
American Mathematical Monthly, vol. 62, 1955.

Edward J. McCluskey, Professor of Electrical


Engineering and Computer Science at Stanford
http://www-crc.stanford.edu/users/ejm/McCluskey_Edward.html

McCluskey Jr., Edward J. “Minimization of Boolean Functions.”


Bell Systems Technical Journal, vol. 35, pp. 1417-1444, 1956
3
Outline of the Quine-McCluskey
Method
1. Produce a minterm expansion (standard
sum-of-products form) for a function F

2. Eliminate as many literals as possible by


systematically applying XY + XY’ = X.

3. Use a prime implicant chart to select a


minimum set of prime implicants that
when ORed together produce F, and that
contains a minimum number of literals.

4
Determination of Prime
Implicants
AB’CD’ + AB’CD = AB’C
(The dash indicates a missing variable)
1010 +1011=101-

We can combine the minterms above because they


differ by a single bit.
The minterms below won’t combine

A’BC’D + A’BCD’

0101 +0110

5
Quine-McCluskey Method
An Example
1. Find all the prime implicants
f (a, b, c, d )   m(0,1,2,5,6,7,8,9,10,14)

group 0 0 0000 Group the minterms


1 0001 according to the number
group 1 2 0010
8 1000 of 1s in the minterm.
5 0101
group 2
6 0110 This way we only have to
9 1001
10 1010 compare minterms from
7 0111
adjacent groups.
group 3 14 1110
6
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000
1 0001
group 1 2 0010
Combining 8 1000
group 0 and 5 0101
group 1: 6 0110
group 2 9 1001
10 1010
7 0111
group 3 14 1110

7
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


1 0001 
group 1 2 0010
Combining 8 1000
group 0 and 5 0101
group 1: 6 0110
group 2 9 1001
10 1010
7 0111
group 3 14 1110

8
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
group 1 2 0010 
Combining 8 1000
group 0 and 5 0101
group 1: 6 0110
group 2 9 1001
10 1010
7 0111
group 3 14 1110

9
Quine-McCluskey Method
An Example
Column I Column II

Does it make group 0 0 0000  0,1 000-


sense to no 0,2 00-0
1 0001 
combine group 0 0,8 -000
group 1 2 0010 
with group 2 or 3? 8 1000 
No, there are at 5 0101
least two bits that 6 0110
are different. group 2 9 1001
10 1010
7 0111
group 3 14 1110

10
Quine-McCluskey Method
An Example
Column I Column II

Does it make group 0 0 0000  0,1 000-


sense to no 0,2 00-0
1 0001 
combine group 0 0,8 -000
group 1 2 0010 
with group 2 or 3? 8 1000 
No, there are at 5 0101
least two bits that 6 0110
are different. group 2 9 1001
10 1010
Thus, next we
combine group 1 7 0111
group 3 14 1110
and group 2.

11
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1
and group 2. 5 0101 
6 0110
group 2 9 1001
10 1010
7 0111
group 3 14 1110

12
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1
and group 2. 5 0101 
6 0110
group 2 9 1001
10 1010
7 0111
group 3 14 1110

13
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101 
6 0110
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

14
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101 
6 0110
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

15
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101 
6 0110
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

16
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101 
6 0110
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

17
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110 
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

18
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110 
group 2 9 1001 
10 1010
7 0111
group 3 14 1110

19
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001 
10 1010 
7 0111
group 3 14 1110

20
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001 
10 1010 
7 0111
group 3 14 1110

21
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001 
10 1010 
7 0111
group 3 14 1110

22
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 1 1,9 -001
and group 2. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010 
7 0111
group 3 14 1110

23
Quine-McCluskey Method
An Example
Column I Column II

Again, there is group 0 0 0000  0,1 000-


no need to try 0,2 00-0
1 0001 
0,8 -000
to combine group group 1 2 0010 
1,5 0-01
1 with group 2. 8 1000 
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
7 0111
group 3 14 1110

24
Quine-McCluskey Method
An Example
Column I Column II

Again, there is group 0 0 0000  0,1 000-


no need to try 0,2 00-0
1 0001 
0,8 -000
to combine group group 1 2 0010 
1,5 0-01
1 with group 3. 8 1000 
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
Lets try to combine group 2 9 1001  8,9 100-
group 2 with 10 1010  8,10 10-0
group 23.
7 0111
group 3 14 1110

25
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110

26
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110

27
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110
6,7 011-

28
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110

29
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110

30
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110

31
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
Combine group 2 1,9 -001
and group 3. 5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110

32
Quine-McCluskey Method
An Example
Column I Column II

We have now group 0 0 0000  0,1 000-


0,2 00-0
completed the 1 0001 
0,8 -000
first step. All group 1 2 0010 
1,5 0-01
8 1000 
minterms in 1,9 -001
column I were 5 0101  2,6 0-10
included. 6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
We can divide
5,7 01-1
column II into 7 0111 
group 3 14 1110 
6,7 011-
groups. 6,14 -110
10,14 1-10

33
Quine-McCluskey Method
An Example
Column I Column II

group 0 0 0000  0,1 000-


0,2 00-0
1 0001 
0,8 -000
group 1 2 0010 
1,5 0-01
8 1000 
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

34
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

35
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

36
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

37
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

38
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100-
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

39
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

40
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

41
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

42
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

43
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

44
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

45
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


1 0001  0,2 00-0
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

46
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

47
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

48
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

49
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

50
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

51
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

52
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

53
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

54
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001 
5 0101  2,6 0-10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10

55
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110
10,14 1-10 

56
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10  2,10,6,14 --10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

57
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10  2,10,6,14 --10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

58
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10  2,10,6,14 --10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0 
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

59
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10  2,10,6,14 --10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  No more combinations
5,7 01-1 are possible, thus we
7 0111 
group 3 14 1110 
6,7 011- stop here.
6,14 -110 
10,14 1-10 

60
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  0,8,1,9 -00-
group 1 2 0010 
1,5 0-01 0,8,2,10 -0-0
8 1000 
1,9 -001  2,6,10,14 --10
5 0101  2,6 0-10  2,10,6,14 --10
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  We can eliminate repeated
5,7 01-1 combinations
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

61
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001  Now we form f with the
5 0101  2,6 0-10  terms not checked
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

62
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d + a’bd
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

63
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d + a’bd + a’bc
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

64
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d + a’bd + a’bc + b’c’
5,7 01-1
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

65
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d + a’bd + a’bc + b’c’
5,7 01-1 + b’d’
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

66
Quine-McCluskey Method
An Example

Column I Column II Column III

group 0 0 0000  0,1 000-  0,1,8,9 -00-


0,2 00-0  0,2,8,10 -0-0
1 0001 
0,8 -000  2,6,10,14 --10
group 1 2 0010 
8 1000  1,5 0-01
1,9 -001 
5 0101  2,6 0-10 
6 0110  2,10 -010 
group 2 9 1001  8,9 100- 
10 1010  8,10 10-0  f = a’c’d + a’bd + a’bc + b’c’
5,7 01-1 + b’d’ + cd’
7 0111 
group 3 14 1110 
6,7 011-
6,14 -110 
10,14 1-10 

67
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
d
c

68
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
d
1
c

69
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
d
1
c
1

70
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
1 1 1
d
1
c
1

71
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
1 1 1
d
1
c
1 1 1

72
Quine-McCluskey Method
An Example
But, the form below is not minimized. Using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
1 1 1
d
1
c
1 1 1 1

73
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
F = a’bd
1 1 1
d
1
c
1 1 1 1

74
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
F = a’bd + cd’
1 1 1
d
1
c
1 1 1 1

75
Quine-McCluskey Method
An Example
But, the form below is not minimized, using a
Karnaugh map we can obtain:
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
F = a’bd + cd’ + b’c’
1 1 1
d
1
c
1 1 1 1

76
Quine-McCluskey Method
An Example
What are the extra terms in the solution obtained
with the Quine-McCluskey method?
f = a’c’d + a’bd + a’bc + b’c’ + b’d’ + cd’

1 1
F = a’bd + cd’ + b’c’
1 1 1
d
Thus, we need a method to 1
eliminate this redundant terms c
1 1 1 1
from the Quine-McCluskey solution.
b

77
The Prime Implicant Chart

The prime implicant chart is the second part of


the Quine-McCluskey procedure.

It is used to select a minimum set of prime


implicants.

Similar to the Karnaugh map, we first select


the essential prime implicants, and then we
select enough prime implicants to cover all
the minterms of the function.

78
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

Question: Given the prime implicant chart above,


how can we identify the essential prime
implicants of the function?

79
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

Similar to the Karnaugh map, all we have to do is


to look for minterms that are covered by a single
term.

80
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

Once a term is included in the solution, all the


minterms covered by that term are covered.

Therefore we may now mark the covered minterms


and find terms that are no longer useful.
81
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

82
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

As we have not covered all the minterms with


essential prime implicants, we must choose
enough non-essential prime implicants to
cover the remaining minterms.

83
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

What strategy should we use to find a minimum


cover for the remaining minterms?

84
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

We choose first prime implicants that cover the


most minterms.
Should this strategy always work??

85
Prime Implicant Chart
(Example)
minterms
Prime Implicants 0 1 2 5 6 7 8 9 10 14
(0,1,8,9) b’c’ X X X X
(0,2,8,10) b’d’ X X X X
(2,6,10,14) cd’ X X X X
(1,5) a’c’d X X
(5,7) a’bd X X
(6,7) a’bc X X

Therefore our minimum solution is:

f(a,b,c,d) = b’c’ + cd’ + a’bd

86
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Which ones are the essential prime implicants


in this chart?
There is no essential prime implicants, how we proceed?

87
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Also, all implicants cover the same number of


minterms. We will have to proceed by trial and error.
F(a,b,c) = a’b’

88
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Also, all implicants cover the same number of


minterms. We will have to proceed by trial and error.
F(a,b,c) = a’b’ + bc’

89
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Thus, we get the minimization:

F(a,b,c) = a’b’ + bc’ + ac

90
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Lets try another set of prime implicants.

91
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Lets try another set of prime implicants.

F(a,b,c) = a’c

92
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Lets try another set of prime implicants.

F(a,b,c) = a’c + b’c’

93
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

Lets try another set of prime implicants.

F(a,b,c) = a’c + b’c’+ ab

94
Cyclic Prime Implicant Chart
F(a,b,c) =  m(0, 1, 2, 5, 6, 7)
minterms
0 1 2 5 6 7
0 000  0,1 00-

Prime Implicants
(0,1) a’b’ X X
1 001  0,2 0-0 (0,2) a’c X X
2 010  1,5 -01 (1,5) b’c X X
5 101  2,6 -10 (2,6) bc’ X X
6 110  5,7 1-1 (5,7) ac X X
7 111  6,7 11- (6,7) ab X X

This time we obtain:

F(a,b,c) = a’c + b’c’+ ab

95
Cyclic Prime Implicant Chart
F(a,b,c) = a’b’ + bc’ + ac
F(a,b,c) = a’c + b’c’+ ab

Which minimal form is better?

Depends on what terms we must form for other


functions that we must also implement.

Often we are interested in examining all minimal


forms for a given function.

Thus we need an algorithm to do so.

96
Petrick’s Method

S. R. Petrick. A direct determination of the irredundant


forms of a boolean function from the set of prime
implicants. Technical Report AFCRC-TR-56-110, Air
Force Cambridge Research Center, Cambridge,
MA, April, 1956.

Goal: Given a prime implicant chart, determine


all minimum sum-of-products solutions.

97
Petrick’s Method
An Example
minterms
0 1 2 5 6 7

Prime Implicants
P1 (0,1) a’b’ X X
P2 (0,2) a’c X X
P3 (1,5) b’c X X
P4 (2,6) bc’ X X
P5 (5,7) ac X X
P6 (6,7) ab X X

Step 1: Label all the rows in the chart.

Step 2: Form a logic function P with the logic


variables P1, P2, P3 that is true when
all the minterms in the chart are covered.
98
Petrick’s Method
An Example
minterms
0 1 2 5 6 7

Prime Implicants
P1 (0,1) a’b’ X X
P2 (0,2) a’c X X
P3 (1,5) b’c X X
P4 (2,6) bc’ X X
P5 (5,7) ac X X
P6 (6,7) ab X X

The first column has an X in rows P1 and P2.


Therefore we must include one of these rows
in order to cover minterm 0. Thus the following
term must be in P:

(P1 + P2)

99
Petrick’s Method
An Example
minterms
0 1 2 5 6 7

Prime Implicants
P1 (0,1) a’b’ X X
P2 (0,2) a’c X X
P3 (1,5) b’c X X
P4 (2,6) bc’ X X
P5 (5,7) ac X X
P6 (6,7) ab X X

Following this technique, we obtain:


P = (P1 + P2) (P1 + P3) (P2 + P4) (P3 + P5) (P4 + P6) (P5 + P6)

P = (P1 + P2) (P1 + P3) (P4 + P2) (P5 + P3) (P4 + P6) (P5 + P6)

P = (P1 + P2) (P1 + P3) (P4 + P2) (P4 + P6) (P5 + P3) (P5 + P6)

P = (P1 + P2 P3) (P4 + P2 P6) (P5 + P3 P6)


100
Petrick’s Method
An Example
P = (P1 + P2) (P1 + P3) (P2 + P4) (P3 + P5) (P4 + P6) (P5 + P6)

P = (P1 + P2) (P1 + P3) (P4 + P2) (P5 + P3) (P4 + P6) (P5 + P6)

P = (P1 + P2) (P1 + P3) (P4 + P2) (P4 + P6) (P5 + P3) (P5 + P6)

P = (P1 + P2 P3) (P4 + P2 P6) (P5 + P3 P6)

P = (P1 P4 + P1 P2 P6 + P2 P3 P4 + P2 P3 P6) (P5 + P3 P6)

P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P2 P3 P5 P6
+ P1 P3 P4 P6 + P1 P2 P3 P6 + P2 P3 P4 P6 + P2 P3 P6

P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6

101
Petrick’s Method
An Example
P = P1 P4 P5 + P1 P2 P5 P6 + P2 P3 P4 P5 + P1 P4 P3 P6 + P2 P3 P6

This expression says that to cover all the minterms


we must include the terms in line P1 and line P4 and
line P5, or we must include line P1, and line P2, and
line P5, and line P6, or …
Considering that all the terms P1, P2, … have the same
cost, how many minimal forms the function has?
The two minimal forms are P1 P4 P5 and P2 P3 P6:

F = a’b’ + bc’ + ac F = a’c’ + b’c + ab

102

Anda mungkin juga menyukai