You are on page 1of 14

Simplification of Boolean Expression

Karnaugh Maps QUINE McCLUSKY METHOD EPRESSO Algorithm HAZARDSStatic and Dynamic

Karnaugh Maps
z

Review

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

QUINE McCLUSKEY METHOD


z z z z

Form the PI chart Remove the EPI Re-form the PI chart ( with non-essential PIs only) Apply the following 2 rules to reduce the PI chart
z z

A row that is covered by another row may be eliminated A column that covers another column may be eliminated

Note: If the PI chart is cyclic ( no SPI and cant be reduced using the above two rules), then arbitrarily select a PI for SPI and apply the rules for the remaining PI chart.
EE 270 Simplification of Boolean Expressions Dr. Tri Caohuu 2006 Andy Davis Lecture 2 3

Learning by example
z

F (A,B,C,D) = m(2,4,6,8,9,10,12,13,15)
AB CD 00 01 00 01 11 10

1 1 1

1 1

11 10

1
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 4

EE 270 Simplification of Boolean Expressions

Step 1
z

Step 1: Grouping Minterms based on number of 1s


Minterms 2 4 8 6 9 10 12 13 15 ABCD 0010 0100 1000 0110 1001 1010 1100 1101 1111 Group 3 (three 1s) Group 4 (four 1s)
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 5

Group 1 (a single 1)

Group 2 (two 1s)

EE 270 Simplification of Boolean Expressions

Step 2
z

Step 2: Make a list of minterms that can be combined ( minterms differing by a single literal)
List 1 Minterm 2 4 8 6 9 10 12 13 15 ABCD 0010 0100 1000 0110 1001 1010 1100 1101 1111 9 9 9 9 9 9 9 9 9 Minterm 2,6 2,10 4,6 4,12 8,9 8,10 8,12 9,13 12,13 13,15 List 2 ABCD 0-10 -010 01-0 -100 10010-0 1-00 1-01 11011-1 PI 2 PI 3 PI 4 PI 5 9 PI 6 9 9 9 PI 7
Lecture 2 6

List 3 Minterm 8,9,12,13 ABCD 1-0PI1

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Step 3
z

Step 3: Determine the minimum number of PIs


9 9 9 9 9

2 ** PI 1 PI 2 PI 3 x x

8 x

9 x

10

12 x

13 x

15

x x x x x x x
Dr. Tri Caohuu 2006 Andy Davis Lecture 2

EPI

PI 4 PI 5 PI 6 ** PI 7

x x

x
7

EE 270 Simplification of Boolean Expressions

Step 4
z

Step 4: Select additional PIs for example


9 9 9 9

F(A,B,C,D) = PI1 + PI3 + PI4 + PI7

2 PI 2 *PI 3 *PI 4 PI 5 PI 6 x x

6 x

10

x x x x x

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

Covering Procedure
z

Rule 1: A row that is covered by another row may be eliminated from the chart. When identical rows are present, all but one of the rows may be eliminated. Rule 2: A column that covers another column may be eliminated. All but one column from a set of identical columns may be eliminated.

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

Covering Procedure Cont.


9 9 9 9 9 9 9 9

0 ** PI 1 PI 2 PI 3 PI 4 PI 5 PI 6 ** PI 7 X

1 X X

8 X

9 X X

10

11

13

14

15

X X X X

X X X

X X

X X X X X X X X

X X X

F(A,B,C,D) = ?
EE 270 Simplification of Boolean Expressions Dr. Tri Caohuu 2006 Andy Davis Lecture 2 10

Cyclic PI
z

A cyclic PI chart is a chart that contains no essential PI and that cannot be reduced by rules 1 and 2.

F (A,B,C,D) = m(1,2,3,4,5,6)
9 9

1 * PI 1 PI 2 PI 3 PI 4 PI 5 PI 6 X X

3 X

X X

X X X X X X
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 11

EE 270 Simplification of Boolean Expressions

Procedure
z

z z z

Step 1: Identify any minterms covered by only one PI in the chart. Select these PIs for the cover. Note that this step identifies essential PIs on the first pass and nonessential PIs on the subsequent passes (from step 4) Step 2: Remove rows corresponding to the identified essential and nonessential PIs. Remove columns corresponding o minterms covered by the removed rows. Step 3: If a cyclic chart results after completing step 2, go to step 5. otherwise, apply the reduction procedure of rules 1 and 2 Step 4: if a cyclic chart results from step 3, go to step 5. otherwise, return to step 1. Step 5: apply the cyclic chart procedure. Repeat step 5 until a void chart occurs or until a noncyclic chart is produced. In the latter case, return to step 1.
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 12

EE 270 Simplification of Boolean Expressions

INCOMPLETELY SPECIFIED FUNCTION


F(A,B,C,D) = m(2,3,7,10,12,15,27) + d(5,18,19,21,23)
List 1 Minterm 2 3 5 10 12 18 7 19 21 15 23 27 ABCDE 00010 00011 00101 01010 01100 10010 00111 10011 10101 01111 10111 11011 9 9 9 9 PI7 9 9 9 9 9 9 9 Minterm 2,3 2,10 2,18 3,7 3,19 5,7 5,21 18,19 7,15 7,23 19,23 19,27 21,23
EE 270 Simplification of Boolean Expressions

List 2 ABCDE 00010-010 -0010 00-11 -0011 001-1 -0101 10010-111 -0111 10-11 1-011 101-1 9 PI4 9 9 9 9 9 9 PI5 9 9 PI6 9 Minterm 2,3,18,19 3,7,19,23 5,7,21,23

List 3 ABCDE -001-0-11 -01-1 PI1 PI2 PI3

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

13

F(A,B,C,D,E) = PI1 + PI4 + PI5 + PI6 + PI7

Listing dont cares as regular minterms Do not list dont cares in the PI chart Dont care terms do not need to be checked out
9 9 9 9 9 9

2 PI 1 PI 2 PI 3 ** PI 4 ** PI 5 ** PI 6 ** PI 7 X X

3 X X

10

12

15

27

X X X X X X X
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 14

EE 270 Simplification of Boolean Expressions

SYSTEMS WITH MULTIPLE OUTPUTS Simplification of switching functions by exploiting potential gate sharing to obtain a simpler overall design. z Introduction of Flags column z Minterms can be combined only if they possess one or more common flags and the term that results from the combination carries only flags that are common to both minterms z Minterm(s) are checked off only if all flags are included in the resulting combination
EE 270 Simplification of Boolean Expressions Dr. Tri Caohuu 2006 Andy Davis Lecture 2 15

SYSTEMS WITH MULTIPLE OUTPUTS


z

Example: F(A,B,C,D) = m(0,2,7,10) + d(12,15) F(A,B,C,D) = m(2,4,5) + d(6,7,8,10) F(A,B,C,D) = m(2,7,8) + d(0,5,13)

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

16

SYSTEMS WITH MULTIPLE OUTPUTS


List 1 Minterm 0 2 4 8 5 6 10 12 7 13 15 ABCD 0000 0010 0100 1000 0101 0110 1010 1100 0111 1101 1111 Flags 9 9 PI11 9 9 9 PI12 9 9 PI10 Minterm 0,2 0,8 2,6 2,10 4,5 4,6 8,10 5,7 5,13 6,7 7,15 List 2 ABCD 00-0 -000 0-10 -010 01001-0 -10-0 01-1 -101 011-111 Flags PI2 PI3 PI4 PI5 9 9 PI6 PI7 PI8 9 PI9 Minterm 4,5,6,7 01- List 3 ABCD Flags PI1

PI13

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

17

SYSTEMS WITH MULTIPLE OUTPUTS


F 9 0 **PI1 **PI2 PI3 PI4 PI5 PI6 PI7 PI8 PI9 PI10 PI11 PI12 PI13 X
Dr. Tri Caohuu 2006 Andy Davis Lecture 2

F 9 7 10 9 2 9 4 X 9 5 X X 9 2

9 2

X X X X X

X X X X X

X
18

EE 270 Simplification of Boolean Expressions

SYSTEMS WITH MULTIPLE OUTPUTS

F = PI2 + PI5 + PI13 F = PI1 + PI5 F = PI2 + PI3 + PI13 *PI3 PI7 PI9 PI11 *PI13

F 9 7 9 7

F 9 8 X X

X X X X

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

19

PETRICKS ALGORITHM
Use an algebraic approach to generate all possible covers of a function
z

z z

Write a POS expression representing all possible covers, C Convert C into SOP form Select the product that represents a minimum cost
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 20

EE 270 Simplification of Boolean Expressions

10

PETRICKS ALGORITHM
C = (PI1 + PI6)(PI1 + PI2)(PI2 + PI3)(PI3+ PI4)(PI4 + PI5)(PI5 + PI6) = PI1 PI3 PI5 + PI2 PI3 PI5 PI6 + PI1 PI2 PI4 PI5 + PI2 PI4 PI6 + PI2PI3 PI5 PI6 PI1 PI3 PI5 is a minimum solution
9 9

1 * PI 1 PI 2 PI 3 PI 4 PI 5 PI 6
EE 270 Simplification of Boolean Expressions

3 X

X X X

X X X X X X
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 21

HAZARDSStatic and Dynamic


z

A Static Hazard exists in a combinational circuit realizing a Boolean function if the function assumes momentarily a wrong value during a single change in its variables A Dynamic Hazard exists in combinational circuit realizing a Boolean function, whose value must change from 0/1 to 1/0 due to a change in one of its variables, does not change in a single step
Dr. Tri Caohuu 2006 Andy Davis Lecture 2 22

EE 270 Simplification of Boolean Expressions

11

HAZARDSStatic and Dynamic

X1 = X3 = 1 => D = 1, regardless of X2 in steady state X2 = ; X2 =

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

23

HAZARDSStatic and Dynamic

X1 X2,X3 00 01

D = X1 X2 + X2 X3 0 1

1 1 1 1

11 10
EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

24

12

HAZARDSStatic and Dynamic


z

Theorem: Static 1 hazard exists in the realization of a Boolean function in the form of a sum of cubes if there exists two disjoint and adjacent cubes Theorem: Static 1 hazard can be eliminated in a Boolean function expressed as a sum of cubes by providing the bridging cube for each pair of disjoint and adjacent cubes

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

25

Example of Static 0 Hazard


z

F = (0,2,6,7) using OR-AND network =>static 0 hazard

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

26

13

Example of Static 0 Hazard


X1 X2,X3 00 01 0 1 F = (X1 + X2) (X1 + X3) (X2 + X3) To eliminate static 0 hazard AND OR circuit => Static 1 Hazard OR - AND circuit => Static 0 Hazard

1 0 0 1

0 0 1 1

11 10

EE 270 Simplification of Boolean Expressions

Dr. Tri Caohuu 2006 Andy Davis

Lecture 2

27

14

You might also like