Date post: | 30-Jun-2015 |
Category: |
Engineering |
Upload: | harekrushna-patel |
View: | 507 times |
Download: | 0 times |
G H PATEL COLLEGE OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF INFORMATION TECHNOLOGY
Subject : 2131004 (Digital Electronics)
Preparad By:Harekrushna Patel (130110116035)
K-map Method
Contents
• Introduction• Two variable maps• Three variable maps• Four variable maps• Five variable maps• Six variable maps
Introduction
• The map method provides a simple straight forward procedure for minimizing Boolean functions.
• This method may be regarded either as a pictorial form of a truth table or as an extension of the Venn diagram.
• The map method, first proposed by Veitch (1) and slightly modify by Karnaugh (2), is also known as the ‘Veitch diagram’ or the ‘Karnaugh map’.
Cont.
Minterm
• Standard Product Term• For n – variable function → 2n minterm• Sum of all minterms = 1 i.e. ∑mi = 1
Cont.
Maxterm
• Standard Sum Term• For n – variable function → 2n maxterm• Product of all maxterms = 1 i.e. ∏Mj = 1
Cont.
• Forms of Boolean function:– Sum of Product(SOP) form– Product of Sum(POS) form
Cont.
• SOP Form:– AND - OR Logic or NAND - NAND Logic
Cont.
• POS Form:– OR - AND Logic or NOR - NOR Logic
Rules
• No zeros allowed.• No diagonals.• Only power of 2 number of cells in each
group.• Groups should be as large as possible.• Every 1 must be in at least one group.• Overlapping allowed.• Wrap around allowed.• Fewest number of groups possible.
Two variable K-map
• There are four minterms for two variables; hence the map consists of four squares, one for each minterm.
• The 0’s and 1’s marked for each row and each column designate the values of variables x and y, respectively.
mo m1
m2 m3
Cont.
mo m1
m2 m3
Cont.
mo m1
m2 m3
• Take two variables x and y
x y
Cont.
mo m1
m2 m3
• Relation between squares & two variables
xy
0
1
0 1
X’
X
y’ y
Cont.
x’y’
• Relation between squares & two variables
xy
0
1
0 1
X’
X
y’ y
Cont.
x’y’ x’y
• Relation between squares & two variables
xy
0
1
0 1
X’
X
y’ y
Cont.
x’y’ x’y
xy’
• Relation between squares & two variables
xy
0
1
0 1
X’
X
y’ y
Cont.
x’y’ x’y
xy’ xy
• Relation between squares & two variables
xy
0
1
0 1
X’
X
y’ y
Example
• Simplify following two Boolean functions:– F1 = xy– F2 = x+y
Cont.
mo m1
m2 m3
• F1 = xy……????
xy
0
1
0 1
X’
X
y’ y
Cont.
0 0
0 1
• F1 = xy
xy
0
1
0 1
X’
X
y’ y
Cont.
mo m1
m2 m3
• F2 = x + y……????
xy
0
1
0 1
X’
X
y’ y
Cont.
0 1
1 1
• F2 = x + y = x’y + xy’ + xy = m1 + m2 + m3
xy
0
1
0 1
X’
X
y’ y
Three variable K-map
• There eight minterms for three binary variables. Therefore, a map consists of eight squares.
m0 m1 m3 m2
m4 m5 m7 m6
Cont.
m0 m1 m3 m2
m4 m5 m7 m6
Cont.
m0 m1 m3 m2
m4 m5 m7 m6
• Take three variables x, y and z
xyz
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’
x
m0 m1 m3 m2
m4 m5 m7 m6
y’z’ y’z y z y z’
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z x’yz
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z x’yz x’yz’
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z x’yz x’yz’
xy’z’
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z x’yz x’yz’
xy’z’ xy’z
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’ x’y’z’ x’y’z x’yz x’yz’
xy’z’ xy’z xyz
y’z’ y’z y z y z’
x
Cont.
• Relation between squares & three variables
xyz
0
1
00 01 11 10
x’
y’z’ y’z y z y z’
x’y’z’ x’y’z x’yz x’yz’
xy’z’ xy’z xyz xyz’x
Example
• Simplify the Boolean function:– F = x’yz + xy’z’ + xyz + xyz’
• Ans.:– x’yz = m3
– xy’z’ = m4
– xyz = m7
– xyz’ = m6
Cont.
xyz
0
1
00 01 11 10
x’
x
m0 m1 m3 m2
m4 m5 m7 m6
y’z’ y’z y z y z’
• F = x’yz + x’yz’ + xy’z’ + xy’z
Cont.
xyz
0
1
00 01 11 10
x’
x
0 0 1 0
1 0 1 1
y’z’ y’z y z y z’
• F = x’yz + x’yz’ + xy’z’ + xy’z
Cont.
xyz
0
1
00 01 11 10
x’
x
0 0 1 0
1 0 1 1
y’z’ y’z y z y z’
• Final Ans. F = yz + xz’
Four Variable K-map
• There sixteen minterms for four binary variables. Therefore, a map consists of sixteen squares.
m0 m1 m3 m2
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
Cont.
m0 m1 m3 m2
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Take four variables A,B,C and D
Cont.
A’B’C’D’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD ABCD’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD ABCD’
AB’C’D’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD ABCD’
AB’C’D’ AB’C’D
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD ABCD’
AB’C’D’ AB’C’D AB’CD
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Cont.
A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
A’BC’D’ A’BC’D A’BCD A’BCD’
ABC’D’ ABC’D ABCD ABCD’
AB’C’D’ AB’C’D AB’CD AB’CD’
00 01 11 10C’D’ C’D C D C D’
00
01
11
10
A’B’
A’B
A B
A B’
ABCD
• Relation between squares & four variables
Example
• Simplify the Boolean function:– F(w, x, y, z) = Σ(1,5,12,13)
Cont.
m0 m1 m3 m2
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
WZ
XY
00 01 11 10
00
01
11
10
F(w, x, y, z) = Σ(1,5,12,13)
Cont.
0 1 0 0
0 1 0 0
1 1 0 0
0 0 0 0
WZ
XY
00 01 11 10
00
01
11
10
F(w, x, y, z) = Σ(1,5,12,13)
Put 1 in place ofm1, m5, m12, m13
Cont.
0 1 0 0
0 1 0 0
1 1 0 0
0 0 0 0
WZ
XY
00 01 11 10
00
01
11
10
F(w, x, y, z) = Σ(1,5,12,13)
Put 1 in place ofm1, m5, m12, m13
Making pairs
Cont.
0 1 0 0
0 1 0 0
1 1 0 0
0 0 0 0
WZ
XY
00 01 11 10
00
01
11
10
F(w, x, y, z) = Σ(1,5,12,13)
Put 1 in place ofm1, m5, m12, m13
Making pairs
Hence the simplifiedExpression isF = WY’Z + W’Y’Z
Five variable K-map
• There thirty two minterms for five binary variables. Therefore, a map consists of thirty two squares.
m16 m17 m19 m18
m20 m21 m23 m22
M28 m29 M31 m30
m24 m25 m27 m26
m0 m1 m3 m2
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
Cont.
m16 m17 m19 m18
m20 m21 m23 m22
m28 m29 m31 m30
m24 m25 m27 m26
m0 m1 m3 m2
m4 m5 m7 m6
m12 m13 m15 m14
m8 m9 m11 m10
ABCD
• Relation between squares & five variables
E
00
01
11
10
00 01 11 100 0 0 0 11 110 1 1 10 001
Cont.
• Example:– Design a circuit of 5 input variables that generates
output 1 if and only if the number of 1’s in the input is prime (i.e., 2, 3 or 5).
• Ans.:– The minterms can easily be found from Karnaugh
Map where addresses of 2,3 or 5 numbers of 1.
Cont.
Cont.
Cont.
• Hence the simplified expression becomes
BC’D’E + A’BC’D + AC’DE’ + AB’C’D + A’B’CE + A’CDE’ + A’BCD + AB’CD’ + ABD’E’ + AB’DE’ + A’B’DE + ABCDE
6 variable K-map
• A 6-variable K-Map will have 26 = 64 cells. A function F which has maximum decimal value of 63, can be defined and simplified by a 6-variable Karnaugh Map.
Cont.
Cont.
• Boolean table for 6 variables is quite big, so we have shown only values, where there is a noticeable change in values which will help us to draw the K-Map.
• A = 0 for decimal values 0 to 31 and A = 1 for 31 to 63.
• B = 0 for decimal values 0 to 15 and 32 to 47. B = 1 for decimal values 16 to 31 and 48 to 63.
Cont.
No. A B C D E F Minterm
m0 0 0 0 0 0 0 A’B’C’D’E’F’
m15 0 0 1 1 1 1 A’B’CDEF
m16 0 1 0 0 0 0 A’BC’D’E’F’
m31 0 1 1 1 1 1 A’BCDEF
m32 1 0 0 0 0 0 AB’C’D’E’F’
m47 1 0 1 1 1 1 AB’CDEF
m48 1 1 0 0 0 0 ABC’D’E’F’
m63 1 1 1 1 1 1 ABCDEF
Cont.
• Example:– F = Σ (0, 2, 4, 8, 10, 13, 15, 16, 18, 20, 23, 24, 26,
32, 34, 40, 41, 42, 45, 47, 48, 50, 56, 57, 58, 60, 61)
• Ans.:– Since, the biggest number is 61, we need to have
6 variables to define this function.
F = Σ (0, 2, 4, 8, 10, 13, 15, 16, 18, 20, 23, 24, 26, 32, 34, 40, 41, 42, 45, 47, 48, 50, 56, 57, 58, 60, 61)
Cont.
• Hence the simplified expression becomesF = D’F’ + ACE’F + B’CDF + A’C'E’F’ + ABCE’ +
A’BC’DEF
Cont.
• Example:– F = Σ (0, 1, 2, 3, 4, 5, 8, 9, 12, 13, 16, 17, 18, 19,
24, 25, 36, 37, 38, 39, 52, 53, 60, 61)
• Ans.:– Since, the biggest number is 61, we need to have
6 variables to define this function.
Cont.
Cont.
• Hence the simplified expression becomesF = A’B'E’ + A’C'D’ + A’D'E’ + AB’C'D + ABCE’
THANK YOU...
You can find a copy of this presentation at: http://www.slideshare.net