0% found this document useful (0 votes)
88 views

Quine-Mccluskey Algorithm: Boolean Functions W.V. Quine Edward J. Mccluskey Karnaugh Mapping

The Quine-McCluskey algorithm is a method for minimizing Boolean functions that was developed by W.V. Quine and Edward J. McCluskey. It involves finding all prime implicants of the function and using them in a prime implicant chart to identify the essential prime implicants needed to represent the function in minimal form. The algorithm has two steps - finding all prime implicants and using those in a chart to determine the essential prime implicants. It can handle more variables than Karnaugh mapping but runtime grows exponentially with the number of variables.

Uploaded by

salihbayar1464
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Quine-Mccluskey Algorithm: Boolean Functions W.V. Quine Edward J. Mccluskey Karnaugh Mapping

The Quine-McCluskey algorithm is a method for minimizing Boolean functions that was developed by W.V. Quine and Edward J. McCluskey. It involves finding all prime implicants of the function and using them in a prime implicant chart to identify the essential prime implicants needed to represent the function in minimal form. The algorithm has two steps - finding all prime implicants and using those in a chart to determine the essential prime implicants. It can handle more variables than Karnaugh mapping but runtime grows exponentially with the number of variables.

Uploaded by

salihbayar1464
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1

Quine–McCluskey algorithm
Implicant: In Boolean logic, an implicant is a "covering" (sum term or product term) of one or more minterms in a
sum of products (or maxterms in a product of sums) of a boolean function

The Quine–McCluskey algorithm (or the method of prime implicants) is a method used for


minimization of boolean functions which was developed by W.V. Quine and Edward J. McCluskey. It
is functionally identical to Karnaugh mapping, but the tabular form makes it more efficient for use in
computer algorithms, and it also gives a deterministic way to check that the minimal form of a
Boolean function has been reached. It is sometimes referred to as the tabulation method.

The method involves two steps:

1. Finding all prime implicants of the function.


2. Use those prime implicants in a prime implicant chart to find the essential prime implicants
of the function, as well as other prime implicants that are necessary to cover the function.

Complexity

Although more practical than Karnaugh mapping when dealing with more than four variables, the
Quine–McCluskey algorithm also has a limited range of use since the problem it solves is NP-hard:
the runtime of the Quine–McCluskey algorithm grows exponentially with the number of variables. It
can be shown that for a function of n variables the upper bound on the number of prime implicants is
3n/n. If n = 32 there may be over 6.5 * 1015 prime implicants. Functions with a large number of
variables have to be minimized with potentially non-optimal heuristic methods, of which
the Espresso heuristic logic minimizer is the de-facto standard.[1]

Example

Step 1: finding prime implicants

Minimizing an arbitrary function:

m2 0 0 1 0 0
A B C D f

m3 0 0 1 1 0
m0 0 0 0 0 0

m4 0 1 0 0 1
m1 0 0 0 1 0

m5 0 1 0 1 0
2

into this table, so they can be


m6 0 1 1 0 0
combined with minterms:

m7 0 1 1 1 0 Number Binary
Minterm
of 1s Representation

m8 1 0 0 0 1
m4 0100
1
m9 1 0 0 1 x
m8 1000

m10 1 0 1 0 1
m9 1001

m11 1 0 1 1 1
2 m10 1010

m12 1 1 0 0 1
m12 1100

m13 1 1 0 1 0
m11 1011
3
m14 1 1 1 0 x
m14 1110

m15 1 1 1 1 1
4 m15 1111

One can easily form the canonical sum of


products expression from this table, At this point, one can start
simply by summing combining minterms with other
the minterms (leaving outdon't-care minterms. If two terms vary by only
terms) where the function evaluates to a single digit changing, that digit
one: can be replaced with a dash
indicating that the digit doesn't
fA,B,C,D = A'BC'D' + AB'C'D' + AB'CD'
matter. Terms that can't be
+ AB'CD + ABC'D' + ABCD.
combined any more are marked
Of course, that's certainly not with a "*". When going from Size 2
minimal. So to optimize, all to Size 4, treat '-' as a third bit
minterms that evaluate to one are value. Ex: -110 and -100 or -11- can
first placed in a minterm table. be combined, but not -110 and
Don't-care terms are also added 011-. (Trick: Match up the '-' first.)
3

Num 0- Size 2 Size 4 11-0


Mint
ber Cu Implic Implicant
erm
of 1s be ants s
m(11,
11
m15 15) 1- --
11
m(4,1 11
01 m(8,9,10,
m4 2)
00 11) 10--* 4
-100*
m(14,
1
15)
m(8,10,1 111-
10 m(8,9)
m8 2,14) 1--
00 100-
0*
Note: In this example, none of the
terms in the size 4 implicants table
m(8,1 can be combined any further. Be
-- -- -- 0) 10- -- aware that this processing should
0 be continued otherwise (size 8 etc).

m(8,1 m(10,11, Step 2: prime implicant chart


10
m9 2) 1- 14,15) 1- None of the terms can be combined
01
00 1-*
any further than this, so at this
point we construct an essential
10 prime implicant table. Along the
2 m10 -- --
10 side goes the prime implicants that
have just been generated, and

m(9,1 along the top go the minterms


11
m12 1) 10- -- specified earlier. The don't care
00
1 terms are not placed on top - they
are omitted from this section
because they are not necessary
m(10,
-- -- -- 11) -- inputs.
101-
1 1 1 1 =
48 ABCD
0 1 2 5 >
3 m(10,
10
m11 14) 1- --
11
10 -
1 =
m(4,12)* X X - 100
0 >
m14 11 m(12, -- 0
10 14)
4

1
m(8,9,10 = Both of those final
XX X 0- 10- -
,11) >
- equations are
functionally equivalent
to this original (very
m(8,10,1 1- =
XX X 1- - 0 area-expensive)
2,14) -0 >
equation:

m(10,11, 1- =
X X X 1- 1-
14,15)* 1- >

Here, each of the essential prime


implicants has been starred - the
second prime implicant can be
'covered' by the third and fourth,
and the third prime implicant can
be 'covered' by the second and
first, and neither is thus essential. If
a prime implicant is essential then,
as would be expected, it is
necessary to include it in the
minimized boolean equation. In
some cases, the essential prime
implicants do not cover all
minterms, in which case additional
procedures for chart reduction can
be employed. The simplest
"additional procedure" is trial and
error, but a more systematic way
is Petrick's Method. In the current
example, the essential prime
implicants do not handle all of the
minterms, so, in this case, one can
combine the essential implicants
with one of the two non-essential
ones to yield one of these two
equations:

You might also like