• Aucun résultat trouvé

KARNAUGH MAP FUNCTION MINIMIZATION

Dans le document Digital Engineering (Page 173-178)

Logic Function Representation and Minimization

MAXTERM CODE Complemented variable:

4.4 KARNAUGH MAP FUNCTION MINIMIZATION

(4.22)

Use of the K-map offers a simple and reliable method of minimizing (or at least greatly reducing) logic expressions. In fact. this is the most important application of K-maps. In

All that

IS ABC

4.4 KARNAUGH MAP FUNCTION MINIMIZATION 145

Section 4.3, simple examples serve to demonstrate how K-maps can be used to extract both canonical and minimum SOP and

pas

forms depending on whether 1 's or O's are read.

Now it is necessary to present certain important information that was not explicitly stated earlier, but was implied.

It should be clear from Section 4.3 that each line or edge of a K-map forms the boundary between two complementary domains. As a result, minterms or maxterms that are separated by a line or edge are logically adjacent and can be combined to form a reduced function.

The following rule generalizes this point:

Reduction Rule

Each variable domain boundary crossed in an adjacent group (looping) requires the absence of that variable in the reduced term.

Thus, a pair of logically adjacent minterms or max terms crosses one domain boundary and eliminates the domain variable in the reduced term; a grouping offour logically adjacencies crosses two domain boundaries and eliminates the two domain variables in the reduced function. In this way 2" logic adjacencies (n

=

1,2,3, ... ) can be extracted (looped out) to produce a reduced (N - n)-variable term of an N -variable function.

To help ensure a minimized result from K-map extraction, thereby avoiding possible costly redundancies, the following loop-out protocol is recommended but not required:

Loop-out Protocol

Loop out the largest 2" group of logically adjacent minterms or maxterms in the order of increasing n

=

0, 1, 2, 3, ....

When following this protocol, single isolated minterms or maxterms (monads), if present, should be looped out first. This should be followed by looping out groups of any two logicall y adjacent minterms or maxterms (dyads or duads) that cannot be looped out in any other way. The process continues with groups of four logic adjacencies (quads), then groups of eight (octads), etc. - always in groups of 2" logic adjacencies.

As an example of the pitfalls that can result from failure to follow the loop-out protocol, consider the function represented in the K-map of Fig. 4.14. Instinctively, one may be tempted to loop out the quad (dashed loop) because it is so conspicuous. However, to do so creates a redundancy, since all minterms of that grouping are covered by the four dyads shown by the shaded loops.

Since K-maps are minterm-code based, minimum

pas

cover can be extracted directly, avoiding the "NOT" step indicated in Figs. 4.8,4.10,4.11, and 4.13, by using the following procedure:

Simplified POS Extraction Procedure

Take the union (ORing) of the complemented domains in which the 2" groups of logically adjacent maxterms exist.

Groups of minterms or maxterms other than 2" groups (e.g., groups of three, five, six, and seven) are forbidden since such groups are not continuously adjacent. Examples of such

146 CHAPTER 4 / lOGIC FUNCTION REPRESENTATION AND MINIMIZATION

CD

A B 00 01 II 10 00

liLJ

~I

01 I

--"

' - '

10

In

/ /

fiGURE 4.14

Minimum cover (shaded) by using the loop-olll protocol avoids thl;: redundant quad (dashed lvop).

forbidden groups arc presented in Fig. 4.15. which has been "crossed out" to indicate that such groupings are 110t allowed.

4.4.1 bamples of Function Minimization

Just as canonical fonm can be read from a K-map in two ways (SOP and POS). so also can a function be read from a K-map in either minimum SOP fonn or minimum POS form. To

illustrate, consider the function

G(A, X, Y) = Lm(O, 3, 5, 7). (4.23) which is mapped and minimized in Fig. 4.16. Noting that the I's arc looped oul as two dyads and a monad as are the O's, there results

Gsop=AXY+XY+AY (minimum SOP cover)

, ,

V) ,0

, >

16 v, , , , , ,

( , , , , ,

b rL , , ,

fiGURE 4.15

Examples of forbidden (11On-2") groupings of mintenns and maxtenns.

4.4 KARNAUGH MAP FUNCTION MINIMIZATION 147

AXY X Y

(A+X+Y)

XY X X

A 00

01 11

XY

" A 00

01 11 10

0 0 1 0 0 0

0

,

3

{

0

1

,

1 7 0

, {

7 0

G"",

AY Y

(A+Y)

Y

(al (bl

FIGURE 4.16

K.maps fOf Eq. (4.23). (3) Minimum SOP cover. (b) Minimum POS co\·er.

CPQS = (A

+

X

+ h(X +

Y)(A

+

Y) (minimum POS covcr).

Application of the laws of Boolean algebra shows that the SOP and POS minima are aJge·

braicallyequal:

(A

+X + Y)(X + y)(A +

n=(A

+ X + Y)(AX +XY +A Y +

y)

=(A

+

X

+ hUlx +

y)

=AXY+XY+AY.

A!o> a second example. consider the reduced function given in POS form:

YCA .

B, C, D) = (A

+B+D)(B+

(')(A

+

C+D)(..1

+ B+

C

+ 0 ).

(4.24)

To map this function. one simply maps the O's in maxlenn code. as indicated in Fig. 4.17a.

The representation in Fig. 4.173 is not minimum. However. afler the maxtenns are re·

grouped. a minimum POS representation is shown in Fig. 4.17b. Notice thai the dyad M(S. 13) crosses the A boundary. pennitting (AA

+ iJ +

C

+

D) = (8

+

C

+

D) as the re·

duced Neon. Similarly. the quad M(2. 3. 6, 7) crosses the Band D boundaries to yield (1\ +BB +t

+

DD

=(A +

C). Also. the quad M(2. 3.

to.

II) crosses theA and 0 bound·

aries. eliminating these variables to give (B

+

C) as the reduced s·term.

The minimum SOP cover for the funclion )' of Eq. (4.24) is shown in Fig. 4.17c and consists of one dyad and two quads. The dyad m( 14. (5) crosses the D boundary. permitting ABC(D+

D)=ABC.

while the quad m(O. 4. 8. (2) crosses theA and B Ixlundaries. yielding (A +.4)( 8

+

iJ)CD = CD. Likewise. the quad 111(0, 1.8.9) crosses theA and D boundaries 10 give

ile

as the reduced p--Ienn. The minimized results that are extracted from Figs. 4.17b and 4.17c are now presented as

Y"os = (8

+

C

+

D)(A

+

C)(8

+

C) Minimum POS cover and

Ysop

=ABC+ CD + Be,

Minimum SOP cover

148 CHAPTER 4/ lOGIC fUNCTION REPRESENTATION AND MINIMIZATION

A8

00

,- IA,8,ol

r -::-, C,--::--,

01 I 11 10 1 A

co

C

8 00 01

I

"

10

I

co

00

, , lo or

, , , ,

00

I r _-'t\:=:j:

0 I

I~ lO~t°=[:jTf

3 2 , . -(A+e+Dl

01 1 0 0 0

• , ,

~

01 0 01 0

~~.~~t=~,~~~.

B

{'

10 1

';, " ,

0

" , " , "

• r o "

01,

v

[ , ,,[ >P, "

A'0~ ~ fO I1

B

"

(B+C)

or,

/ 1

(A+B+C+D) --./ 0

/ Y POS

- j

1

I

YpOS

(B+C+D) 0

I') 10)

~BC

C

o~_ \0 1 rl--'-,,:-'~,~o--')

Ie)

fiGURE 4.17

(a) K-map representing the cover as gh'cll by Eq. (4.24). (b) MlIlimum POS cover. (c) Minimum SOP cover.

which are shown to be algebraically equal if one carries oul the required algebraic manip-ulalions.

4.4.2 Prime Implicants

Groups of2" minlcnns or maxlenns thai cannot be combined with ()(her 2" groups in any way 10 produce terms of fewer variables arc called prime implicl1nts (Pis). TIle loop-out protocol described in lhe previous seclion offers a procedure for achieving minimum cover by systematically extracting Pis in the oroerofincreasing n(1I =0. 1.2,3 ... ). But the task of achieving minimum cover following the loop-out protocol (or any procedure for that maner) is not quite as straightforward as one might believe. Difficulties can arise when optional and redundant groupings of adjacent mintenns or maxtcnns are prescnt. To deal

(B+C)

(Me)

CD

A B

00

Dans le document Digital Engineering (Page 173-178)