Вы находитесь на странице: 1из 83

Chapter 3 Simplification of Switching Functions

Simplification Goals
Goal -- minimize the cost of realizing a switching function Cost measures and other considerations
Number of gates Number of levels Gate fan in and/or fan out Interconnection complexity Preventing hazards

Two-level realizations
Minimize the number of gates (terms in switching function) Minimize the fan in (literals in switching function)

Example 3.1
Determine the form and the number of terms and literals in each of the following. g(A,B,C) = AB + A B + AC Two-level form, three products , two sums, six literals.
--------------------

f(X,Y,Z) = X Y(Z + Y X) + Y Z

Four-level form, four products, two sums, seven literals.

Minimization Methods
Commonly used techniques
Boolean algebra postulates and theorems Karnaugh maps Quine-McCluskey method Petricks method Generalized concensus algorithm

Characteristics
Heuristics (suboptimal) Algorithms (optimal)

Minimum SOP and POS Representations


The minimum sum of products (MSOP) of a function, f, is a SOP representation of f that contains the fewest number of product terms and fewest number of literals of any SOP representation of f. Example -- f(a,b,c,d) = m(3,7,11,12,13,14,15) = ab + acd + acd = ab + cd
The minimum product of sums (MPOS) of a function, f, is a POS representation of f that contains the fewest number of sum terms and the fewest number of literals of any POS representation of f. Example -- f(a,b,c,d) = M(0,1,2,4,5,6,8,9,10) = (a + c)(a + d)(a + b + d)(b + c + d) = (a +c)(a + d)(b + c)(b + d)

Karnaugh Maps
Karnaugh maps (K-maps) -- convenient tool for representing switching functions of up to six variables. K-maps form the basis of useful heuristics for finding MSOP and MPOS representations. An n-variable K-map has 2n cells with each cell corresponding to a row of an n-variable truth table. K-map cells are labeled with the corresponding truth-table row. K-map cells are arranged such that adjacent cells correspond to truth rows that differ in only one bit position (logical adjacency). Switching functions are mapped (or plotted) by placing the functions value (0,1,d) in each cell of the map.

Figure 3.1 Venn diagram and equivalent K-map for two variables
A
m

A B
0

AB AB AB AB

B
m
2

m
3

m
1

(a) A
m
0

(b) A B
m
2

(c) A 0
0 2

0
1 3 1 3

m
3

B (e) A B
0

1 (f)

(d)

0
2

AB 00 01 10 11

f(AB)

0
1 3

1 (g)

Figure 3.2 Venn diagram and equivalent K-map

for three variables


A A B ABC ABC ABC ABC
m4 m6 m5 m0 m1 m2 m7 m3

ABC ABC C (a) ABC ABC C (b)

C (c)

A
0 m0 m2 m6 m4 1 3 7 2 6

A
4

AB C
0

00
2

01
6

11
4

10

0
5 1 3 7 5

m1

m3

m7

m5

C B (e)

B (d)

(f)

Figure 3.3 (a) -- (d) K-maps for four and five variables
AB CD
0

A 00
4

01
12

11
8

10
0 4 12 8

00
1 5 13 9 1 5 13 9

01
3 7 15 11 3 7 15 11

11
2 6 14 10

14

10

10 B (b) A ABC DE
0

(a) B 000
4

B
16 20 28 24

001

011
12 8

010

100
16

101
20

111
28

110
24 0 4 12 8

00
1 5 13 9 17 21 29 25 1 5 13 9 17 21 29 25

01
3 7 15 11 19 23 27 3 7 15 11 19 23 31 27

11
2 6 14 10 18 22 30 26

14

10

18

22

30

26

10 (c) C (d) C

Figure 3.3 (e) -- (f) K-maps for six variables


B BCD AEF
0

C 000
4

C
16 20 28 24

001

011
12 8

010

100
16

101
20

111
28

110
24 0 4 12 8

000
1 5 13 9 17 21 29 25 1 5 13 9 17 21 29 25

001
3 7 15 11 19 23 31 27 3 7 15 11 19 23 31 27

011
2 6 14 10 18 22 30 26

14

10

18

22

30

26

010
32 36 44 40 48 52 60 56 32 36 44 40 48 52 60 56

100
33 37 45 41 49 53 61 57 33 37 45 41 49 53 61 57

101
35 39 47 43 51 55 63 59

A E

35

39

47

43

51

55

63

59

111
34 38 46 42 50 54 62 58 34 38 46 42 50 54 62 58

110 D (e) (f) D

Plotting (Mapping) Functions in Canonical Form on a K-map


Let f be a switching function of n variables where n 6. Assume that the cells of the K-map are numbered from 0 to 2n where the numbers correspond to the rows of the truth table of f. If mi is a minterm of f, then place a 1 in cell i of the K-map. Example -- f(A,B,C) = m(0,3,5) If Mi is a maxterm of f, then place a 0 in cell i. Example -- f(A,B,C) = M(1,2,4,6,7) If di is a dont care of f, then place a d in cell i.

Figure 3.4 Plotting functions on K-maps


f(A,B,C) = m(0,3,5) = M(1,2,4,6,7)
A AB C
0

A 00
2

01
6

11
4

10 0
5

0
1

1
3

0
7

0 0 B

C B (a) AB C
0

C 1

(b) A AB 10
4

A 00
0 2

00
2

01
6

11

C 0

01
6

11
4

10 0
5

0
1

1
3 7 5

0
1 3 7

0 0 B

C 1

1 B (c)

C 1

(d)

Figure 3.5 K-maps for f(a,b,Q,G) in Example 3.4


(a) Minterm form. (b) Maxterm form.

f(a,b,Q,G) = m(0,3,5,7,10,11,12,13,14,15) = M(1,2,4,6,8,9)


Q ab G
0

a 00
4

01
12

11
8

10

Q ab G
0

a 00
4

01
12

11
8

10 0

00
1

1
5 13

1
9

00
1 5

0
13 9

01
3 7

1
15

1
11

01 G 1
10 3

0
7 15 11

0 G

11 Q 10
2

1
6

1
14

1 1

11 Q
2 6 14 10

10

b (a)

b (b)

Figure 3.6 K-map of Figure 3.5(a) with variables reordered: f(Q,G,b,a).


f(Q,G,b,a) = m(0,12,6,14,9,13,3,7,11,15) = m(0,3,6,7,9,11,12,13,14,15)
Q G ba
0

Q 00
4

01
12

11
8

10

00
1

1
5 13

1
9

01
3 7 15

1
11

1 a 1
10

11 b 10
2

1
6

1
14

1 1

Plotting Functions in Algebraic Form


Example 3.6 -- f(A,B,C) = AB + BC

Example 3.7 -- f(A,B,C,D) = (A + C)(B + C)(B + C + D)

Example 3.8 -- f(A,B,C,D)= (A+B)(A+C+D)(B+C+D)

Figure 3.7 -- Example 3.6.


(a) Venn diagram form. (b) Sum of minterms. (c) Maxterms.

f(A,B,C) = AB + BC
Universal set A BC

B (a) BC 00
0 2

AB

AB C 0
1 3

A 11
6 4

AB 10 C
0

A 00
2

01 1
7

01
6

11
4

10 0

1
5

0
1

0
3 7 5

C 1 B (b)

1 AB

C 1

B (c)

(a) Maxterms, (b) Minterms, (c) Minterms of f .

Figure 3.8 -- Example 3.7.

f(A,B,C,D) = (A + C)(B + C)(B + C + D)


AB CD
0

(A + C) 00
4

A 11
12 8

(B + C) 10 0 CD

AB 00
0 4

A 01
12

01 0
5 13

11
8

10

00
1

0 0
3 7

00
1 5 13

1
9

01 11 C 10
2

0
15 11

0 D

01
3 7 15

1
11

D 1

11
6 14 10

1
2 6

1
14

1
10

C 10

(B + C + D)

B (a) AC 00
0 4

B (b) A BC 11
12 8

AB CD 00
1

01 1
5 13

10 1
9

1 1
3 7

01 11 C 10
2

1
15 11

1 D

14

10

1 BCD

B (c)

Figure 3.9 -- Example 3.8.


(a) K-map of f, (b) K-map of f.

f(A,B,C,D)= (A+B)(A+C+D)(B+C+D)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10 1

00
1 5 13

1
9

00
1

1
5

1
13 9

01
3 7 15

1
11

1 D

01
3

1
7

1
15 11

D 1

11 C 10
2 6

1
14

1
10

11 C 10
2

1
6 14 10

B (a)

B (b)

Simplification of Switching Functions Using K-maps


K-map cells that are physically adjacent are also logically adjacent. Also, cells on an edge of a K-map are logically adjacent to cells on the opposite edge of the map. If two logically adjacent cells both contain logical 1s, the two cells can be combined to eliminate the variable that has value 1 in one cells label and value 0 in the other. This is equivalent to the algebraic operation, aP + aP =P where P is a product term not containing a or a. Example -- f(A,B,C,D) = m(1,2,4,6,9)

Figure 3.10 K-map for Example 3.9 f(A,B,C,D) = m(1,2,4,6,9)


Step 2 AB CD
0

A 00
4

01
12

11
8

10 Step 1

00
1 5

1
13 9

01
3

1
7 15 11

1 D

11 C 10
2 6 14 10

Step 3

Simplification Guidelines for K-maps


Each cell of an n-variable K-map has n logically adjacent cells. Cells may be combined in groups of 2,4,8,,2k. A group of cells can be combined only if all cells in the group have the same value for some set of variables. Always combine as many cells in a group as possible. This will result in the fewest number of literals in the term that represents the group. Make as few groupings as possible to cover all minterms. This will result in the fewest product terms. Always begin with the loneliest cells.

Prime Implicants and Covers


An implicant is a product term that can cover minterms of a function. A prime implicant is a product term that is not covered by another implicant of the function. An essential prime implicant is a prime implicant that covers at least one minterm that is not covered by any other prime implicant. A set of implicants is said to be a cover of a function if each minterm of the function is covered by at least one implicant in the set. A minimal cover is a cover that contains the smallest number of prime implicants and the smallest number of literals..

Figure 3.11 K-map illustrating implicants


AB C
0

A 00
2

01
6

11
4

10

0
1 3

1
7

1
5

1 B

Minterms: {AB C, A BC, A BC, ABC, ABC} Groups of two minterms: {A B, AB, A C, BC, BC} Groups of four minterms: {B} Prime implicants: {A C, B} Cover = {A C, B} MSOP = A C + B

Algorithm 3.1 -- Generating and Selecting Prime Implicants


1. Count the number of adjacencies for each minterm on the K-map.
2. Select an uncovered minterm with the fewest number of adjacencies. Make an arbitrary choice if more than one choice is possible. 3. Generate a prime implicant for this minterm and put it in the cover. If this minterm is covered by more than one prime implicant, select the one that covers the most uncovered minterms.

4. Repeat steps 2 and 3 until all minterms have been covered.

Figure 3.12 -- Example 3.10


(Illustrating Algorithm 3.1)

f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10 1

00
1 5

1
13 9

1 1
15 11

00
1 5

1
13 9

01
3 7

1 1
2 6

01 D 11
10 3 7

1
15

1
11

11 C 10

1
14

1 C 1

1
2 6

1
14

1
10

10

B (a) AB CD
0

B (b) A AB 10
8

A 00
0 4

00
4

01
12

11

CD 00
1

01
12

11
8

10 1

00
1 5

1
13 9

1 1
15 11

1
5 13 9

01
3 7

1 1
2 6

01 D 11
10 3 7

1
15

1
11

11 C 10

1
14

1 C 1

1
2 6

1
14

1
10

10

B (c)

B (d)

Algorithm 3.2 -- Generating and Selecting Prime Implicants (Revisited)


1. Circle all prime implicants on the K-map.
2. Identify and select all essential prime implicants for the cover. 3. Select a minimum subset of the remaining prime implicants to complete the cover, that is, to cover those minterms not covered by the essential prime implicants.

Figure 3.13 -- Example 3.11


(Illustrates Algorithm 3.2)

f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
A 00
0 4

AB CD 00
1 5

AB 10 CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

01
12

11
8

10 1

1
13 9

1 1
15 11

00
1 5

1
13 9

1 1
15 11

00
1 5

1
13 9

01
3 7

1 1
2 6

01 D 11
10 3 7

1 1
2 6

01 D 11
10 3 7

1
15

1
11

11 C 10

1
14

1 C 1

1
14

1 C 1

1
2 6

1
14

1
10

10

10

B (a)

B (b)

B (c)

Figure 3.14 -- Example 3.12


f(A,B,C,D) = m(0,5,7,8,10,12,14,15)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10 1
9

00
1

1
5 13

1
9

00
1

1
5 13

1 1

01
3 7

1
15 11

01 D 11
10 3 7

15

11

11 C 10
2 6

1
14

1 C 1 1

1
2 6 14

1
10

10

B (a) AB CD
0

B (b) A AB 10
8

A 00
0 4

00
4

01
12

11 1

CD 00
1

01
12

11
8

10 1
9

00
1

1
5 13

1
9

1
5 13

1 1

01
3 7

1
15 11

01 D 11
10 3 7

15

11

11 C 10
2 6

1
14

1 C 1 1

1
2 6 14

1
10

10

B (c)

B (d)

Figure 3.15 -- Example 3.13


f(A,B,C,D) = m(1,2,3,6) = AC + BC
A 00
0 2

AB C 0
1 3

01
6

11
4

10

1
7

1
5

1 B

Figure 3.16 -- Example 3.14


f(A,B,C,D) = BD + BC + BCD
AB CD
0

A 00
4

01
12

11
8

10 1

00
1

1
5 13 9

01
3

1
7 15 11

1 D 1 1
14 10

11 C 10
2 6

1 B

Figure 3.17 -- Example 3.15 Function with no essential prime implicants.


f(A,B,C,D) = m(0,4,5,7,8,10,14,15)
A AB CD
0

AB 10 CD
0

A 00
4

AB 10 CD 00
1

A 00
0 4

00
4

01
12

11
8

01
12

11
8

01
12

11
8

10 1

00
1

1
5

1
13 9

00
1

1
5

1
13 9

1
5

1
13 9

01
3 7

1
15 11

01 D 11
10 3 7

1
15 11

01 D 11
10 3 7

1
15 11

11 C 10
2 6

1
14

1 C 1 1

1
2 6 14

1 C 1 1

1
2 6 14

1
10

10

10

B (a)

B (b)

B (c)

Figure 3.18 -- Example 3.16


Minimizing a five-variable function. f(A,B,C,D,E) = m(0,2,4,7,10,12,13,18,23,26,28,29)
A ABC DE
0

B 000
4

B 010 100
16

001 1
5

011
12 8

101
20

111
28

110
24

00
1

1
13 9 17 21 29

1
25

01
3 7 15

1
11 19 23 31

1
27

11 D 10
2 6

1
14 10 18 22

1
30 26

C (a)

C (b)

Prime Implicates and Covers


A implicate is a sum term that can cover maxterms of a function. A prime implicate is a sum term that is not covered by another implicate of the function. An essential prime implicate is a prime implicate that covers at least one maxterm that is not covered by any other prime implicate. A set of implicate is said to be a cover of a function if each maxterm of the function is covered by at least one implicate in the set. A minimal cover is a cover that contains the smallest number of prime implicate and the smallest number of literals..

Algorithm 3.3 -- Generating and Selecting Prime Implicates


1. Count the number of adjacencies for each maxterm on the K-map.
2. Select an uncovered maxterm with the fewest number of adjacencies. Make an arbitrary choice if more than one choice is possible. 3. Generate a prime implicate for this maxterm and put it in the cover. If this maxterm is covered by more than one prime implicate, select the one that covers the most uncovered maxterms. 4. Repeat steps 2 and 3 until all maxterms have been covered.

Algorithm 3.4 -- Generating and Selecting Prime Implicates (Revisited)


1. Circle all prime implicates on the K-map.
2. Identify and select all essential prime implicates for the cover. 3. Select a minimum subset of the remaining prime implicates to complete the cover, that is, to cover those maxterms not covered by the essential prime implicates.

Example 3.17 -- Find the minimum POS form of the function f(A,B,C,D) = M(0,1,2,3,6,9,14)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10

00
1

0
5 13 9

00
1

0
5 13 9

01
3

0
7 15 11

0 D

01
3

0
7 15 11

0 D

11 C 10
2

0
6 14 10

11 C 10
2

0
6 14 10

B (a)

B (b)

Figure 3.19 K-maps for Example 3.17.

Algorithm 3.5 -- Finding MPOS of f from f


1. Plot the complement function f on the K-map.
2. Use algorithm 3.1 or 3.2 to produce a MSOP of f. 3. Complement f and use DeMorgans theorem to produce a MSOP of f.

Example 3.18 -- Find the MPOS of the following function using Algorithm 3.5 f(A,B,C,D) = M(0,1,2,3,6,9,14)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10

00
1

1
5 13 9

00
1

1
5 13 9

01
3

1
7 15 11

1 D

01
3

1
7 15 11

1 D

11 C 10
2

1
6 14 10

11 C 10
2

1
6 14 10

B (a)

Figure 3.20 K-map of f

B (b)

f = A B + B C D + BCD f = (A + B)(B + C + D )(B + C + D)

Example 3.19 -- Minimum covers of f(A,B,C,D) = M (3,4,6,8,9,11,12,14) and its complement.


AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10 1
9

00
1 5

0
13

0
9

0 0

00
1 5

1
13

01
3 7 15 11

01 D
3 7 15 11

1 D 1
6 14 10

11 C 10
2

0
6 14 10

0 C 0 0

11
2

1 1 1

10

B (a)

B (b)

Figure 3.21

Figure 3.22 Finding a minimal POS expression for a 5-variable function.


A ABC DE
0

B 000
4

B 010 100
16

001 0
5

011
12 8

101
20

111
28

110
24

00
1

0
13 9 17 21

0
29 25

01
3 7 15 11 19 23 31 27

11 D 10
2 6 14

0
10

0
18 22 30

0
26

Figure 3.23 Deriving POS and SOP forms of a function.

AB CD
0

A 00
4

AB 10 CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

01
12

11
8

10 1

00
1

0
5 13

0
9

00
1

1
5 13

1
9

00
1 5

1
13 9

01
3 7 15

0
11

0 D 0
10

01
3 7 15

1
11

1 D 1
10

01
3

1
7

1
15 11

11 C 10
2

0
6 14

11 C 10
2

1
6 14

11 C 10
2 6

1
14 10

B (a)

B (b)

B (c)

Example 3.22 -- Minimizing a Function with Dont Cares. f(A,B,C,D) = m(1,3,4,7,11) + d(5,12,13,14,15) = M(0,2,6,8,9,10) D(5,12,13,14,15)
AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10 0
9

00
1 5

1
13

d
9

00
1

0
5 13

d d d
15 11

01
3

1
7

d
15

d
11

01 D 1
10 3 7

0 D

11 C 10
2

1
6

1
14

d d

11 C 10
2 6 14

d
10

B (a)

SOP

B (b)

POS

Figure 3.24 K-maps for Example 3.22.

Example 3.23 -- Design a circuit to distinguish BCD digits 5 from those 5.


ABCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Minterm 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (b) f(A, B, C, D) 0 0 0 0 0 1 1 1 1 1 d d d d d d

A B C D

Logic circuit (a)

Figure 3.25 -- block diagram and truth table.

Example 3.23 (concluded)


AB CD
0

A 00
4

AB 10 CD
0

A 00
4

01
12

11
8

01
12

11
8

10

00
1 5 13

d
9

1 1
11

00
1

0
5

0
13

d
9

01
3 7

1
15

d d
14 10

01 D
3

0
7 15

d
11

D d

11 C 10
2 6

1 1

d C d

11
2

0
6 14

d
10

10

MSOP MPOS Figure 3.26 Use of dont cares for SOP and POS forms.

B (a)

B (b)

f(A,B,C,D) = A + BD + BC; f(A,B,C,D) = (A + B)(A + C + D)

Timing Hazards in Combinational Logic Circuits


Hazards are undesirable changes in the output of a combinational logic circuit caused by unequal gate propagation delays. Static hazard (glitch) -- the output momentarily changes from the correct or static state
Static 1 hazard -- the output changes from 1 to 0 and back to 1 Static 0 hazard -- the output changes from 0 to 1 and back to 0

Dynamic hazard (bounce) -- the output changes multiple times during a change of state
Dynamic 0 to 1 hazard -- the output changes from 0 to 1 to 0 to 1 Dynamic 1 to 0 hazard -- the output changes from 1 to 0 to 1 to 0

Figure 3.27 (a)--(b) Illustration of a static hazard.

x1 x2

G1

y1 G3 z(x1, x2, x3)

x1 x2 I1 x3 x1

G1

y1 G3 z(x1, x2, x3)

x1 x3

G2

y2 (a)

G2 (b)

y2

Figure 3.27 (c) Illustration of a static hazard (cont)

x1 x2 x3 y1 y2 z Time t1

Dt
t2

Dt
t3 t4 (c) t5

Dt
t6

Figure 3.27 (d) Illustration of a static hazard (cont).

x1 x2 x3 y1 y2 z Time t1 Dt2 t2 Dt3 t3 t4 (d) t5 Dt2 t6 Dt3 Dt1 Dt3 t7 t8 t9

Figure 3.28 Identifying hazards on a K-map.

x1 z 1 x3 1 1 x2 (a) 1 x3 1 1 x2 (b) z 1 1

x1

Figure 3.29 Hazard-free network.

x1 x2 x1 x3 x2 x3

G1 z(x1, x2, x3)

G2

G3

G4

Figure 3.30 (a)--(b) Example of a static-0 hazard.


A 0 G1 z(A, B, C, D) G2 G4 0 G3 (a) B (b) C 0 0 0 0 0 0 D 0

A C A D A B C

Figure 3.30 (c)--(d) Example of a static-0 hazard (cont).


A A C A D A B C B C D G1 0 G2 z(A, B, C, D) G4 G3 C 0 G5 (c) B (d) 0 0 0 0 0 0 0 D

Figure 3.31 Dynamic hazards.

(a)

(b)

Quine-McCluskey Minimization Method


Advantages over K-maps
Can be computerized Can handle functions of more than six variables

Overview of the method


Given the minterms of a function Find all prime implicants (steps 1 and 2)
Partition minterms into groups according to the number of 1s Exhaustively search for prime implicants

Find a minimum prime implicant cover (steps 3 and 4)


Construct a prime implicant chart Select the minimum number of prime implicants

Example 3.24 -- Use the Q-M method to find the MSOP of the function

f(A,B,C,D) = m(2,4,6,8,9,10,12,13,15)
AB CD
0

A 00
4

01
12

11
8

10 1
9

00
1 5

1
13

1 1

01
3 7 15

1
11

11 C 10
2 6 14

1
10

Figure 3.32 K-map for example 3.30.

Step 1 -- List Prime Implicants in Groups (Example 3.24)

Step 2 -- Generate Prime Implicants (Example 3.24)

Step 3 -- Prime Implicant Chart (Example 3.24)


2 * * PI1 PI2 PI3 PI4 PI5 PI6 * * PI7 4 6 8 9

10 12 13 15

Step 4 -- Reduced Prime Implicant Chart (Example 3.24)


2 PI2 *PI3 *PI4 PI5 PI6 4 6 10

The Resulting Minimal Realization of f

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

= 1-0- + -010 + 01-0 + 11-1


= AC + B CD + A BD + ABD

How the Q-M Results Look on a K-map


AB CD
0

A 00
4

01
12

11
8

10 1
9

00
1 5

1
13

1 1

01
3 7 15

1
11

11 C 10
2 6 14

1
10

Figure 3.33 Grouping of terms.

Covering Procedure
Step 1 -- Identify any minterms covered by only one PI. Select these PIs for the cover. Step 2 -- Remove rows covered by the PIs identified in step 1. Remove minterms covered by the removed rows. Step 3 -- If a cyclic chart results from step 2, go to step 5. Otherwise, apply the reduction procedure of steps 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 or noncyclic chart chart is produced. In the latter case, return to step 1.

Coverage Example f(A,B,C,D) = m(0,1,5,6,7,8,9,10,11,13,14,15)


0 * * PI1 PI2 PI3 PI4 PI5 PI6 * * PI7 1 5 6 7 8 9

10 11 13 14 15

Reduced PI Charts

5 PI2 PI3 PI4 PI5 PI6

10 11 13
* PI2 *PI4 5 10

Cyclic PI Charts
1. No essential PIs. 2. No row or column coverage.
1 *PI1 PI2 PI3 PI4 PI5 PI6 2 3 4 5 6

2 PI2 PI3 PI4 PI5 PI6

6
*PI3

PI4 *PI5

Using the Q-M Procedure with Incompletely Specified Functions


1. Use minterms and dont cares when generating prime implicants 2. Use only minterms when finding a minimal cover

Example 3.25 -- Find a minimal sum of products of the following function using the Quine-McCluskey procedure.

Minimizing Table for Example 3.25

PI Chart for Example 3.25


2 PI1 PI2 PI3 * * PI4 * * PI5 * * PI6 * * PI7 3 7

10 12 15 27

Results of Minimization for Example 3.25


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

= PI2 + PI4 + PI5 + PI6 + PI7

Minimizing Circuits with Multiple Outputs

Minimizing Table for Example 3.26

Prime Implicant Chart for Example 3.26


fa fb fg

0 * * PI1 b * * PI2 a g PI3 g PI4 b * * PI5 a b PI6 b PI7 b g PI8 g PI9 a PI10 a b g PI11 b g PI12 a PI13 a b g

2 7

10

2 7 8

Reduced Prime Implicant Chart for Example 3.26

fa

fg

7 * PI3 g PI7 b g PI9 a PI11 b g * PI13 a b g

Minimum Realizations for Example 3.26

Figure 3.34 Reduced multiple-output circuit.


A A B B C C D D

PI1

PI2

fa fb fg

PI3

PI5

PI13

Petricks Algorithm for Selecting a Minimal Cover (Algorithm 3.6)


1. Find all prime implicants of the function to be minimized.
2. Construct a prime implicant table and identify and remove all essential prime implicants and their corresponding rows and columns. 3. Write a POS function that contains a product term for each minterm left in the reduced prime implicant chart that includes a variable for each prime implicant that covers the minterm. 4. Convert the function to SOP form. 5. Select a minimal cover by finding a product term representing the fewest prime implicants and literals.

Example 3.27 -- Example of Petricks Algorithm

2
PI2 *PI3 *PI4 PI5 PI6

10

The Cover Function for Example 3.27


C = (PI2 + PI3)(PI4 + PI5)(PI2 + PI4)(PI3 + PI6)
= PI2PI3 PI5 + PI3PI4 + PI2 PI4PI6 + PI2 PI5PI6

Minimal cover = {PI1*, PI7*, PI3, PI4}

Figure 3.35
Switching function

Create cube representation

Determine prime implicant set PI

Determine essential prime implicants. Move from PI to EPI.

Select best term from PI and put into EPI

All cells covered by EPI ? No

Yes

Minimum SOP expression (sum of elements of EPI)

Figure 3.36
100 000 010 110 000 100 010 110

101

111

101

111

001 (x1, x2, x3) (a)

011

001 (a, b, c) (b)

011

Figure 3.37
A 1 1 1 1 C 1 D 1 C 1 1 1 1 1 1 D A

B (a)

B (b)

Figure 3.38
Inputs: EPI, PI, DC
Compute uncovered minterms UC

Minimum SOP expression (sum of elements of EPI)

Yes

UC = F ? No

Move lowest-cost prime implicant from PI to EPI No New EPI found ? Yes

Remove redundant prime implicants from PI

Remove undesirable terms from PI

Look for new essential prime implicants in PI. Move to EPI.

Figure P3.1

A BCD inputs B C D

Logic circuit

f(A, B, C, D)

Вам также может понравиться