You are on page 1of 33

Table Methods for PI Generation

This method of simplifying a Boolean equation was improved by


Quine and McCluskey and is sometimes known as the Q-M
Method.
The Tabular Method:
1. Starts with a table of minterms.
2. Compares each minterm with every other minterm in the
list to find minterms which differ in exactly one variable.
3. Constructs a new list with terms of one fewer variables,
keeping track of which minterms were covered.
4. Compares every element in the new list with each other
to find terms that differ in one more variable.
5. Repeats Steps 3 and 4 until done.
An Example: F(x,y,z)= m(2,3,6,7)
Initial work: Step 1 creates a table of minterms.
Column (a) Column (b) Column(c)
xyz xyz xyz
010 m2
011 m3
110 m6
111 m7
Step 2: Compare each minterm with all others.
010: (011  01-), (110  -10), (111 Ø)
011: (110  Ø), (111 -11)
110: (111  11-)
Results - Step 2
Column (a) Column (b) Column(c)
xyz
010 m2 xyz m2,m3 xyz
(01-)
011 m3 (-10) m2,m6
110 m6 (-11) m3,m7
111 m7 (11-) m6,m7
Note that there can be terms which are duplicated -- that
is, they appear more than once. The terms are duplicates
if they have the same pattern of bits (including the -) and
they came from the same minterms. Only one of each
duplicate term should remain.
Step 3
Column (a) Column (b) Column(c)
xyz
010 m2 xyz m2,m3 xyz
(01-)
011 m3 (-10) m2,m6
110 m6 (-11) m3,m7
111 m7 (11-) m6,m7
Step 3: Make a new list by comparing items in Column (b).
01-: (-10  Ø), (-11  Ø ), (11-  -1-)
-10: (01-  Ø), (-11  -1-), (11-  Ø )
-11: (01-  -1-), (-10  -1-), (11-  Ø )
11-: (01-  -1-), (-10  Ø ), (-11  Ø )
The Results of Step 3
Column (a) Column (b) Column(c)
xyz xyz xyz
010 m2 (01-) m2,m3 (-1-) m2,m3,m6,m7
011 m3 (-10) m2,m6 (-1-) m2,m6,m3,m7
110 m6 (-11) m3,m7 (-1-) m3,m7,m6,m7
111 m7 (11-) m6,m7 (-1-) m6,m7,m2,m3

Obviously, the Column (c) can be simplified by


eliminating duplicates -- this leads to only one entry:
(-1-) from m2,m3,m6,m7
This corresponds to the Prime Implicant "y". The
algorithm terminates at this point. Since this is the only PI
and it covers all minterms, the result is: F(x,y,z) = y
Computational Complexity Issues
The table method generates a lot of work. For "n"
minterms, there are on the order of n2 comparisons
required.
The Q-M Method simplifies the work by sorting the
minterms into terms that can compare favorably. Terms
that have no chance of combining are not even tried. It
also adds some bookkeeping to simplify PI identification.
Grouping: Use the number of "1"s in the minterm to group
the minterms. Preserve groups derived from this grouping
in adjacent columns.
Bookkeeping: Use a "check mark" () next to terms
that have been combined. Carry along lists of
minterms used.
Q-M on F(x,y,z)= m(2,3,6,7)
Initial Column (a) Column (b) Column(c)
Group
One 1 xyz
010 m2 xyz xyz
----------------
Two 1's 011 m3
110 m6
----------------
Three 1's 111 m7
Step 2: Compare terms from adjacent groups.
Group 1 => Group 2
010: (011  01-), (110  -10)
Group 2 => Group 3
011: (111 -11)
110: (111  11-) NOTICE: Fewer steps!
The Result of Step 3
Initial Column (a) Column (b) Column(c)
Group
One 1 xyz
010 m2 xyz
(01-) m2,m3 xyz
---------------- (-10) m2,m6
Two 1's 011 m3 ------------------
110 m6 (-11) m3,m7
---------------- (11-) m6,m7
Three 1's 111 m7

Step 4: Repeat on Column (b)


Group (1-2) => Group (2-3)
(01-): (-11 Ø), (11-  -1-)
(-10): (-11  -1-), (11- Ø)
Result of Step 4
Initial Column (a) Column (b) Column(c)
Group
One 1 xyz
010 m2 xyz
(01-) m2,m3 xyz
(-1-)m2,m3,m6,m7
---------------- (-10) m2,m6 (-1-)m2m6,m7
,m3,m6,m7
Two 1's 011 m3 ----------------- m3,m7
110 m6 -(-11) m3,m7
---------------- (11-) m6,m7
Three 111 m7
1's that the resulting terms are duplicates and are unchecked at
Note
termination.
Final Result: F(x,y,z) = y
In general, when no new terms can be generated, the set of all
unchecked terms give the result.
Review of Boolean Logic
Given a Boolean Function F, We have learned to express F
as: 1. Canonical Sum-of-Minterms
2. Canonical Product-of-Maxterms
3. Standard Sum-of-Products (SOP) Form
4. Standard Product-of-Sums (POS) Form
We have also learned how to minimize the number of
literals in F by using:
1. Algebraic Simplification.
2. Selection of Prime Implicants (Karnaugh Map
and Quine-McCloskey Method)
3. Systematic K-Map to minimum literal SOP.
Canonical Forms

F ( w , x , y , z )    0 , 2 , 4 , 5 , 8 ,10 ,11 ,13 ,15 


F( w, x, y, z )  1,3,6,7,9,12,14

NOTE: there is one and only one way to write the


equations in Canonical Sum-of-minterm and
Canonical Product-of-Maxterm form.
Minimum Literal SOP Form
Example: Find a minimum literal Standard SOP form for
F(w,x,y,z)
F(w,x,y,z) = F(w,x,y,z) =
x'z' + w'xy' + wxz + wx'y x'z' + w'y'z' + xy'z + wyz

NOTE: Both are minimum literal SOP!


Tabular Method to Find a Cover
1). Construct a table with:
a). Columns for each minterm and
b). Rows for each Prime Implicant
2). Select Essential Prime Implicants and check off each
covered minterm.
3). Delete Less Than Prime Implicants
4). Select Secondary Essential Prime Implicants and check off
each covered minterm.
5). Repeat 3 and 4 until a cover is generated.
If cycles exist, pick a PI and generate a cover and then delete
that same PI and generate an alternate cover. Select the
minimum literal cover.
Table Method Example
Function g(w,x,y,z)
Step 1, Enter table:

PI 0 1 2 3 5 8 10 13 14 15 Type
x' z' x x x x
w' x' x x x x
w' y' z x x
x y' z x x
wxz x x
wx y x x
w y z' x x
Select Essential Prime Implicants
Step 2: Select Essential Prime Implicants and check them
off along with minterms covered.
PI 0 1 2 3 5 8 10 13 14 15 Type

x'z' x x x x Essential

w'x' x x x x Essential
w'y'z x x
xy'z x x
wxz x x
wxy x x
wyz' x x
     
Note: w'y'z is less than xy'z since xy'z covers two as yet uncovered
minterms (m5 and m13) while w'y'z covers one (m5) uncovered
minterm.
Similarly wyz' is less than wxy. Why?
Select Essential Prime Implicants
Reduced Covered Table

PI 5 13 14 15
w'y'z x
xy'z x x
wxz x x
wxy x x
wyz' x
Less Than Prime Implicants
Step 3: Delete Less Than Prime Implicants
PI 0 1 2 3 5 8 10 13 14 15 Type

x'z' x x x x Essential

w'x' x x x x Essential
w'y'z x x Less Than
xy'z x x
wxz x x
wxy x x
wyz' x x Less Than
     

Note that after deleting the Less Than PIs, the following occurs:
Minterm 5 is only covered by xy'z and Minterm 14 by wxy.
Thus wxy and xy'z are Secondary Essential PIs.
Secondary Essential PIs
PI 0 1 2 3 5 8 10 13 14 15 Type
 x'z' x x x x Essential
 w'x' x x x x Essential
w'y'z x x Less Than
 xy'z x x Secondary
wxz x x Essential
(Redundant)
 wxy x x Secondary
wyz' x x Essential
Less Than
         
Note that at this point, minterms 13 and 15 are already
covered, so the PI wxz is redundant. The algorithm
terminates at this point with the minimum literal, Standard
Sum-of-Products form:
F(w,x,y,z) = x'z' + w'x' + xy'z + wxy
Cyclic Structures
Let F(x,y,z) =  m(0,1,2,5,6,7)

We build the following PI Table:

PI 0 1 2 5 6 7 Type
x' y' x x
y' z x x
xz x x
xy x x
y z' x x
x' z' x x
Cyclic Structure: Pick One
NOTE: All minterms are covered twice. No PIs are
essential. A cyclic structure exists.
Step 1: Pick a PI and mark off the covered minterms.
PI 0 1 2 5 6 7 Type
 x' y' x x (Picked)
y' z x x
xz x x
xy x x
y z' x x
x' z' x x
 
Less Thans
Step 2: Eliminate Less Thans.

PI 0 1 2 5 6 7 Type
 x' y' x x (Picked)
y' z x x Less Than
xz x x
xy x x
y z' x x
x' z' x x Less Than
 

Once the less thans are deleted, there are two


secondary essential PIs.
Secondary Essential PIs
Step 3: Pick Secondary Essential PIs.
PI 0 1 2 5 6 7 Type
 x' y' x x (Picked)
y' z x x Less Than
 xz x x Secondary
xy x x (Redundant)
EPI
 y z' x x Secondary
x' z' x x Less Than
EPI
     
Picking the two secondary essential PIs generates a
complete cover and we can state that the Standard Sum of
Products form for F(x,y,z) is:
F(x,y,z) = x'y' + xz + yz'
Now Go Back and Try Again
Step 1': GO BACK and eliminate the PI you picked and
generate a new cover.
PI 0 1 2 5 6 7 Type
x' y' x x (Eliminated)
 y' z x x Essential
xz x x
xy x x
y z' x x
 x' z' x x Essential
   
Note that y'z and x'z' become essential PIs.
Select y'z and x'z' and then notice that xz and yz'
become less thans.
Finish Up
Step 2': Eliminate the less thans.
Step 3': Select Secondary Essential PIs.
PI 0 1 2 5 6 7 Type
x' y' x x (Eliminated)
 y' z x x Essential PI
xz x x Less Than
 xy x x Secondary EPI
y z' x x Less Than
 x' z' x x Essential PI
     
Notice that after Step 2', xy is a secondary essential PI and
that picking it completes the cover. Thus the Standard
Product of Sums form for this selection is: F(x,y,z) = y'z + xy + x'z'
Both Implementations are Minimum Literal.
Quine-McCluskey (tabular) method
1. Arrange all minterms in group such that all terms in the
same group have the same # of 1’s in their binary
representation.
2. Compare every term of the lowest-index group with each
term in the successive group. Whenever possible, combine
two terms being compared by means of
gxi+gxi´=g(xi+xi´)=g.
Two terms from adjacent groups are combinable if their
binary representation differ by just a single digit in the
same position.
3. The process continues until no further combinations are
possible. The remaining unchecked terms constitute the set
of PI.
Ex) f(x1,x2,x3,x4) = (0,1,2,5,6,7,8,9,10,13,15)

#
x1,x2,x3,x4 x1,x2,x3,x4 x1,x2,x3,x4 x1,x2,x3,x4

0 0 0 0 0  0 0 0 -  (0,1) - 0 0 - (0,1,8,9)
0 0 - 0  (0,2) - 0 - 0 (0,2,8,10)
1 0 0 0 1 - - 0 1 (1,5,9,13)
 - 0 0 0  (0,8)
2 0 0 1 0  - 1 - 1 (5,7,13,15)
8 1 0 0 0  0 - 0 1 
(1,5) (1,9)
- 0 0 1 
5 0 1 0 10 
0 - 1 0
(2,6) Using prime implicant chart, we can find
6 1 1 0  (2,10)
9 1 0 0 1 
- 0 1 0  (8,9) essential PI
1 0 0 -  (8,10)
10 1 0 1 0  1 0 - 0  0 1 2 5 6 7 8 9 10 13 15
7 0 1 1 1  0 1 - 1 - (5,7)
 (2,6)  
13 1 1 0 1  1 0 1 0 (5,13)  
 (6,7)
1 1 - 1 - (6,7) (0,1,8,9)    
15 1 1 1 1  0 1  (9,13) (0,2,8,10)   

(1,5,9,13)    
- 1 1 1  (7,15) (5,7,13,15)    
1 1 - 1  (13,15)
The reduced PI chart

1 6 9 The essential PI’s are (0,2,8,10) and (5,7,13,15) . So,


(2,6)  f(x1,x2,x3,x4) = (0,2,7,8) + (5,7,13,15) + PI’s
(6,7) 
(0,1,8,9)   Here are 4 different choices (2,6) + (0,1,8,9), (2,6) + (1,5,9,13)
(1,5,9,13)   (6,7) + (0,1,8,9), or (6,7) + (1,5,9,13)
A PI pj dominates PI pk iff every minterm covered by pk is also covered by pj.
m1 m2 m3 m4
pj pk   
  (can remove)

Branching method
If we choose p1 first, then p3, p5 are next.
m1 m2 m3 m4 m5
p1
p1 p5
 
p2  
p3 p4  
p5   p3 p4 p2 p3
 

Quine – McCluskey method (no limitation of the # of variables)


Quine-McCluskey example
• F(A,B,C,D) =  (3,9,11,12,13,14,15) +
d (1,4,6)
Ex) f(A,B,C,D) = (3,9,11,12,13,14,15) + d (1,4,6)

PI chart:
3 9 11 12 13 14 15
(1,3, 9, 11)   
(4, 6,12,14)  
(9,13,11,15)    
(12,13,14,15)    

Reduced PI chart:
12 13 14 15
(4, 6,12,14)  
(9,13,11,15)  
(12,13,14,15)    

Result: (1,3,9,11) + (12,13,14,15)


Minimum SOP to Minimum POS
We can use the minimization techniques learned so far
to implement a minimum literal, Standard POS form.

We take the following steps:


1. Implement the COMPLEMENT of a function in
Standard Sum of Product form.
2. Use DeMorgan's Law to complement the function
and convert it to Standard Product of Sum form.

NOTE: Implementing the complement of a function


means using the ZEROS on the K-Map.
Minimum POS Example
Given g(w,x,y,z): Form the Complement (Circle Zeros):

Next we minimize the function using a table method (or


from the K-Map).
Table Method Minimum SOP
PI 4 6 7 9 11 12 Type
 wx'z x x Essential PI
 xy'z' x x Essential PI
 w'xy x x Essential PI Thus: g'(w,x,y,z) =
w'xz' x x Redundant wx'z + xy'z' + w'xy
     

This implements a Standard Sum of Products form for


the complement of the desired function.
Applying DeMorgan's Law we get: g =
(w'+x+z') (x'+y+z) (w+x'+y')
A minimum literal Standard POS form.

You might also like