lecture 6: gate level minimization - wayne state university
TRANSCRIPT
Lecture 6: Gate Level Minimization
Original Source: Aby K George, ECE Department, Wayne State University
Syed M. Mahmud, Ph.D
ECE Department
Wayne State University
Contents
β’ The Map method
β’ Two variable K-Map
β’ Three variable K-Map
β’ Four-variable K-Map
β’ Prime implicants
β’ Essential prime implicants
β’ Product-of-sums simplification
β’ Donβt-care conditions
Chapter 3 ECE 2610 β Digital Logic 1 2
Introduction
β’ Logic synthesis: Minimization of logic function with available gates.
β’ Manual methods for the design of simple circuits.
β’ Gate-level minimization with manual methods (using theorems and postulates) is difficult when function is complex.
β’ Computer-based logic synthesis tools for minimization of complex functions.
Chapter 3 ECE 2610 β Digital Logic 1 3
The Map method or K-Map method
β’ Karnaugh Map or K-Map
β’ Pictorial form of a truth table.
β’ K-mapβ’ Made up of squaresβ’ Each square represents on minterm in the truth table
β’ The simplified expressionβ’ Sum of product form (SOP)β’ Product of sum (POS)
β’ Gives simplest algebraic expression.
β’ In some cases, more than one simplest expressions are possible.
Chapter 3 ECE 2610 β Digital Logic 1 4
Two-variable K-Map
β’ 2 variables => 22 = 4 min terms
β’ Ex: Simplify the following truth table
Chapter 3 ECE 2610 β Digital Logic 1 5
x y F
0 0 0
0 1 0
1 0 0
1 1 1
πΉ = m3 πΉ = π₯. π¦
Two-variable K-Map
β’ Simplify the following truth table using K-Map
Chapter 3 ECE 2610 β Digital Logic 1 6
x y F
0 0 0
0 1 1
1 0 1
1 1 1
πΉ = π1 +π2 +π3
= π₯β²π¦ + π₯π¦β² + π₯π¦πΉ = π₯ + π¦
Three-variable K-Map
β’ 3 variables => 23 = 8 minterms.
β’ Sequence arranged in Gray code
β’ Only one bit change in value between two adjacent squares
Chapter 3 ECE 2610 β Digital Logic 1 7
Three-variable K-Map
β’ Simplify the following truth table using K-Map
Chapter 3 ECE 2610 β Digital Logic 1 8
x y z F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
00 01 11 10
0
1 1 1
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π₯π§
00 01 11 10
0 1 1
1 1 1
Three-variable K-Map
β’ Simplify using K-Map
πΉ = Ξ£ 2,3,4,5
Chapter 3 ECE 2610 β Digital Logic 1 9
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π₯π¦β² + π₯β²π¦
πΉ = Ξ£ 3,4,6,7
00 01 11 10
0 1
1 1 1 1
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π¦π§ + π₯π§β²
00 01 11 10
0 1 1
1 1 1 1
Three-variable K-Map
β’ Simplify using K-Map
πΉ = Ξ£ 0,2,4,5,6
Chapter 3 ECE 2610 β Digital Logic 1 10
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π₯π¦β² + π§β²
πΉ = Ξ£ 1,2,3,5,7
00 01 11 10
0 1 1 1
1 1 1
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π₯β²π¦ + π§
K-Map Simplification
Number of squares combined in K-Map Minimized literals
One square Three literals
Two adjacent squares combined Two literals
Four adjacent squares combined One literal
Eight adjacent squares combined Zero literals (Always answer is 1)
Chapter 3 ECE 2610 β Digital Logic 1 11
β’ Three variable K-Map
β’ Four variable K-MapNumber of squares combined in K-Map Minimized literals
One square Four literals
Two adjacent squares combined Three literals
Four adjacent squares combined Two literal
Eight adjacent squares combined One literal
Sixteen adjacent squares combined Zero literals (Always answer is 1)
Four-variable K-Map
β’ Simplify the Boolean function
πΉ π€, π₯, π¦, π§ = Ξ£(0,1,2,4,5,6,8,9,12,13,14)
Chapter 3 ECE 2610 β Digital Logic 1 13
00 01 11 10
00 1 1 1
01 1 1 1
11 1 1 1
10 1 1
π€π₯
π¦π§
π€
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
πΉ = π¦β² + π₯π§β² + π€β²π§β²
π12 π13 π15
π8 π9
π14
π11 π10
π₯
Four-variable K-Map
β’ Simplify the Boolean function
πΉ π΄, π΅, πΆ, π· = π΄β²π΅β²πΆβ² + π΅β²πΆπ·β² + π΄β²π΅πΆπ·β² + π΄π΅β²πΆβ²
Chapter 3 ECE 2610 β Digital Logic 1 14
00 01 11 10
00 1 1 1
01 1
11
10 1 1 1
π΄π΅
πΆπ·
π΄
πΆ
π·
π0 π1 π3 π2
π6π7π5π4
πΉπ΄β²π΅β²πΆβ² = π΄β²π΅β²πΆβ² π· + π·β² = π΄β²π΅β²πΆβ²π· + π΄β²π΅β²πΆβ²π·β²
= π1 +π0
π12 π13 π15
π8 π9
π14
π11 π10
π΅
π΅β²πΆπ·β² = π΅β²πΆπ·β² π΄ + π΄β² = π΄π΅β²πΆπ·β² + π΄β²π΅β²πΆπ·β²
= π10 +π2
π΄β²π΅πΆπ·β² = π6
π΄π΅β²πΆβ² = π΄π΅β²πΆβ² π· + π·β² = π΄π΅β²πΆβ²π· + π΄π΅β²πΆβ²π·β²
= π9 +π8
πΉ = π0 +π1 +π2 +π6 +π8 +π9 +π10
πΉ = π΅β²π·β² + π΅β²πΆβ² + π΄β²πΆπ·β²
Prime Implicants
β’ While choosing adjacent squares:β’ All minterms covered
β’ The number of terms in the expression is minimized
β’ There are no redundant terms
β’ A prime implicant is a product term obtained by combining the maximum possible number of adjacent squares in the Map.
β’ A prime implicant is essential if:β’ It cannot be removed from a description of the function.
β’ It is the only prime implicant that covers the minterm.
Chapter 3 ECE 2610 β Digital Logic 1 15
Prime implicants
β’ πΉ = Ξ£(0,2,3,5,7,8,9,10,11,13,15)
Chapter 3 ECE 2610 β Digital Logic 1 16
00 01 11 10
00 1 1 1
01 1 1
11 1 1
10 1 1 1 1
π΄π΅
πΆπ·
π΄
πΆ
π·
π0 π1 π3 π2
π6π7π5π4
πΉ
π12 π13 π15
π8 π9
π14
π11 π10
π΅
Essential Prime implicants: π΅π·, π΅βπ·β
Prime implicants: πΆπ·, π΅β²πΆ, π΄π·, π΄π΅β²
πΉ = π΅π· + π΅β²π·β² + πΆπ· + π΄π·= π΅π· + π΅β²π·β² + πΆπ· + π΄π΅β²= π΅π· + π΅β²π·β² + π΅β²πΆ + π΄π·= π΅π· + π΅β²π·β² + π΅β²πΆ + π΄π΅β²
Only one way to include π0 and π5
Product of sums simplification
β’ Take max terms for simplification
β’ Simplify πΉ = Ξ£(0,1,2,5,8,9,10) into product of sum form
Chapter 3 ECE 2610 β Digital Logic 1 17
00 01 11 10
00 1 1 0 1
01 0 1 0 0
11 0 0 0 0
10 1 1 0 1
π΄π΅
πΆπ·
π΄
πΆ
π·
π0 π1 π3 π2
π6π7π5π4
πΉ
π12 π13 π15
π8 π9
π14
π11 π10
π΅
πΉβ² = π΄π΅ + πΆπ· + π΅π·β²Apply DeMorganβs theorem to get FπΉ = (π΄β² + π΅β²)(πΆβ² + π·β²)(π΅β² + π·)
Product of sums simplification
β’ Simplify πΉ = Ξ (0,2,5,7) into product of sum form
πΉ = Ξ 0,2,5,7 = Ξ£(1,3,4,6)
Chapter 3 ECE 2610 β Digital Logic 1 18
00 01 11 10
0 0 1 1 0
1 1 0 0 1
π₯
π¦π§
π₯
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ πΉβ² = π₯β²π§β² + π₯π§
πΉ = (π₯ + π§)(π₯β² + π§β²)
Donβt-care conditions
β’ Donβt-care (X) minterm is a combination of variables whose logical value is not specific.
β’ Example: 4-bit binary code for decimal numbers β’ 0000 to 1001 β Valid
β’ 1010 to 1111 β Invalid
β’ The donβt-care condition can be used on a map to provide further simplification of Boolean expression.
Chapter 3 ECE 2610 β Digital Logic 1 19
Donβt-care condition
β’ Simplify the Boolean function πΉ(π€, π₯, π¦, π§) = Ξ£(1,3,7,11,15) which has a donβt-care condition π(π€, π₯, π¦, π§) = Ξ£(0,2,5)
Chapter 3 ECE 2610 β Digital Logic 1 20
00 01 11 10
00 X 1 1 X
01 X 1
11 1
10 1
π€π₯
π¦π§
π€
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
π12 π13 π15
π8 π9
π14
π11 π10
π₯
πΉ = π¦π§ + π€β²π§
Donβt-care condition
β’ Simplify the Boolean function πΉ(π€, π₯, π¦, π§) = Ξ£(1,3,7,11,15) which has a donβt-care condition π(π€, π₯, π¦, π§) = Ξ£(0,2,5) using product of sum simplificiton
Chapter 3 ECE 2610 β Digital Logic 1 21
00 01 11 10
00 X 1 1 X
01 0 X 1 0
11 0 0 1 0
10 0 0 1 0
π€π₯
π¦π§
π€
π¦
π§
π0 π1 π3 π2
π6π7π5π4
πΉ
π12 π13 π15
π8 π9
π14
π11 π10
π₯
πΉβ² = π§β² + π€π¦β²
πΉ = π§(π€β² + π¦)
Other minimization methods
β’ Algebraic methodsβ’ Simplify using Algebraic theorems.
β’ Quine McClusky Methodβ’ Tabular method
β’ Can work for any number of variables
β’ Scheinman Methodβ’ Column-wise writing of minterms as decimal numbers and their simplification
β’ Can work for any number of variables
Chapter 3 ECE 2610 β Digital Logic 1 22
Summary
β’ Simplify a Karnaugh Map for Boolean functions of 2, 3, and 4 variables
β’ Find prime implicants of a Boolean function
β’ How to obtain the sum-of-product terms and product-of-sum forms of a Boolean function directly from K-Map
β’ How to use donβt-care conditions to simplify a K-Map
Chapter 3 ECE 2610 β Digital Logic 1 23