You are on page 1of 20

EE/CE 6301: Advanced Digital Logic

`x{Üwtw aÉâÜtÇ|
Dept. of EE
Univ. of Texas at Dallas

Session 03

Review of Digital Design


(Dr. Balsara & Dr. Bhatia’s lectures for EE3320)

1
Gates and Logic Optimization

Summary of Digital Logic Gates


IEEE Symbols

&

≥1

2
Summary of Digital Logic Gates
IEEE Symbols

&

≥1

Logic Functions Using 2 Variables


x+y yÆxx xÆy y xy x+y
yÆx
0 x+y xy y xÆy x x+y 1

x y f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15


0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 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·0=0 X+1=1 .……(Null Elements)

X·X=X X+X=X …….(Idempotency)

X·X=0 X+X=1 …….(Complements)

X =X …….(Involution)
7

Boolean (Switching) Algebra (cont.)


• Theorems with two or three variables:

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.

• Depending on the optimization criteria, the rules


of simplification may be different.

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

Simplification Examples (cont.)


• Prove the consensus theorem:
xy + x z + yz = xy + x z

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.

• A K-map is a multi-dimensional tabulation of


function values.

• Each minterm is assigned an entry (a cell) in the


table. The cell contains the value of the
function for the corresponding minterm.

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

• 2 variable K-map: f(a,b)


a 1 m100 m101 m111 m110

c
f(a,b)
b
b 0
a 1
0 m00 m01

a 1 m10 m11

17

Karnaugh Maps (cont.)


• 4-variable K-map: f(a,b,c,d)
f(a,b,c,d) c
cd
ab 00 01 11 10

00 m0000 m0001 m0011 m0010

01 m0100 m0101 m0111 m0110


b
11 m1100 m1101 m1111 m1110
a
10 m1000 m1001 m1011 m1010

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

Sum of Products: Product of Sums:

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

Ö For example 1 SOP is SMALLER


19

Logic Minimization: Example 2


yz
wx 00 01 11 10
0
0
0 1 0 0
0
1
0 1 1 0
1
1
1 1 1 1
1
0
1 1 0 0
SOP: POS:

F (w, x, y, z)=wx + wy + y z + x z F (w, x, y, z)=(w+ z)(x + y)


# INV = 1 # INV = 1
# AND2 = 4 # AND2 = 1
# OR2 = 3 # OR2 = 2
Ö For example 2 POS is SMALLER
20

10
Single-Output Quine-McCluskey
Optimization Method

21

Quine-McCluskey Minimization Method


• It is a tabular method involving identification of
prime implicants and minimal cover (minimum
set of prime implicants)
—Prime implicants are determined using an iterative
procedure in which variables are eliminated by
applying adjacency
—Minimal cover is determined using a prime implicant
chart from which the essential prime implicants and a
minimal set of remaining prime implicants so that all
minterms are covered
• Suitable for use in logic minimization software

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

(d) m0 0000 group 0 0000


m4 0100 0100
group 1
m5 0101 1000
m6 0110 0101
(d) m7 0111 0110
group 2
m8 1000 1001 After grouping we only need
m9 1001 1010 to compare minterms from
adjacent groups
m10 1010 0111
group 3
m13 1101 1101 Don’t cares are included
in this step.
(d) m15 1111 group 4 1111

23

Example 1 – Phase I (cont.)


2. Compare and combine entries in adjacent groups in column 1 and
fill up entries in column 2:
„ Compare groups 0 and 1: mark those that can be combined by a
check mark (√ );
If an entry cannot be combined, mark with a star. These are the
prime implicants.
Column 1 Column 2
0 0000 √ (0,4) 0-00
4 0100 √
8 1000
5 0101
6 0110
9 1001
10 1010
7 0111
13 1101
24
15 1111

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

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 √
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

Example 1 – Phase I (cont.)


2. Compare entries in adjacent groups in column 1 and fill up entries
in column 2:
„ Compare remaining groups
Column 1 Column 2
and complete column 2
„ Divide column 2 into groups 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 √ (5,7) 01-1
7 0111 √ (5,13) -101
13 1101 √ (6,7) 011-
15 1111 √ (9,13) 1-01
(7,15) -111
(13,15) 1-11 28

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

Example 1 – Phase II (cont.)


minterms
m4 m5 m6 m8 m9 m10 m13
(0,4) 0-00 X
(0,8) -000 X
prime implicants

(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:

Minimize: F ( a, b, c, d , e ) = ∑ ( 2,5, 7,8,10,13,15,17,19, 21, 23, 24, 29,31)

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

Example 2 - Phase II: Prime Implicant Chart

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

F ( a, b, c, d , e ) = acd e + bcd e + abe + ce

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

Multiple Output Minimization (cont.)


• Sharing may be possible even when two solutions do
not have a common prime implicant.

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.

F =ab + abc G =ab + abc


With sharing Ö 5 gates with a total of 11 gate inputs.
Ö Shared term in a minimum solution need not be a prime implicant 36

18
Multiple Output Minimization Method

• Look at the 1’s of each function that are not 1’s


of the other function. These must be covered
by prime implicants of that function.

• Look for terms that can be shared. Only the


shared terms need not be prime implicants.

37

Example 2: Two-Output Circuit


F (a , b , c , d )= ∑ (4,5 ,6,8,12 ,13 ) G (a , b , c , d )= ∑ (0,2 ,5 ,6 ,7 ,13 ,14 ,15 )
cd cd
ab 00 01 11 10 ab 00 01 11 10
0 0
0
1 1
0
0 0
1 1 1 1
1 1 1
1
1 1
1
1 1 1
1 1 1
1 1
0
1 0

F =ac d + abd + bc d G=abd + bc + bc d


With sharing Ö 7 gates with a total of 20 gate inputs.

F =ac d + abd + bc G =abd + bc + bd


No sharing Ö 8 gates with a total of 21 gate inputs.
38

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

Example 4: Three Output Circuit


F G H cd
cd cd
ab 00 01 11 10 ab 00 01 11 10 ab 00 01 11 10

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

With sharing Ö 8 gates with a total of 22 gate inputs.

F =ad + bd + c d G =a + bc d H =ad + ac d + bc d

No sharing Ö 10 gates with a total of 25 gate inputs.

40

20

You might also like