3-minimisation
Transcript of 3-minimisation
-
7/30/2019 3-minimisation
1/61
Page 1
ENEL111
Last Lecture
Sum of products
Boolean algebra
This Lecture
Karnaugh maps
Some more examples of algebra and truth tables
K-Maps are a convenient way to simplify BooleanExpressions.
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.1
0
1
0
B
11
01
10
10
PA
11
110
10
B
A
minterms are represented by a 1
in the corresponding location in
the K map.
The expression is:
A.B + A.B + A.B
-
7/30/2019 3-minimisation
2/62
Page 2
Adjacent 1s can be paired off
Any variable which is both a 1 and a zero in thispairing can be eliminated
Pairs may be adjacent horizontally or vertically
11
110
10
B
Aa pair
another pair
B is eliminated,leaving A as the term
A is eliminated,leaving B as the termThe expression
becomes A + B
Two Variable K-Map
0
10
1
0
1
0
0
P
111
011101
001
110
010
100
000
CBA A.B.C + A.B.C + A.B.C
111
10
10110100
BC
A
One square filled in for eachminterm.Notice the co de sequence:
00 01 11 10 a Gray code.
111
10
10110100
BC
A
equates to B.C as A
is eliminated.
Here, we can wraparound and this pair
equates to A.C as Bis eliminated.
Our truth table simplifies to
A.C + B.C as before.
111
110
10110100
BC
A
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/30/2019 3-minimisation
3/63
Page 3
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
Three Variable K-Map example
X = A.B.C+ A.B.C + A.B.C+ A.B.C
ABC 00 01 11 10
0
1
X =
ABC 00 01 11 10
0 1 1
1 1 1
X = C
Two Variable K-Map
0
10
1
0
1
0
0
P
111
011101
001
110
010
100
000
CBA A.B.C + A.B.C + A.B.C
1
1110
10110100
AB
C
There is more than one way to label the axes of theK-Map, some views lead to groupings which are
easier to see.
-
7/30/2019 3-minimisation
4/64
Page 4
Sometimes in a truth table it doesnot matter if the output is a zero or aone
Traditionally marked with an x.
We can use these as 1s if it helps.
1xx1
110
10110100AB
C
0
1
0
1
x
1
x
0
P
111
011
101
001
110
010
100
000
CBA
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
Four Variable K-Map example
F = 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
ABCD 00 01 11 10
00
01
11
10
F =
ABCD 00 01 11 10
00 1 1
01 1 1
11
10 1 1
Four Variable K-Map solution
F = 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
F = B.D + A.C
1
-
7/30/2019 3-minimisation
5/65
Page 5
We have populated the maps with 1s usingsum-of-products extracted from the truth table.
We can equally well work with the 0s
11
1110
10110100AB
C
0
1
0
1
1
1
00
P
111
011
101
001
110
010
100000
CBA
0001
00
10110100AB
C
P = (A + B).(A + C)
P = A.B + A.C equivalent
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
Example: Z5 of the Seven Segment Display
0 0 0 0 1
0 0 0 1 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 1
X1 X2 X3 X4 Z5
1 0 0 1 0
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X1 1 1 0 X
1 1 1 1 X
0
1
2
3
4
5
6
7
8
9
0 0 1 0 1 X1X2X3 X4 00 01 11 10
00
01
11
10
Z5 =
Better to group 1s or 0s?
If there are less 1s than 0s it is an easier option:
X
X1X2X3X4 00 01 11 10
00 1 0 0 1
01 0 0 0 111 X X X10 1 0 X X
Changing this to 1gives us the corner
group.
-
7/30/2019 3-minimisation
6/66
Page 6
Print out the CS1 tutorial questions from the
website.
Come to see the answers worked through.