basics of k map

22
K-MAP Maurice Karnaugh introduced k-map in 1953 as a next edition of Edward Veitch’s (1952) Veitch diagram

Upload: yogeshvaidya13

Post on 18-Aug-2015

73 views

Category:

Education


4 download

TRANSCRIPT

Page 1: Basics of K map

K-MAP

Maurice Karnaugh introduced k-map in 1953 as a next edition of Edward Veitch’s (1952) Veitch diagram

Page 2: Basics of K map

ADVANTAGES• Reduces extensive

calc.• Reduces expression

without Boolean theorems

• Used for minimizing circuits

• Less time consuming• Less space consuming

DISADVANTAGES• Tedious for more than

5 variables• Some examples are

solved in few seconds by Boolean theorems easily

Page 3: Basics of K map

Gray code

• It is a numerical code used in computing in which consecutive integers are represented by binary numbers differing in only one digit

• E.g. Binary Gray 00 00 01 01 10 11 11 10

Page 4: Basics of K map

Rules for converting binary code into gray code

• Write first digit in left side as it is• A digit in gray code is the addition of

corresponding digit in binary and its previous digit in binary

• 0+0=0 BINARY 1 0 0 1 0 1 0• 0+1=1 GRAY 1 1 0 1 1 1 1• 1+0=1 BINARY 1 0 1 1 1 1 1 0 0 1• 1+1=0 GRAY 1 1 1 0 0 0 0 1 0 1

Page 5: Basics of K map

Rules for converting gray code into binary code

• Write first digit in left side as it is• A digit in binary code is the addition of

corresponding digit in gray and its previous digit in binary

• 0+0=0 GRAY 1 0 1 0 1 0 1 0• 0+1=1 BINARY 1 1 0 0 1 1 0 0• 1+0=1 GRAY 1 1 1 1 0 0 1 1 0 1• 1+1=0 BINARY 1 0 1 0 0 0 1 0 0 1

Page 6: Basics of K map

Consider the following truth table

Here A,B,C,D are inputs and Y is output

magnitude A B C D Y0 0 0 0 0 0

1 0 0 0 1 0

2 0 0 1 0 1

3 0 0 1 1 0

4 0 1 0 0 1

5 0 1 0 1 1

6 0 1 1 0 0

7 0 1 1 1 1

8 1 0 0 0 0

9 1 0 0 1 0

10 1 0 1 0 1

11 1 0 1 1 1

12 1 1 0 0 0

13 1 1 0 1 0

14 1 1 1 0 0

15 1 1 1 1 0

Page 7: Basics of K map

Consider inputs A,B binary gray A B A B 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0Consider inputs C,D binary gray C D C D 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0

Page 8: Basics of K map

Write down inputs in k-map as shown in figureFor first block all inputs are 0 i.e. the input given is A B C DHence0 is for low input1 is for high input

Page 9: Basics of K map

Write magnitudes in the right corner of the lower side of each block as shown in figure

Page 10: Basics of K map

FINAL K-MAPWrite magnitude at the centre of each block

NOTE : using magnitude is just for simplicity

Page 11: Basics of K map

Grouping

Rules of grouping -

1’s & 0’s cannot be grouped

diagonal 1’s cannot be grouped

Page 12: Basics of K map

Elements in a group should be 2n

Page 13: Basics of K map

MinimumGroupsshould beformed

For aboverule groupOverlappingis applicable

Page 14: Basics of K map

Groups maybe ofnon-completepolygon

Hierarchy is …….16,8,4,2

Page 15: Basics of K map
Page 16: Basics of K map
Page 17: Basics of K map

Examples of k-map

1.Minimize the following equation using k-map y=ABC+ABC+ABC+ABC

_ _ _ _ _ _

ABC = 000 = 0_ _ _

ABC = 010 = 2_ _

ABC = 101 = 5_

ABC = 111 = 7

Using this fill the k-map

Grouping – here 2 groups of 2 1’sIs possible

Page 18: Basics of K map

For upper group A and C areconstants and B is varying.Neglect B.A and C both are 0.Hence output of this group is AC For upper group A and C areconstants and B is varying.Neglect B.A and C both are 0.Hence output of this group is AC

_ _

Y=AC+AC_ _

Thus output Y is given by ,

=A B⃝N.

Page 19: Basics of K map

2. Solve the given k-map

Step I -grouping

Step II -output of each group

Step III -final output

Here answer is ,

Y=CD+BC+BD_ _ _

Page 20: Basics of K map

Sop form – sum of product form

Sop form – product of sum form

Example-

Example-

ABC+ABC+ABC+ABC_ _ _ _ _

(A+B+C)(A+B+C)(A+B+C)__ _

Page 21: Basics of K map

Conversion of given equation to sop -Example-

AB+A+ABC =AB(C+C)+A(B+B)(C+C)+ABC =ABC+ABC+ABC+ABC+ABC+ABC+ABC

_ _ __ _ _ _ _

=ABC+ABC+ABC+ABC_ _ _ _

Page 22: Basics of K map

Conversion of given equation to pos -First equation should be converted to sopExample-

From previous exampleY=AB+A+ABC=ABC+ABC+ABC+ABC

_ ___

Y=ABC+ABC+ABC+ABC_ _ _ _ _ _ _ __

Y=Y=ABC+ABC+ABC+ABC_ _ _ _ _ _ _ ___ _________________

Y=(ABC)(ABC)(ABC)(ABC)

Y=(A+B+C)(A+B+C)(A+B+C)(A+B+C)

_ _ _ _ _ _ _ _____ ____ ____ ____

_ _ _ _