Lecture 5
Lecture 5
Two-Variable K-Map
The two-variable map is shown in Fig. There are four minterms for two variables; hence, the map
consists of four squares, one for each minterm.
x y m
0 0 x′y′
0 1 x′y
1 0 xy′
1 1 xy
x y z m Three-Variable K-Map
0 0 0 x′y′z′ A three-variable K-map is shown in Fig. There are eight
0 0 1 x′y′z minterms for three binary variables; therefore, the map
consists of eight squares.
0 1 0 x′yz′
0 1 1 x′yz
1 0 0 xy′z′
1 0 1 xy′z
1 1 0 xyz′
1 1 1 xyz
07/01/2024
m0 w′x′y′z′
F O U R - VA R I A B L E K - M A P
The map for Boolean functions of four binary variables (w, x, y, z) is shown in Fig. m1 w′x′y′z
In Fig. are listed the 16 minterms and the squares assigned to each m2 w′x′yz′
One square represents one minterm, giving a term with four literals. m3 w′x′yz
Two adjacent squares represent a term with three literals. m4 w′xy′z′
Four adjacent squares represent a term with two literals. m5 w′xy′z
Eight adjacent squares represent a term with one literal.
m6 w′xyz′
m7 w′xyz
m8 wx′y′z′
m9 wx′y′z
m 10 wx′yz′
m 11 wx′yz
m 12 wxy′z′
m 13 wxy′z
m 14 wxyz′
m 15 wxyz
3. Groups must contain 1, 2, 4, 8, or in general 2n cells. That is if n = 1, a group will contain two 1′s
since 21 = 2. If n = 2, a group will contain four 1′s since 22 = 4.
4. Each group should be as large as possible.
5. Each cell containing a one must be in at least one group.
6. Groups may overlap.
7. Groups may wrap around the table.
8. There should be as few groups as possible, as long as this does not contradict any of the previous
rules.
07/01/2024
First Rule
Groups may not include
any cell containing a
zero (Minterm).
Second Rule
Groups may be horizontal or
vertical, but not diagonal.
3rd Rule
Groups must contain 1,
2, 4, 8, or in general 2n
cells. That is if n = 1, a
group will contain two
1′s since 21 = 2. If n = 2, a
group will contain four
1′s since 22 = 4.
4th Rule
Each group should be as
large as possible.
07/01/2024
5th Rule
Each cell containing a
one must be in at least
one group.
6th Rule
Groups may overlap.
7th Rule
Groups may wrap
around the table.
8th Rule
There should be as few
groups as possible, as
long as this does not
contradict any of the
previous rules.
07/01/2024
Two-Variable K-Map
x′y
x′
y
x xy′ y′
F=m1 + m2 + m3 F=m1 + m2
= x′y + xy′ + xy = x + y F= m0+ m1 + m2
= x′y + xy′ = x′y′+ x′y + xy′
=y′+x′y
=(y′+y)(y′+x′)
=x′+y′
Three-Variable K-Map
Example:
Simplify the Boolean function
F (x, y, z) = (2, 3, 4, 5)
x′y
F =x′y+xy′
xy′
07/01/2024
Example:
Simplify the Boolean function
F (x, y, z) = (0,2,4,5,6)
F=x′y′z′+x′yz′+xy′z′+xy′z+xyz′ F =z′+xy′
=x′z′(y′+y)+xz′(y′+y)+xy′z
=x′z′+xz′+xy′z
=z′+xy′z
=(z′+z)(z′+xy′)
=z′+xy′
z′
xy′
Example:
For the Boolean function
F = A′C + A′B + AB′C + BC
(a) Express this function as a sum of minterms.
(b) Find the minimal sum-of-products expression
Solution: A′ B
a)
F = A′C + A′B + AB′C + BC C
= A′C(B+B′) + A′B(C+C′) + AB′C + BC(A+A′)
=A′CB+A′CB′+A′BC+A′BC′+AB′C+ABC+A′BC
=A′BC+A′B′C+A′BC′+AB′C+ABC
= ( m 3 , m 1 , m 2, m 5, m 7)
b)
F=C+A′B
F=C+A′B
07/01/2024
Example:
EXAMPLE EXAMPLE
Simplify the Boolean function Simplify the Boolean function
F (w, x, y, z) = (0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14) F (w, x, y, z) = (0, 1, 2, 4, 5, 6, 9, 12, 13, 14)
w′z′ w′z′
y′z
xz′ xz′
y′
F = y ′ + w′z′ + xz′ F = y′z + w′z′ + xz′
07/01/2024
A′C′D F′ = AB + CD + BD′
Applying DeMorgan′s theorem (by taking the dual
and complementing each side)
b) F = (AB + CD + BD′)′
= (AB)′(CD)′(BD′)′
=(A′ + B′) (C′ + D′) (B′ + D) =POS
B′C′ a) F = B′D′ + B′C′ + A′C′D =SOP
b) F = (AB + CD + BD′)′
= (AB)′(CD)′(BD′)′
=(A′ + B′) (C′ + D′) (B′ + D) =POS
This Example showed the procedure for obtaining the product-of-sums simplification when the function is
originally expressed in the sum-of-minterms canonical form.
The procedure is also valid when the function is originally expressed in the product of maxterms canonical form.
In sum-of-minterms form, this function is expressed as F (x, y, z) = (1, 3, 4, 6)
In product-of-maxterms form, it is expressed as F (x, y, z) = Π(0, 2, 5, 7)
In other words, the 1′s of the function represent the minterms and the 0′s represent the maxterms.
07/01/2024
Example
Simplify the Boolean function
F (w, x, y, z) = (1, 3, 7, 11, 15)
which has the don′t-care conditions
d (w, x, y, z) = (0, 2, 5)
The minterms of F are the variable combinations that make the function equal to 1. The minterms of d are the
don′t-care minterms that may be assigned either 0 or 1. The minterms of F are marked by 1′s, those of d are
marked by X′s, and the remaining squares are filled with 0′s.
F = yz + w′x′ F = yz + w′z
Energy crisis is a major problem in our country. So we have to control the usage of
power P in order to be a prosperous country. Hence AUST authority decided to keep
power OFF during vacation V time except special class C only. Otherwise keep power
ON in day D time unless there is special class in night time. So what will be the
Boolean function?
V C D P Case
0 0 0 0 OFF
0 0 1 1 Day time regular class
0 1 0 1 Night time special class
0 1 1 1 Both time class
1 0 0 0 OFF
From K-map
1 0 1 0 Day time OFF on vacation P=V′D+C
1 1 0 1 Special class on vacation
1 1 1 1 Special class on vacation
07/01/2024
S1 S2 S3 S4 Y
0 0 0 0 0
0 0 0 1 0
Switch close = input 0 =0V
Problem: Figure shows four 0 0 1 0 0 Switch open = input 1 =+ 5V
switches that are part of the
control circuitry in a copy 0 0 1 1 1
machine. The switches are at 0 1 0 0 0
various points along the path of
the copy paper as the paper 0 1 0 1 1
passes through the machine. 0 1 1 0 1
Each switch is normally open,
and as the paper passes over a 0 1 1 1 1
switch, the switch closes. It is 1 0 0 0 0
impossible for switches SW1
and SW4 to be closed at the 1 0 0 1 X
same time. Describe the logic 1 0 1 0 1
circuit to produce a HIGH
output whenever two or more 1 0 1 1 1
switches are closed at the 1 1 0 0 1
same time. Use K mapping and
take advantage of the don’t-care 1 1 0 1 1
conditions. 1 1 1 0 1
1 1 1 1 X