Upload
yogeshvaidya13
View
75
Download
4
Tags:
Embed Size (px)
Citation preview
K-MAP
Maurice Karnaugh introduced k-map in 1953 as a next edition of Edward Veitch’s (1952) Veitch diagram
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
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
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
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
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
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
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
Write magnitudes in the right corner of the lower side of each block as shown in figure
FINAL K-MAPWrite magnitude at the centre of each block
NOTE : using magnitude is just for simplicity
Grouping
Rules of grouping -
1’s & 0’s cannot be grouped
diagonal 1’s cannot be grouped
Elements in a group should be 2n
MinimumGroupsshould beformed
For aboverule groupOverlappingis applicable
Groups maybe ofnon-completepolygon
Hierarchy is …….16,8,4,2
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
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.
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_ _ _
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)__ _
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_ _ _ _
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)
_ _ _ _ _ _ _ _____ ____ ____ ____
_ _ _ _