You are on page 1of 9

COMP212 Computer Organization and Systems

Tutorial on K-Map 1. Minimise the following problems using the Karnaugh maps method. (a) Z = f(A, ,!) = (b) Z = f(A, ,!) = " " "A " A!

" !"A

Answer. (a) Z = f(A, ,!) = " "A " A!

= A ! + A !"A ! + A !"A !"A ! (### #1# #11 11# 1#1 111)

(The se$uen%e must be &ept as ## #1 11 1# so that onl' one (ariable %hanged ea%h time) ' using the rules of simplifi%ation and ringing of ad)a%ent %ells in order to ma&e as man' (ariables redundant, the minimised result obtained is " " A!. The first re%tangle is A ! + A ! = A!( " ) = A! The se%ond re%tangle is A !"A ! + A !"A !=A "A = The third re%tangle is A !"A !=A! ********************************************** Tip+
Z = A ! + A !"A ! + A !"A !"A !

=A ! + A ! + A !"A ! + A !"A !"A !"A ! =first re%tangle " se%ond re%tangle " third re%tangle ***************************************************

(b) Z = f(A, ,!) =

"

" !"A

' using the rules of simplifi%ation and ringing of ad)a%ent in order to ma&e as man' (ariables redundant, the minimised result obtained is " A

,. -i(en the following .-input oolean e/pression


F ( A, B , C , D ) = A BC D + A BCD + ABC D + ABC D + ABCD + ABCD + AB CD + AB CD ...

0implif' it using K-map. Answer+

RULE: Minimization is achieved y dra!ing the sma""est possi "e num er o# circ"es$ each containing the "argest possi "e num er o# 1s%

-rouping the 1s together results in the following.

The e/pression for the groupings abo(e is $ = bd " a% " ab This e/pression re$uires 1 ,-input and gates and 1 1-input or gate. 2e %ould ha(e a%%ounted for all the 1s in the map as shown below, but that results in a more %omple/ e/pression re$uiring a more %omple/ gate.

The e/pression for the abo(e is d & ac & a c'd'. This re$uires , ,-input and gates, a .-input and gate, and a 1 input or gate. Thus, one of the and gates is more %omple/ (has two additional inputs) than re$uired abo(e. Two in(erters are also needed.

1. 0ometimes we do not %are whether a 1 or # o%%urs for a %ertain set of inputs. 3t ma' be that those inputs will ne(er o%%ur so it ma&es no differen%e what the output is. 4or e/ample, we might ha(e a !5 (binar' %oded de%imal) %ode whi%h %onsists of . bits to en%ode the digits # (####) through 6 (1##1). The remaining %odes (1#1# through 1111) are not used. 3f we had a truth table for the prime numbers # through 6, it would be

The d7s in the abo(e stand for 8don9t %are8, we don9t %are whether a 1 or # is the (alue for that %ombination of inputs be%ause (in this %ase) the inputs will ne(er o%%ur. 0impl' this prime number fun%tion using K-map.

Answer.

The %ir%le made entirel' of 1s %orresponds to the e/pression a'd and the %ombined 1 and d %ir%le (a%tuall' a %ombination of ar%s) is 'c. Thus, if the disallowed input 1#11 did o%%ur, the output would be 1 but if the disallowed input 11## o%%urs, its output would be #. The minimi:ed e/pression is p = a9d " b9% ;oti%e that if we had ignored the ds and onl' made a %ir%le around the , 1s, the resulting e/pression would ha(e been more %omple/, a' 'c instead of 'c. .. <ason has been wor&ing with a logi% %ir%uit. =e has a %ir%uit that wor&s but he suspe%ts that it %an be made simpler. =ere is the %ir%uit.

(a) 5etermine the truth table for the fun%tion implemented in this %ir%uit. 4ill in the truth table below. W 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 X 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 F

(b) >sing the Karnaugh Map, get the simplest sum-of-produ%ts form for this fun%tion (%) 5raw the %ir%uit diagram using A;5s, ?@s and ;?Ts. (d) 5raw the %ir%uit diagram using all ;A;5s. Answer. (a) F = (W + X + Z )g Yg (WX ) + WXYZ

= WXY (W + X + Z ) + WXYZ = WWXY + WX XY + WXYZ + WXYZ = WXY + WXYZ = WXY


0o the truth table is W 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 X 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 # # # # # # # # # # # # # # 1 1 F

(b) >sing the Karnaugh Map, get the simplest sum-of-produ%ts form for this fun%tion AZ # # 2B # # # 1 1 1 1 # # 1 1 1 1#

F = WXYZ + WXY Z = WXY


(%)5raw the %ir%uit diagram using A;5s, ?@s and ;?Ts.

F = WXY
(d)5raw the %ir%uit diagram using all ;A;5s.

F = WXY WXY

)(

C. Droblem .E of te/tboo&.

Answer

b.
Z1 = X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . Z, = X1 X , X 1 X . + X1 X , X 1 X . + X1 X , X 1 X . + X1 X , X 1 X . + X1 X , X 1 X . + X 1 X , X 1 X .

( )( )( )( ( )( X +X + X + X )(X + X d. The K-map for Z1 B1B, # # 1 1# # 1 1 B1B. # 1 1 # # 1 1 1 1 1 1 1 1 1 #


= X1 + X , + X 1 + X .
1 , 1 . 1

%.

Z1 = X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . X 1 X , X 1 X . ( X 1 X , X 1 X . )
,

)(

+ X1 + X.

)( X

)(

+ X , + X1 + X .

)( )(X

)(

+ X , + X1 + X.

)(X

+ X, + X1 + X.

)(X

+ X, + X1 + X.

)(X

+ X, + X1 + X.

)( X

+ X, + X1 + X. )

Z1 = X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X . + X 1 X , X 1 X .
1 ,

( +( X X

X 1 X . + X1X , X 1 X .

) ( ) +( X X
1

X 1 X . + X1 X , X 1 X .

) )

= X1 X , X . + X1 X , X 1 + X 1 X , X . + X1 X , X 1

You might also like