29.06.2013 Views

Prime Implicant

Prime Implicant

Prime Implicant

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Unit 6<br />

Quine-McCluskey<br />

Quine McCluskey<br />

Method


Quine-McCluskey<br />

Quine McCluskey Method<br />

Quine-McCluskey<br />

McCluskey Mathod<br />

Quine<br />

6.1 Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

6.2 The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

6.3 Petrick’s Petrick Method<br />

6.4 Simplification of Incompletely Specified<br />

Functions<br />

6.5 Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

6.6 Conclusions<br />

Unit 06 2


Quine-McCluskey<br />

Quine McCluskey Method<br />

Cover: A switching function f(x (x1,x ,x2,…,xn) ) is said to<br />

cover another function g(x (x1,x ,x2,…,xn), ), if f assumes the<br />

value 1 whenever g does.<br />

<strong>Implicant</strong> : Given a function F of n variables, a<br />

product term P is an implicant of F iff for every<br />

combination of values of the n variables for which<br />

P=1 , F is also equal 1.That is, P=1 implies F=1. F=1<br />

Cover:<br />

<strong>Implicant</strong><br />

<strong>Prime</strong> <strong>Implicant</strong>: <strong>Implicant</strong> A<br />

<strong>Prime</strong><br />

A prime implicant of a<br />

function F is a product term implicart which is no<br />

longer an implicant if any literal is deleted from it.<br />

Essential <strong>Prime</strong> <strong>Implicant</strong>: <strong>Implicant</strong> If<br />

If a minterm is<br />

covered by only one prime implicant, implicant,<br />

then that prime<br />

implicant is called an essential prime implicant.<br />

implicant<br />

Unit 06 3


Quine-McCluskey<br />

Quine McCluskey Method<br />

On a Karnaugh Map<br />

Any single 1 or any group of 1’s 1 s (2 k 1’s, s, k=0,1,2,…) k=0,1,2, )<br />

which can be combined together on a map of the<br />

function F represents a product term which is<br />

called an implicant of F.<br />

A product term implicant is called a prime implicant<br />

if it cannot be combined with another term to<br />

eliminate a variable.<br />

If a minterm is covered by only one prime implicant, implicant,<br />

then that prime implicant is called an essential<br />

prime implicant.<br />

implicant<br />

Unit 06 4


Quine-McCluskey<br />

Quine McCluskey Method<br />

A systematic simplification procedure<br />

Input: Input:<br />

minterm expansion<br />

Output: Output:<br />

a minimum sum of products<br />

Method: Method<br />

1. Generate all prime implicants<br />

Eliminate as many literals as possible from each<br />

term by systematically applying the theorem<br />

XY+XY’=X XY+XY =X<br />

2. Find the minimum solution<br />

Use a prime implicant chart to select a minimum<br />

set of prime implicants which contain a minimum<br />

number of literals.<br />

1.<br />

2.<br />

Unit 06 5


Quine-McCluskey<br />

Quine McCluskey Method<br />

Example: : F(a,b,c)= F(a,b,c)=a’b’c’+ab<br />

+ab’c’+ab +ab’c+abc c+abc<br />

All <strong>Implicant</strong>s: <strong>Implicant</strong>s:<br />

a’b’c’,ab ,ab’c’,ab ,ab’c,abc c,abc<br />

ab’,b ab ,b’c’,ac ,ac<br />

<strong>Prime</strong> <strong>Implicant</strong>s: <strong>Implicant</strong>s<br />

ab’,b ab ,b’c’,ac ,ac<br />

Essential <strong>Prime</strong> <strong>Implicant</strong>s: <strong>Implicant</strong>s<br />

b’c’,ac ,ac<br />

Minimum sum of products: products<br />

F(a,b,c)= F(a,b,c)=b’c’+ac<br />

+ac<br />

Example<br />

Unit 06 6


Quine-McCluskey<br />

Quine McCluskey Method<br />

Quine-McCluskey<br />

Quine McCluskey Method: Method<br />

1. Find all of the prime implicants of the<br />

function.<br />

2. Construct the prime implicant table and find<br />

the essential prime implicants of the function.<br />

3. Include the essential prime implicants in the<br />

minimal sum.<br />

Unit 06 7


Quine-McCluskey<br />

Quine McCluskey Method<br />

Quine-McCluskey<br />

Quine McCluskey Method: Method<br />

4. Manipulate the prime implicant table.<br />

4-1. . Delete all essential prime implicant from the<br />

prime implicant table,<br />

4-2. 2. Determine and delete the dominated rows<br />

and dominating columns in the table,<br />

4-3. 3. Find the (secondary ( secondary) ) essential implicants. implicants<br />

5. Repeat Steps 3 and 4 as many times as they<br />

are applicable until a minimal cover of the<br />

function is found.<br />

Unit 06 8


Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

Find all of the prime implicants<br />

Find<br />

(1). Represent each minterm by a binary code. code<br />

(2). Find the decimal number for each binary code.<br />

(3). Define the number of 1’s 1 s in binary number as<br />

the index of the number.<br />

(3 (3-1). 1). Group all the binary numbers of the same<br />

index into a group.<br />

(3 (3-2). 2). List all the groups in a column in the index<br />

ascending order. order<br />

(3 (3-3). 3). Within each group, the binary number are<br />

listed in the ascending order of their decimal-number<br />

decimal number<br />

equivalent.<br />

equivalent<br />

Unit 06 9


Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

(4). Start with the terms in the set of lowest<br />

index; index;<br />

compare them with those, if any, in<br />

the set whose index is 1 greater, greater,<br />

and<br />

eliminate all redundant variables by<br />

XY+XY’=X. XY+XY =X.<br />

(5). Check off all the terms that entered into<br />

the combinations.<br />

combinations.<br />

The ones that are left are<br />

prime implicants. implicants<br />

(6). Repeat Steps (4) and (5) until no further<br />

reduction is possible.<br />

Unit 06 10


Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

Example: Find<br />

Example: Find all of the prime implicants<br />

f<br />

( a,<br />

b,<br />

c,<br />

d)<br />

= ∑ m(<br />

0,<br />

1,<br />

2,<br />

5,<br />

6,<br />

7,<br />

8,<br />

9,<br />

10,<br />

14)<br />

implicants of the function<br />

Unit 06 11


Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

Example: Find<br />

Example: Find all of the prime implicants<br />

f<br />

( a,<br />

b,<br />

c,<br />

d)<br />

= ∑ m(<br />

0,<br />

1,<br />

2,<br />

5,<br />

6,<br />

7,<br />

8,<br />

9,<br />

10,<br />

14)<br />

implicants of the function<br />

Unit 06 12


Determination of <strong>Prime</strong> <strong>Implicant</strong>s<br />

Example (Cont.):<br />

Minimum form ???<br />

Unit 06 13


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Construct the <strong>Prime</strong> <strong>Implicant</strong> Table<br />

(Chart) and find the Essential <strong>Prime</strong><br />

<strong>Implicant</strong>s of the function<br />

Construct<br />

(1) Construct the prime implicant table<br />

(1)<br />

(1 (1-1) 1) Each column carries a decimal number<br />

at the top which correspond to the one of<br />

the minterm in the given function,<br />

(1 (1-2) 2) The column are assigned by such a<br />

number in ascending order, order<br />

(1 (1-3) 3) Each row corresponds to one of the<br />

prime implicants, implicants,<br />

P1,P2,….<br />

P1,P2,<br />

Unit 06 14


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

(2) Make a cross under each decimal<br />

number that is a term contained in the<br />

prime implicant represented by that row.<br />

(3) Find all the columns that contain a<br />

single cross and circle them; place an<br />

asterisk * at the left of those rows in which<br />

you circle a cross.<br />

The rows marked with an asterisk are the<br />

essential prime implicants.<br />

implicants<br />

Unit 06 15


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Example:<br />

Unit 06 16


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Example:<br />

Unit 06 17


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Example with a cyclic prime implicant<br />

table<br />

F<br />

= ∑ m(<br />

0,<br />

1,<br />

2,<br />

5,<br />

6,<br />

7)<br />

Sol: Sol:<br />

Find all of the prime implicants<br />

Unit 06 18


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Sol(cont.): Sol(cont.):<br />

Select P1 first.<br />

The minimum sum of products<br />

F =<br />

a′<br />

b′<br />

+ bc′<br />

+<br />

ac<br />

Unit 06 19


The <strong>Prime</strong> <strong>Implicant</strong> Chart<br />

Sol(cont.): Sol(cont.):<br />

Select P2 first.<br />

The minimum sum of products<br />

The minimum sum of product is not unique. unique<br />

F =<br />

a′<br />

c′<br />

+ b′<br />

c +<br />

ab<br />

Unit 06 20


Petrick’s Petrick Method<br />

A technique for determining all minimum<br />

sum-of sum of-products products solutions from a prime<br />

implicant table.<br />

Before applying Petrick’s Petrick method, all<br />

essential prime implicants and minterms<br />

they cover should be removed from the<br />

table.<br />

Unit 06 21


Petrick’s Petrick Method<br />

Petrick’s Method<br />

Petrick<br />

1. Label the rows of the table, P 1,P ,P2 ,…<br />

2. Form a logic function P(P 1,P ,P2 ,…), ), which<br />

is true when all of the minterms in the table<br />

have been covered.<br />

3. Reduce P to a minimum sum of products<br />

using (X+Y)(X+Z)=X+YZ and X+XY=X.<br />

4. Select one solution that has minimum<br />

number of prime implicant, implicant,<br />

minimum<br />

number of literals.<br />

Unit 06 22


Petrick’s Petrick Method<br />

Example: Example:<br />

F<br />

= ∑ m(<br />

0,<br />

1,<br />

2,<br />

5,<br />

6,<br />

7)<br />

Unit 06 23


Petrick’s Petrick Method<br />

Example (cont.):<br />

In order to cover minterm 0, we must choose<br />

P1 or P 2 ; therefore, the expression P 1+P +P2 must be true.<br />

cover 0 P1+P +P2 1 P1+P +P3 2 P2+P +P4 5 P3+P +P5 6 P4+P +P6 7 P5+P +P 6<br />

Unit 06 24


Petrick’s Petrick Method<br />

Example (cont.):<br />

P = P + P )( P + P)(<br />

P + P )( P + P )( P + P )( P + P ) = 1<br />

( 1 2 1 3 2 4 3 5 4 6 5 6<br />

Using (<br />

X + Y )( X + Z)<br />

= X + YZ and the<br />

distributive law<br />

Unit 06 25


Petrick’s Petrick Method<br />

Example (cont.):<br />

Use to delete redundant terms from P<br />

P = PP<br />

P + PP<br />

P P + P PP<br />

P + P PP<br />

P<br />

1<br />

1<br />

1<br />

4<br />

4<br />

3<br />

5<br />

+ PP<br />

P P<br />

= PP<br />

P<br />

5<br />

4<br />

6<br />

1<br />

1<br />

2<br />

2<br />

3implicants<br />

Two minimum solutions:<br />

F<br />

F<br />

=<br />

=<br />

X + XY =<br />

P<br />

1<br />

P<br />

2<br />

1<br />

5<br />

5<br />

2<br />

4<br />

6<br />

+ P P PP<br />

+ PP<br />

P P<br />

+<br />

+<br />

P<br />

4<br />

P<br />

3<br />

+<br />

+<br />

6<br />

P<br />

P<br />

3<br />

X<br />

6<br />

2<br />

2<br />

3<br />

3<br />

2<br />

4<br />

4<br />

4<br />

3<br />

5<br />

+ P PP<br />

+ P PP<br />

P<br />

5<br />

6<br />

5<br />

4<br />

P<br />

6<br />

2<br />

1<br />

3<br />

3<br />

5<br />

2<br />

4<br />

4<br />

3<br />

6<br />

+ P PP<br />

+ PP<br />

P P<br />

= a′<br />

b′<br />

+ bc′<br />

+ ac<br />

= a′<br />

c′<br />

+ b′<br />

c +<br />

6<br />

ab<br />

6<br />

+ P PP<br />

2<br />

3<br />

6<br />

3<br />

Unit 06 26


Simplification of Incompletely<br />

Specified Functions<br />

Modify the Quine-McCluskey<br />

Quine McCluskey procedure<br />

Finding the <strong>Prime</strong> <strong>Implicant</strong>s<br />

Treat Treat the don’t don t care terms as if they were<br />

required minterms. minterms<br />

Forming the <strong>Prime</strong> <strong>Implicant</strong> Table<br />

The The don’t don t cares are not list at the top of the<br />

table.<br />

Unit 06 27


Simplification of Incompletely<br />

Specified Functions<br />

Example: Simplify<br />

F<br />

A,<br />

B,<br />

C,<br />

D)<br />

∑ m(<br />

2,<br />

3,<br />

7,<br />

9,<br />

11,<br />

13)<br />

+<br />

Sol: Treat the don’t don t cares (1,10,15) as<br />

required minterms<br />

( d<br />

= ∑ ( 1,<br />

10,<br />

15)<br />

Unit 06 28


Simplification of Incompletely<br />

Specified Functions<br />

Sol(cont.): .): The don’t don t cares are not list<br />

at the top of the table<br />

Sol(cont<br />

Unit 06 29


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Map-Entered Map Entered Variables –<br />

A modification of the Karnaugh Map<br />

Quine-McCluskey<br />

Quine McCluskey Method<br />

Can be used with functions with a fairly<br />

large number of variables. variables<br />

Not very efficient for functions that have<br />

many variables and relatively few terms<br />

Unit 06 30


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Map-Entered Entered Variables<br />

Map<br />

Example:<br />

F ( A,<br />

B,<br />

C,<br />

D)<br />

= A′<br />

B′<br />

C + A′<br />

BC + A′<br />

BC′<br />

D + ABCD+<br />

( AB′<br />

C)<br />

where (AB’C) (AB C) is don’t don t care. D appears in only two terms,<br />

choose D as a map-entered map entered variable. variable.<br />

F(<br />

A,<br />

B,<br />

C,<br />

D)<br />

=<br />

A′<br />

B′<br />

C+<br />

A′<br />

BC+<br />

A′<br />

BC′<br />

D+<br />

ABCD+<br />

( AB′<br />

C)<br />

= A′<br />

B′<br />

C+<br />

A′<br />

BC+<br />

( A′<br />

BC′<br />

) D+<br />

( ABC)<br />

D+<br />

( AB′<br />

C)<br />

=<br />

m<br />

1<br />

+<br />

m<br />

3<br />

+<br />

m<br />

2<br />

D<br />

+<br />

( m<br />

Unit 06 31<br />

m<br />

7<br />

D<br />

+<br />

5<br />

)


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Example (cont.):<br />

Unit 06 32


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Map-Entered Map Entered Variables<br />

Example:<br />

G(<br />

A,<br />

B,<br />

C,<br />

D,<br />

E,<br />

F)<br />

=<br />

m<br />

0<br />

+ m<br />

+ ( m ) + ( m<br />

1<br />

2<br />

+ m<br />

3<br />

10<br />

+ Em<br />

) + ( m<br />

5<br />

13<br />

+ Em<br />

)<br />

Unit 06 33<br />

7<br />

+ Fm<br />

9<br />

+ m<br />

11<br />

+ m<br />

15


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

General Method of Simplifying Functions<br />

Using Map-entered Map entered Variables<br />

If a variable Pi is placed in square mj of a map of<br />

function F, , this means that F=1 =1 when Pi=1 =1 and the<br />

variable are chosen so that mj=1. =1.<br />

F =<br />

MS<br />

MS<br />

i<br />

:<br />

0<br />

+ PMS<br />

1<br />

Minimum<br />

Sum<br />

+ ...<br />

Unit 06 34<br />

1<br />

+<br />

P<br />

2<br />

MS<br />

2


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

MS<br />

<br />

0 is the minimum sum obtained by<br />

setting P1<br />

= P2<br />

= ... = . 0<br />

MS is the minimum sum obtained by setting<br />

1<br />

setting<br />

P1 = 1,<br />

Pj<br />

= 0(<br />

j ≠ 1)<br />

and replacing all 1’s 1 s on the map<br />

with don’t don t cares. cares<br />

MS is the minimum sum obtained by setting<br />

i<br />

Pi =<br />

1, Pj<br />

= 0(<br />

j ≠ i)<br />

and replacing all 1’s 1 s on the map<br />

with don’t don t cares. cares<br />

The resulting expression for F is<br />

F<br />

= MS + PMS<br />

+ P MS<br />

0<br />

1<br />

1<br />

+ ...<br />

The expression will not generally be minimum if the<br />

variables P 1,P ,P2,… are dependent (e.g. P 1=E, =E, P 2=E =E’,…). ).<br />

2<br />

2<br />

Unit 06 35


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Map-Entered Entered Variables<br />

Map<br />

Example: Use Map-entered Map entered Variables to simplify<br />

the function<br />

F ( A,<br />

B,<br />

C,<br />

D)<br />

= A′<br />

B′<br />

C + A′<br />

BC + A′<br />

BC′<br />

D + ABCD+<br />

( AB′<br />

C)<br />

where (AB’C) (AB C) is don’t don t care.<br />

Sol: D appears in only two terms, choose D as a map-entered<br />

map entered<br />

variable. variable.<br />

Sol:<br />

F(<br />

A,<br />

B,<br />

C,<br />

D)<br />

=<br />

A′<br />

B′<br />

C+<br />

A′<br />

BC+<br />

A′<br />

BC′<br />

D+<br />

ABCD+<br />

( AB′<br />

C)<br />

= A′<br />

B′<br />

C+<br />

A′<br />

BC+<br />

( A′<br />

BC′<br />

) D+<br />

( ABC)<br />

D+<br />

( AB′<br />

C)<br />

=<br />

m<br />

1<br />

+<br />

m<br />

3<br />

+<br />

m<br />

2<br />

D<br />

+<br />

( m<br />

Unit 06 36<br />

m<br />

7<br />

D<br />

+<br />

5<br />

)


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Sol (cont.):<br />

Unit 06 37


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Sol(cont.): Sol(cont<br />

.): F ( A,<br />

B,<br />

C,<br />

D)<br />

= A′<br />

B′<br />

C + A′<br />

BC + A′<br />

BC′<br />

D + ABCD + ( AB′<br />

C)<br />

F = A′<br />

C + D(<br />

C + A′<br />

B)<br />

= A′<br />

C + CD + A′<br />

BD<br />

Unit 06 38


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Example: : Use the Map-Entered Map Entered Variables method<br />

to simplify the function<br />

Example<br />

G(<br />

A,<br />

B,<br />

C,<br />

D,<br />

E,<br />

F)<br />

= m<br />

Let P1=E, =E, P 2=F =F. .<br />

0<br />

+ m<br />

+ ( m ) + ( m<br />

1<br />

2<br />

+ m<br />

3<br />

10<br />

+ Em<br />

) + ( m<br />

5<br />

13<br />

+ Em<br />

)<br />

7<br />

+ Fm<br />

9<br />

+ m<br />

Unit 06 39<br />

11<br />

+ m<br />

15


Simplification Using Map-Entered<br />

Map Entered<br />

Variables<br />

Example (cont.): (cont.)<br />

MS 0 : The minimum inimum sum um obtained by setting P 1=P =P2=0 =0 (E=F=0).<br />

MS 1 : The minimum inimum sum um obtained by setting P 1=1, =1, P 2=0 =0 (E=1. F=0).<br />

MS2<br />

: The minimum inimum sum um obtained by setting P 1=0, =0, P 2=1 =1 (E=0, F=1).<br />

MS 2<br />

G<br />

=<br />

MS<br />

0<br />

+ PMS<br />

1<br />

1<br />

+ P MS<br />

= A′<br />

B′<br />

+ ACD + EA′<br />

D + FAD<br />

2<br />

2<br />

= ( A′<br />

B′<br />

+ ACD)<br />

+ E(<br />

A′<br />

D)<br />

+ F(<br />

AD)<br />

Unit 06 40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!