k map week 9
TRANSCRIPT
-
7/31/2019 K Map Week 9
1/17
Karnaugh Maps
BCS Certificate Level
Computer & Network Technology
Week 9
Nundloll Arvin
-
7/31/2019 K Map Week 9
2/17
Karnaugh Maps
K-Maps are a convenient way to simplify Boolean
Expressions.
They can be used for up to 4 or 5 variables.
They are a visual representation of a truth table. Expression are most commonly expressed in
sum of products form.
-
7/31/2019 K Map Week 9
3/17
Truth table to K-Map
A B P
0 0 1
0 1 1
1 0 0
1 1 1
BA 0 1
0 1 1
1 1
minterms are represented by a 1
in the corresponding location inthe K map.
The expression is:
A.B + A.B + A.B
-
7/31/2019 K Map Week 9
4/17
K-Maps
Adjacent 1s can be paired off
Any variable which is both a 1 and a zero in this
pairing can be eliminated
Pairs may be adjacent horizontally or vertically
BA 0 1
0 1 1
1 1
a pair
another pair
B is eliminated,
leaving A as the term
A is eliminated,
leaving B as the termThe expressionbecomes A + B
-
7/31/2019 K Map Week 9
5/17
K-Maps (Cont.)
Two Variable K-Map
A B C P
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
A.B.C + A.B.C + A.B.C
BC
A 00 01 11 100 1
1 1 1
One square filled in for each
minterm.Notice the code sequence:
00 01 11 10 a Gray code.
-
7/31/2019 K Map Week 9
6/17
Grouping the Pairs
BC
A 00 01 11 10
0 1
1 1 1
equates to B.C as Ais eliminated.
Here, we can wrap
around and this pairequates to A.C as Bis eliminated.
Our truth table simplifies toA.C + B.C as before.
-
7/31/2019 K Map Week 9
7/17
Groups of 4
BC
A 00 01 11 10
0 1 11 1 1
Groups of 4 in a block can be used to eliminate two
variables:
The solution is B because it is a 1 over the whole block
(vertical pairs) = BC + BC = B(C + C) = B.
-
7/31/2019 K Map Week 9
8/17
Karnaugh Maps
Three Variable K-Map
Extreme ends of same row considered adjacent
ABC 00 01 11 10
0
1
A.B.C A.B.C A.B.C A.B.C
A.B.C A.B.C A.B.C A.B.C
0010
A.B.C
A.
B.
C
A.B.C
A.
B.
C
-
7/31/2019 K Map Week 9
9/17
Karnaugh Maps
Three Variable K-Map example
X A.B.CA.B.CA.B.CA.B.C
A BC 00 01 11 10
0
1
X =
-
7/31/2019 K Map Week 9
10/17
The Block of 4, again
ABC 00 01 11 10
0 1 1
11 1
X = C
-
7/31/2019 K Map Week 9
11/17
Karnaugh Maps
Two Variable K-Map
A B C P
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
A.B.C + A.B.C + A.B.C
AB
C 00 01 11 10
0 1 1 1
1
There is more than one way to label the axes of the
K-Map, some views lead to groupings which are
easier to see.
-
7/31/2019 K Map Week 9
12/17
Dont Care States Sometimes in a truth table it does
not matter if the output is a zero or a
one
Traditionally marked with an x.
We can use these as 1s if it helps.
AB
C00 01 11 10
0 1 11 x x 1
A B C P
0 0 0 0
0 0 1 x0 1 0 1
0 1 1 x
1 0 0 1
1 0 1 01 1 0 1
1 1 1 0
-
7/31/2019 K Map Week 9
13/17
Karnaugh Maps
Four Variable K-Map
Four corners adjacent
ABCD 00 01 11 10
00
01
11
10
A.B.C.D A.B.C.D A.B.C.D A.B.C.D
A.B.C.D A.B.C.D A.B.C.D A.B.C.D
A.B.C.D A.B.C.D A.B.C.D A.B.C.D
A.B.C.D A.B.C.D A.B.C.D A.B.C.D
A.B.C.D
A.B.C.D
A.B.C.D
A.B.C.D
-
7/31/2019 K Map Week 9
14/17
Karnaugh Maps
Four Variable K-Map exampleFA.B.C.DA.B.C.D+A.B.C.DA.B.C.DA.B.C.DA.B.C.DA.B.C.D
ABCD 00 01 11 10
0001
11
10
F =
-
7/31/2019 K Map Week 9
15/17
ABCD 00 01 11 10
00 1 101 1 1
11
10 1 1
Karnaugh Maps
Four Variable K-Map solutionFA.B.C.DA.B.C.D+A.B.C.DA.B.C.DA.B.C.DA.B.C.DA.B.C.D
F = B.D + A.C
1
-
7/31/2019 K Map Week 9
16/17
Product-of-SumsWe have populated the maps with 1s using
sum-of-products extracted from the truth table.
We can equally well work with the 0s
AB
C 00 01 11 10
0 1 1 1
1 1
A B C P
0 0 0 00 0 1 0
0 1 0 1
0 1 1 1
1 0 0 11 0 1 0
1 1 0 1
1 1 1 0
AB
C 00 01 11 10
0 0
1 0 0 0
P = (A + B).(A + C)
P = A.B + A.C equivalent
-
7/31/2019 K Map Week 9
17/17
Inverted K Maps
In some cases a better simplification can beobtained if the inverse of the output is considered
i.e. group the zeros instead of the ones
particularly when the number and patterns of zeros is
simpler than the ones