Upload
duongdung
View
213
Download
0
Embed Size (px)
Citation preview
Lecture (09)Karnaugh Maps 2
By:
Dr. Ahmed ElShafee
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١
Determination of Minimum Expansions Using Essential Prime Implicants
• Cover: A switching function f(x1,x2,…,xn) is said to
cover another function g(x1,x2,…,xn), if f assumes the
value 1 whenever g does.
• Implicant : Given a function F of n variables, a
product term P is an implicant of F iff for every
combination of values of the n variables for which
P=1 , F is also equal 1.That is, P=1 implies F=1.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢
• Prime Implicant: A prime implicant of a
function F is a product term implicart which is no
longer an implicant if any literal is deleted from it.
• Essential Prime Implicant: If a minterm is
covered by only one prime implicant, then that prime
implicant is called an essential prime implicant.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣
• On a Karnaugh Map
Any single 1 or any group of 1’s (2k 1’s, k=0,1,2,…)
which can be combined together on a map of the
function F represents a product term which is
called an implicant of F.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٤
• A product term implicant is called a prime implicant if it cannot be combined with another term to eliminate a variable.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥
• If a minterm is covered by only one prime implicant,
then that prime implicant is called an essential
prime implicant.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٦
Examples
• f=wx+yz,
• g=wxy’
• g=1 (w=1,x=1,y=0)
• implies
• f=1.1+0.z=1,
• f covers g.
• g is a product term, g is an implicant of f.
• g is not a prime implicant.
• The literal y’ is deleted from wxy’, the resulting term wx is also an implicant of f.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٧
• f=wx+yz,
• h=wx is a prime implicant.
• The deletion of any literal (w or x) results a new product (x or w) which is not covered by f.
• [w=1 does not imply f=1 (w=1,x=0,y=0,z=0 imply f=0)]
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٨
Example:
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٩
111
11
1
11
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٠
00 01 11 1000
01
11
10
abcd
111
11
1
11
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١١
00 01 11 1000
01
11
10
abcd
111
11
1
11
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٢
00 01 11 1000
01
11
10
abcd
• The minimum sum‐of‐products expression for a
function consists of some (but not necessarily all) of
the prime implicants of a function.
• A sum‐of‐products expression consisting a term which
is not a prime implicant cannot be minimum.
• The essential prime implicant must be included in the
minimum sum‐of‐products.
• In order to find the minimum sum‐of‐products from a
map, we must find a minimum number of prime
implicants which cover all of the 1’s on the map.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٣
Example:
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٤
11
111
111
11
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٥
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٦
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٧
Example
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٨
11
1111
111
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I١٩
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٠
Essential prime implicates: BD,B′’C, AC
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢١
Example
• Simplify the function
• f (A, B,C,D) = Σm(0,1,2,4,5,7,11,15).
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٢
• f (A, B,C,D) = Σm(0,1,2,4,5,7,11,15).
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٣
11
11
111
1
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٤
Example
• Simplify the function
• f (A, B,C,D) = Σm(4,5,6,8,9,10,13) + Σd(0,7,15)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٥
• f (A, B,C,D) = Σm(4,5,6,8,9,10,13) + Σd(0,7,15)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٦
11x
111
xx
11
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٧
Example
• Find min min‐terms expansion
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٨
1
111
111
1
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٢٩
1
111
111
1
00 01 11 1000
01
11
10
abcd
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٠
Other forms of 5‐Variable Karnaugh Maps•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣١
Example
• F(A,B,C,D,E) = Σm(0,1,4,5,13,15,20,21,22,23,24,26,28,30,31)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٢
00 01 11 1000
01
11
10
bcde 00 01 11 10
00
01
11
10
bcde
A=0A=1
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٣
Example
• F(A,B,C,D,E) = Σm(0,1,3,8,9,14,15,16,17,19,25,27,31)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٤
00 01 11 1000
01
11
10
bcde 00 01 11 10
00
01
11
10
bcde
A=0A=1
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٥
Quine‐McCluskeyMethodDetermination of Prime Implicants• the function must be given as a sum of minterms.
• all of the prime implicants of a function are systematically formed by combining minterms
To reduce the required number of comparisons, the binary minterms are sorted into groups according to the number of 1’s in each term
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٦
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٧
• Two terms in any two groups can be combined as they differ in exactly one variable.
• First, we will compare the term in group 0 with all of the terms in group 1.
• Terms 0000 and 0001 can be combined to eliminate the fourth variable, which yields 000–.
• Similarly, 0 and 2 combine to form 00–0 (a′b′d′), and 0 and 8 combine to form –000 (b′c′d′). The resulting terms are listed in Column II
• the corresponding decimal numbers differ by a power of 2 (1, 2, 4, 8, etc.).
• A term may be used more than once because X + X = X.Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٣٨
Example
• Find all of the prime implicants of the function
• f (a,b,c,d) = Σm(0,1,2,5,6,7,8,9,10,14)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٣٩
•
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤٠
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤١
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤٢
•
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤٣
The terms which have not been checked off because they cannot be combined with other terms are called prime implicants.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٤٤
• All prim implicante
• Minimum form ???
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٤٥
The Prime Implicant Chart
• The minterms of the function are listed across the top of the chart, and the prime implicants are listed down the side.
• If a prime implicant covers a given minterm, an X is placed at the intersection of the corresponding row and column.
• If a minterm is covered by only one prime implicant, then that prime implicant is called an essential prime implicant
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٤٦
•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٤٧
• A minimum set of prime implicants must now be chosen to cover the remaining columns
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤٨
• A minimum set of prime implicants must now be chosen to cover the remaining columns
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٤٩
Example
• A prime implicant chart which has two or more X’s in every column is called a cyclic
• prime implicant chart. The following function has such a chart
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٥٠
• Derivation of prime implicants:
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٥١
• Select P1 first.
Dr. Ahmed ElShafee, ACU : Spring 2016, Logic Design٥٢
• Select P2 first.
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٣
Simplification of IncompletelySpecified Functions•
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٤
Example
• Simplify
• F(A,B,C,D) = Σm(2,3,7,9,11,13) + Σ d(1,10,15)
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٥
• Treat the don’t cares (1,10,15) as required minterms
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٦
F(A,B,C,D) = Σm(2,3,7,9,11,13) + Σ d(1,10,15)
• The don’t cares are not list at the top of the table
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٧
F(A,B,C,D) = Σm(2,3,7,9,11,13) + Σ d(1,10,15)
Thanks,..
See you next week (ISA),…
Dr. Ahmed ElShafee, ACU : Spring 2017, Logic Design I٥٨