Professional Documents
Culture Documents
`x{Üwtw aÉâÜtÇ|
Dept. of EE
Univ. of Texas at Dallas
Session 03
1
Gates and Logic Optimization
&
≥1
2
Summary of Digital Logic Gates
IEEE Symbols
&
≥1
n
For n variables, there will be at most 2 2 functions. 6
3
Boolean (Switching) Algebra
• Axioms:
0·0=0 1+1=1
1·1=1 0+0=0
0·1=1·0=0 0+1=1+0=1
• Theorems with one variable
X·1=X X+0=X …….(Identities)
X =X …….(Involution)
7
X ⋅Y = Y ⋅ X X +Y = Y + X K (Commutativ ity )
(X ⋅Y ) ⋅ Z = X ⋅ (Y ⋅ Z ) (X + Y ) + Z = X + (Y + Z ) K (Associativity )
X ⋅Y + X ⋅ Z = X ⋅ (Y + Z ) (X + Y ) ⋅ (X + Z ) = X + Y ⋅ Z K (Distributivity )
X + X ⋅Y = X X ⋅ (X + Y ) = X K (Covering )
X ⋅Y + X ⋅Y = X (X + Y ) ⋅ (X + Y ) = X K (Combining )
X ⋅ X ⋅K ⋅ X = X X + X +K+ X = X
K (Generalized idempotenc y )
• DeMorgan’s Laws:
( X1 + X2 + ... + Xn ) = X1 ⋅ X2 ⋅ ... ⋅ Xn
( X1 ⋅ X2 ⋅ ... ⋅ Xn ) = X1 + X2 + ... + Xn 8
4
Summary of Minterms & Maxterms
Inputs Minterms Maxterms
Row
x y z Term Notation Term Notation
0 0 0 0 x’y’z’ m0 x+y+z M0
1 0 0 1 x’y’z m1 x+y+z’ M1
2 0 1 0 x’yz’ m2 x+y’+z M2
3 0 1 1 x’yz m3 x+y’+z’ M3
4 1 0 0 xy’z’ m4 x’+y+z M4
5 1 0 1 xy’z m5 x’+y+z’ M5
6 1 1 0 xyz’ m6 x’+y’+z M6
7 1 1 1 xyz m7 x’+y’+z’ M7
Mi = mi 9
Examples
• Sum of Product (SoP):
F (x , y , z ) = xyz + xyz + xyz
= m 0 + m 3 + m7
= ∑ (m0 , m3 , m7 )
= ∑ (0,3,7 )
• Product of Sum (PoS):
F (x , y , z ) = (x + y + z )(x + y + z )(x + y + z )
= M0 ⋅ M1 ⋅ M 4
= ∏ (M0 , M1 , M 4 )
= ∏ (0,1 ,4)
• Conversion:
∑(1,4,7) = ∏(0,2,3,5,6)
m1 +m4 +m7 = M0 ⋅ M2 ⋅ M3 ⋅ M5 ⋅ M6
10
5
Algebraic Simplification
• To reduce circuit complexity and to maximize
circuit performance, it is often necessary to
optimize the algebraic expressions.
11
Simplification Examples
f (x, y, z) = x y z + x y + x y z (( ) )
F (x, y, z) = x y + z + z y
( )
= xy z + z + xy
= x(y + z)y + z y
= xy+ xy
= x yy + x z y+ z y
(
= x+x y ) = x y + x z y + z y ⋅1
= 1⋅ y = (
xy+ zy x +1 )
=y = x y + z y ⋅1
= xy+ zy
12
6
Simplification Examples (cont.)
(w+ x)y+ z + wxz= ( w + x )y ⋅ z ) + wxz
= ( (w+ x) + y)z) + wx z
= ((wx + y)z) + wx z
(( )( ) )
= w + y x + y z +wx z
( )
= wx + wy + x y + yy z + wx z
= (w x z + w y z + x y z + y z )+ w x z
= w x (z + z ) + y z(w + x + 1)
= wx + yz
(a b + c )(b + c d ) = ab + abc d + bc + c c d
= ab + abcd + bc + 0
= ab ( 1 + cd ) + bc
= ab + bc ...... SOP form
= b (a + c ) ...... POS form 13
14
7
Simplification Examples (cont.)
• Prove the consensus theorem:
xy + x z + yz = xy + x z + yz ( x + x )
= xy + x z + xyz + x yz
= xy (1 + z ) + x z (1 + z )
= xy1 + x z1
= xy + x z
15
Karnaugh Maps
• Truth tables are a convenient form to represent
equations but they don’t aid in the simplification
of logic equations.
16
8
Karnaugh Maps (cont.)
• 1 variable K-map: f(a) • 3-variable K-map: f(a,b,c)
a
f(a,b,c) b
0 1 bc
a 00 01 11 10
m0 m1
0 m000 m001 m011 m010
c
f(a,b)
b
b 0
a 1
0 m00 m01
a 1 m10 m11
17
18
9
Logic Minimization: Example 1
yz yz
x 00 01 11 10 x 00 01 11 10
0 1 1 1 0 1 0 1 1
1 1 1 1 1 0 0 1
F(x,y,z) = z + x y (
F(x,y,z) = y+ z x+ z )( )
# INV = 2 # INV = 2
# AND2 = 1 # AND2 = 1
# OR2 = 1 # OR2 = 2
10
Single-Output Quine-McCluskey
Optimization Method
21
22
11
Example 1 – Phase I
• Minimize f ( a, b, c, d ) = ∑ ( 4,5, 6,8,9,10,13) + d ( 0, 7,15 )
1. List the minterms along with don’t cares and arrange them in
groups according to the number of 1’s in the minterms
23
12
Example 1 – Phase I (cont.)
2. Compare entries in adjacent groups in column 1 and fill up entries
in column 2:
compare groups 0 and 1
Column 1 Column 2
0 0000 √ (0,4) 0-00
4 0100 √ (0,8) -000
8 1000 √
5 0101
6 0110
9 1001
10 1010
7 0111
13 1101
15 1111 25
Column 1 Column 2
0 0000 √ (0,4) 0-00
4 0100 √ (0,8) -000
8 1000 √ (4,5) 010-
5 0101 √
6 0110
9 1001
10 1010
7 0111
13 1101
15 1111 26
13
Example 1 – Phase I (cont.)
2. Compare entries in adjacent groups in column 1 and fill up entries
in column 2:
compare groups 1 and 2
Column 1 Column 2
0 0000 √ (0,4) 0-00
4 0100 √ (0,8) -000
8 1000 √ (4,5) 010-
5 0101 √ (4,6) 01-0
6 0110 √ (8,9) 100-
9 1001 √ (8,10) 10-0
10 1010 √
7 0111
13 1101
15 1111 27
14
Example 1 – Phase I (cont.)
3. Compare entries in adjacent groups in column 2 and fill up entries
in column 3. Repeat until nothing can be combined.
Column 1 Column 2 Column 3
0 0000 √ (0,4) 0-00 * (4,5,6,7) 01-- *
4 0100 √ (0,8) -000 * (5,7,13,15) -1-1 *
8 1000 √ (4,5) 010- √
5 0101 √ (4,6) 01-0 √
6 0110 √ (8,9) 100- *
9 1001 √ (8,10) 10-0 *
10 1010 √ (5,7) 01-1 √
7 0111 √ (5,13) -101 √
13 1101 √ (6,7) 011- √
15 1111 √ (9,13) 1-01 *
(7,15) -111 √
29
(13,15) 11-1 √
Example 1 (cont.)
• Prime Implicant Chart: It is the second part of
the Quine-McCluskey algorithm.
—It is used to select a minimum set of prime
implicants.
– Essential Prime implicants are listed along the vertical axis of
the table (i.e., rows of the table).
– The minterms are listed along the horizontal axis (i.e.,
columns of the table).
– Entry (i, j) of the table is marked if the minterm at the head
of column j is contained in (covered by) prime implicant in
row i.
—Similar to the Karnaugh map, we first select the
essential prime implicants, and then we select
enough prime implicants to cover all the minterms of
the function. 30
15
Examples
yz
wx 00 01 11 10
Some implicants
00 1
01 1 1
11 1 1 1 1
Prime Implicants
10 1 1
31
(8,9) 100- X X
(8,10) 10-0 X X
(9,13) 1-01 X X Do not include don’t cares
in this table. They need
(4,5,6,7) 01-- X X X not be covered by the final
expression
(5,7,13,15) -1-1 X X
• Look for minterms that are covered by a single prime implicant. The prime
implicant which contains that minterm will be in the minimal expression.
Mark as “covered” all minterms contained in such prime implicants
• Choose the minimum number of additional (from non-essential) prime
implicants required to cover the remaining minterms.
F ( a , b, c , d ) = a b + a b d + a c d
32
16
Example 2 - Phase I:
0-010 *
2 00010 √
010-0 *
8 01000 √ --1-1 *
-1000 * 0-1-1 *
5 00101 √ --1-1
001-1 √ -01-1 √
10 01010 √
0-101 √ 0-1-1
17 10001 √
-0101 √ --101 √
24 11000 √
100-1 √ -01-1
7 00111 √
0-111 √ --101
13 01101 √
-0111 √ 10--1 *
19 10011 √
011-1 √ --111 √
21 10101 √
-1101 √ -11-1 √
15 01111 √
10-11 √ -11-1
23 10111 √
101-1 √ 1-1-1 *
29 11101 √
1-101 √ 1-1-1
31 11111 √
-1111 √
1-111 √
111-1 √ 33
m2 m5 m7 m8 m10 m13 m15 m17 m19 m21 m23 m24 m29 m31
0-010 X X
010-0 X X
-1000 X X
0-1-1 X X X X
10--1 X X X X
1-1-1 X X X X
--1-1 X X X X X X X X
34
17
Multiple Output Minimization
F (a,b,c) =∑(0,2,6,7) G(a,b,c)=∑(1,3,6,7)
bc bc
a 00 01 11 10 a 00 01 11 10
0 1 1 0 1 1
1 1 1 1 1 1
F =ac + ab G=ac + ab
Ö Two separate Systems (no sharing) a
→ 6 gates and a total of 12 gate inputs c
F
a
Ö One System (sharing) b
→ 5 gates and a total of 10 gate inputs G
a
c
35
F (a , b , c ) = ∑ (0,1 ,6)
G(a,b,c)=∑(2,3,6)
bc bc
a 00 01 11 10 a 00 01 11 10
0 1 1 0 1 1
1 1 1 1
F =ab + abc G =ab + bc
No sharing Ö 6 gates with a total of 13 gate inputs.
18
Multiple Output Minimization Method
37
19
Example 3: Two-Output Circuit
F (a , b , c , d )= ∑ (0,2 ,3 ,4,6,7 ,10 ,11 ) G (a , b , c , d )= ∑ (0,4 ,8 ,9,10 ,11 ,12 ,13 )
cd cd
ab 00 01 11 10 ab 00 01 11 10
0 0
1 1 1 0
1
0
0 0
1 1 1 1
1
1
1 1
1 1
1 1
1 1
1 1 0
1 1 1 1
0
F =ac + ac d + abc
G=ac + ac d + abc
With sharing Ö 6 gates with a total of 16 gate inputs.
F =ac + ad + bc G =ac + c d + ab
No sharing Ö 8 gates with a total of 18 gate inputs.
39
00 1 00 00 1
01 1 1 1 01 1 01 1 1
11 1 1 1 1 11 1 1 1 1 11 1 1
10 1 1 10 1 1 1 1 10 1 1
F =ad + ac d + bc d + bc d G =a + bc d H =ad + ac d + bc d
F =ad + bd + c d G =a + bc d H =ad + ac d + bc d
40
20