Professional Documents
Culture Documents
By
Dr. Nermeen Talaat
Lecture 9
1
In general
Map all 1s of the function to the K-map
Choose the largest power of 2 groups until all the 1 of the
function are covered
For a 4 variable function
Group 8 1s – will have 1 literal
Group 4 1s – will have 2 literals
Group 2 1s – will have 3 literals
No group – a lone 1 – term will have all 4 literals
Sometimes will have a choice on how to cover that last 1.
Make the choice that results in a term with the fewest
literals. Sometimes either of 2 answers are equal.
2
Simplifying functions
Simplify XY+X’Z+YZ
Expand to generate minterms
= XY(Z+Z’) + X’Z(Y+Y’) + (X+X’)YZ
111 11 0 0 1 1 0 01 1 11 0 1 1
= XYZ+XYZ’ + X’YZ + X’Y’Z + XYZ+X’YZ
= m7 + m6 + m3 + m1 + repeat + repeat
.
3
Simplification Using K-maps
Example:
F (w,x,y,z) = w’.x.y'.z' + w'.x.y'.z + w.x'.y.z'
+ w.x'.y.z + w.x.y.z' + w.x.y.z
= m(4, 5, 10, 11, 14, 15)
y = m4+m5+m10+m11+m14+m15
yz
wx 00 01 11 10
00
01 1 1
x (cells with ‘0’ are not
11 1 1 shown for clarity)
w
1 1
10
z
4
Simplification Using K-maps
Each group of adjacent minterms (group size in powers of
twos) corresponds to a possible product term of the given
function. y
yz
wx 00 01 11 10
00
A
01 1 1
x
11 1 1
w
10 1 1 B
5
Simplification Using K-maps
There are 2 groups of minterms: A and B, where:
A = w'.x.y'.z' + w‘.x.y'.z
= w'.x.y'.(z' + z)
= w'.x.y'
y
B = w.x'.y.z' + w.x'.y.z + w.x.y.z' + w.x.y.z yz
= w.x'.y.(z' + z) + w.x.y.(z' + z) wx 00 01 11 10
= w.x'.y + w.x.y 00
A
= w.(x'+x).y 01 1 1
x
= w.y 1 1
11
w
10 1 1 B
z
6
Simplification Using K-maps
7
Simplification Using K-maps
Other possible valid groupings of a 4-variable K-map
include:
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1 1 1
1
P P P
1 1 1 1
1 1 1
1 1 1 1 1
O O
9
Converting to Minterms Form
10
Converting to Minterms Form
Example: f(A,B,C,D) = A+C
f(A,B,C,D) =
A(D+D’)(B'+B)(C+C’)+C(B+B’)(A+A‘)(D+D‘)
A
= AB'C'D' + AC'D'(B+B') + BC + A'CD AB
CD 00 01 11 10
= AB'C'D' + ABC'D' + AB'C'D' + BC(A+A')
+ A'CD 00 1 1
11
Simplest SOP Expressions
To find the simplest possible sum of products (SOP)
expression from a K-map, you need to obtain:
minimum number of literals per product term; and
minimum number of product terms
13
Prime Implicant (PI)
If removal of an any literal from an implicant
P results in a product term that is not an
implicant of the function, then P is a prime
implicant.
Let’s take a look at this.
14
implicate
Implicants with 2 1s with 4 1s
A’D
A’B’D A’B
A’BD BD
ABD
A’BC’
A’BC
A’BD’
A’C’D
A’CD
BC’D
BCD
15
Some general statements on P I
A single 1 on a map is a prime implicant if is
not adjacent to any other 1 of the function.
Two adjacent 1s on a map represent a prime
implicant, provided that they are not within a
rectangle of 4 or more squares containing 1s.
Four 1’s that are an implicant are a prime
implicant if they are not within a group of 8.
16
Essential Prime Implicant
A prime implicant that contains a 1 that is not
covered by any other prime implicant of the
function is an essential prime implicant.
IT MUST BE INCLUDED IN ANY
MINIMAL REPRESENTATION OF THE
FUNCTION.
17
Simplest SOP Expressions
A prime implicant is a product term obtained by combining
the maximum possible number of minterms from adjacent
squares in the map.
Use bigger groupings (prime implicants) where possible.
1 1 1 1 1 1
1 1 1
O
1 1 1
P
18
Simplest SOP Expressions
No redundant groups:
1 1 1 1
1
1
1
1
O 1
1
1
1
P
1 1 1 1
19
Quick Review
Identify the prime implicants and the essential prime
implicants of the two K-maps below.
A
b
AB
bc CD 00 01 11 10
a
00 01 11 10
00 1 1 1
0 1 1 0 1
01 1 1
a D
1 0 1 0 0
11 1 1 1
C
c 10 1 1 1
21
Simplest SOP Expressions
22
Simplest SOP Expressions
Example:
f(A,B,C,D) = m(1,2,4,5,7,8,10,13,15)
A
AB
CD 00 01 11 10
00 1 1
All prime implicants
01 1 1
D
11 1 1 1
C
10 1 1
23
Simplest SOP Expressions
A
AB A
CD 00 01 11 10 AB
CD 00 01 11 10
00
1 1
01
1 1 00 1 1
D
C
11 1 1 1 01 1 1
10 1 1 D
11 1 1 1
B C
10 1 1
B
A
AB
CD 00 01 11 10
00 1 1 Minimum cover
01 1 1
D
11 1 1 1
C
10 1 1
B
24
Simplest SOP Expressions
A
AB
CD 00 01 11 10
A'BC'
00 1 1 AB'D'
01 1 1
D
11 1 1 1
C
10 1 1 BD
B
A'B'C
25
Quick Review
00 1
01 1 1 1
D
11 1 1 1
C
10 1
26
Example
Consider the example of
Fig 2-13 of text.
Prime Implicants
A’D
BD’
A’B
Essential Prime Implicants
A’D
BD’
So F=A’D + BD’
27
Using non-essential prime impicants
Consider the example
from 2-14
28
continue
Include those that are essential
Leaves just a single 1
uncovered
Have the 2 choices to use for
covering it, both of equal size
(i.e. same # of literals)
Choose either
Choose as shown getting
F = A’B’C’D’ +BC’D+ABC’
+ AB’C + ABD
29
Another problem
Problem:
30
Select 1s not covered
First
Second
31
Just 1 more to go
have a choice
Both are equal
Choose 1
Get
F = A’C’+ABD+AB’C + A’B’D’
Equal in cost to
F = A’C’+ABD+AB’C + B’CD’
32
Product-of-Sums
A simple method
Simplify F(A,B,C,D)=∑m(0,1,2,5,8,9,10)
Map to K-map
Include 0s
33
Group the 0’s
Use groupings to generate F’
F’=AB+CD+BD’
Use DeMorgans
F=(A’+B’)(C’+D’)(B’+D)
00 1 0 0 1
01 1 1 0 1
D
11 1 1 0 1
C
10 1 0 0 1
B 35
Getting POS Expressions
A A
AB AB
CD 00 01 11 10 CD 00 01 11 10
K-map 00 1 0 0 1 00 0 1 1 0 K-map
of F 01 1 1 0 1 01 0 0 1 0 of F'
D D
11 1 1 0 1 11 0 0 1 0
C C
10 1 0 0 1 10 0 1 1 0
B B
This gives the SOP of F' to be:
F' = B.D' + A.B
To get POS of F, we have:
F = (B.D' + A.B)'
= (B.D')'.(A.B)' DeMorgan
= (B'+D).(A'+B') DeMorgan 36
Examples
Example #1:
f(C,D,A,B) = m(1,2,5,7,8,10,12,13,15)
A
AB
CD 00 01 11 10
00 1 1
Fill in the 1’s.
01 1 1
D
11 1 1 1
C
10 1 1
37
Examples
Example #1:
f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
A
AB
CD 00 01 11 10
These are all the prime
00 1 1 implicants; but do we
01 1 1 need them all?
D
11 1 1 1
C
10 1 1
38
Examples
Example #1:
f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
A
AB
CD 00 01 11 10
00 1 1
Essential prime implicants:
01 1 1
D
11 1 1 1
B.D
C
10 1 1 A'.B.C'
B A.B'.D'
39
Examples
Example #1:
f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15)
A
AB
CD 00 01 11 10
00 1 1
Minimum cover.
01 1 1
D EPIs: B.D, A'.B.C', A.B'.D'
11 1 1 1
C
+
10 1 1
B
A'.B'.C
C
11 1 1 1 01 1 1
implicants
10 1 1 D
11 1 1 1
B C
10 1 1
SUMMARY
A B
AB
CD 00 01 11 10
00 1 1
Minimum cover
01 1 1
D
11 1 1 1
C
10 1 1
f(A,B,C,D) = B.D + A'.B'.C + A.B'.D' + A'.B.C'
B 41
Examples
Example #2:
f(A,B,C,D) = A.B.C + B'.C.D' + A.D + B'.C'.D'
A
AB
CD 00 01 11 10
00 1 1
Fill in the 1’s.
01 1 1
D
11 1 1
C
10 1 1 1
42
Examples
Example #2:
f(A,B,C,D) = A.B.C + B'.C.D' + A.D + B'.C'.D'
A
AB
CD 00 01 11 10
00 1 1
Find all PIs:
01 1 1
D
11 1 1 A.D
C
10 1 1 1 A.C
B B'.D'
Are all ‘1’s covered by the PIs? Yes, so the answer is:
f(A,B,C,D) = A.D + A.C + B'.D'
43
Examples
To find simplest POS expression for example #2:
f(A,B,C,D) = A.B.C + B'.C.D' + A.D + B'.C'.D'
Draw the K-map of the complement of f, f '.
A From K-map,
AB
CD 00 01 11 10
f ' = A'.B + A'.D + B.C'.D'
00 1 1
Using DeMorgan’s theorem,
01 1 1
D
11 1 1 f = (A'.B + A'.D + B.C'.D')'
C
10 1 = (A+B').(A+D').(B'+C+D)
B
44