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