# EE/CE 6301: Advanced Digital Logic

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

1

Session 03
Review of Digital Design
(Dr. Balsara & Dr. Bhatia’s lectures for EE3320)

2

1

Gates and Logic Optimization

3

Summary of Digital Logic Gates
IEEE Symbols

1

&

≥1

4

2

n 6 3 . there will be at most 2 2 functions.Summary of Digital Logic Gates IEEE Symbols 1 & ≥1 = 5 Logic Functions Using 2 Variables x+y x+y y xx x y y xy x+y xy 0 y x 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 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 For n variables.

(Complements) ……..) • Theorems with two or three variables: X ⋅Y = Y ⋅ X (X ⋅Y ) ⋅ Z = X ⋅ (Y ⋅ Z ) X +Y = Y + X (X + Y ) + Z = X + (Y + Z ) K (Commutativ ity ) K (Associativity ) X ⋅Y + X ⋅ Z = X ⋅ (Y + Z ) X + X ⋅Y = X X ⋅Y + X ⋅Y = X X ⋅ X ⋅K ⋅ X = X (X + Y ) ⋅ (X + Z ) = X + Y ⋅ Z K (Distributivity ) X ⋅ (X + Y ) = X K (Covering ) (X + Y ) ⋅ (X + Y ) = X K (Combining ) X + X +K+ X = X K (Generalized idempotenc y ) • DeMorgan’s Laws: ( X1 + X2 + .Boolean (Switching) Algebra • Axioms: 0·0=0 1·1=1 0·1=1·0=0 X·1=X X·0=0 X·X=X X·X=0 1+1=1 0+0=0 0+1=1+0=1 X+0=X …….(Identities) X+1=1 .(Idempotency) X+X=1 ……..(Involution) 7 • Theorems with one variable X =X Boolean (Switching) Algebra (cont.. ⋅ Xn ( X1 ⋅ X2 ⋅ .... + Xn ) = X1 ⋅ X2 ⋅ . ⋅ Xn ) = X1 + X2 + . + Xn 8 4 ..……(Null Elements) X+X=X ……..

Summary of Minterms & Maxterms Row 0 1 2 3 4 5 6 7 Inputs x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 Minterms Term Notation x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ xyz m0 m1 m2 m3 m4 m5 m6 m7 Maxterms Term x+y+z x+y+z’ x+y’+z x+y’+z’ x’+y+z x’+y+z’ x’+y’+z x’+y’+z’ Notation M0 M1 M2 M3 M4 M5 M6 M7 9 Mi = mi Examples • Sum of Product (SoP): F (x . M1 .1 . z ) = ∑ (m0 . m3 .7 ) = xyz + xyz + xyz = m 0 + m 3 + m7 • Product of Sum (PoS): F (x .7) = ∏(0. y .4) = ∏ (M0 . M 4 ) • Conversion: ∑(1.3.3.4.2. y .6) m1 +m4 +m7 = M0 ⋅ M2 ⋅ M3 ⋅ M5 ⋅ M6 10 5 . z ) = (x + y + z )(x + y + z )(x + y + z ) = M0 ⋅ M1 ⋅ M 4 = ∏ (0.5. m7 ) = ∑ (0.

11 Simplification Examples f (x. y. z) = x y + z + z y = = = = = = (( ) ) x(y + z)y + z y x yy + x z y+ z y x y + x z y + z y ⋅1 xy+ zy x +1 x y + z y ⋅1 xy+ zy ( ) ( ) 12 6 . the rules of simplification may be different. it is often necessary to optimize the algebraic expressions. • Depending on the optimization criteria. z) = x y z + x y + x y z = xy z + z + xy = xy+ xy = x+x y = 1⋅ y =y ( ) F (x.Algebraic Simplification • To reduce circuit complexity and to maximize circuit performance. y.

.. .......) (w+ x)y+ z + wxz= ( w + x )y ⋅ z ) + wxz = ( (w+ x) + y)z) + wx z = ((wx + y)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) = w + y x + y z +wx z = wx + wy + x y + yy z + wx z = 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 = b (a + c ) .) • Prove the consensus theorem: xy + x z + yz = xy + x z 14 7 . SOP form POS form 13 Simplification Examples (cont...Simplification Examples (cont.

16 8 . • A K-map is a multi-dimensional tabulation of function values.Simplification Examples (cont. The cell contains the value of the function for the corresponding minterm.) • 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. • Each minterm is assigned an entry (a cell) in the table.

c) f(a.c.b) b 1 a 1 m100 c f(a.d) ab cd c 00 01 11 10 00 m0000 m0001 m0011 m0010 01 m0100 m0101 m0111 m0110 11 m1100 m1101 m1111 m1110 b a 10 m1000 m1001 m1011 m1010 d 18 9 .) • 1 variable K-map: f(a) a 0 1 • 3-variable K-map: f(a.c) m0 m1 a bc b 00 01 m001 m101 11 m011 m111 10 m010 m110 0 m000 • 2 variable K-map: f(a.b.d) f(a.c.b.b.) • 4-variable K-map: f(a.b) a b 0 0 m00 m01 a 1 m10 m11 17 Karnaugh Maps (cont.b.Karnaugh Maps (cont.

z)=wx + wy + y z + x z # INV = 1 # AND2 = 4 # OR2 = 3 F (w. y.y. x.z) = z + x y # INV = 2 # AND2 = 1 # OR2 = 1 For example 1 SOP is SMALLER F(x.z) = y+ z x+ z # INV = 2 # AND2 = 1 # OR2 = 2 ( )( ) 19 Logic Minimization: Example 2 wx yz 0 0 0 1 1 1 1 0 SOP: 00 01 11 10 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 POS: F (w. y. x.y.Logic Minimization: Example 1 yz 0 1 yz 0 1 x 00 01 11 10 x 00 01 11 10 1 1 1 1 1 1 1 0 0 1 0 1 1 Sum of Products: Product of Sums: F(x. z)=(w+ z)(x + y) # INV = 1 # AND2 = 1 # 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 .

mark with a star. 23 group 2 group 3 group 4 1111 Example 1 – Phase I (cont. c. (0. These are the prime implicants.Example 1 – Phase I • Minimize f ( a. 7.) 2.10.4) 0-00 12 .5.15 ) 1. d ) = ∑ ( 4.13) + d ( 0. b. 6. Column 1 0 4 8 5 6 9 10 7 13 15 Column 2 0000 √ 0100 √ 1000 0101 0110 1001 1010 0111 1101 1111 24 Compare groups 0 and 1: mark those that can be combined by a check mark (√ ).8.9. 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 m4 0100 m5 0101 m6 0110 (d) m7 0111 m8 1000 m9 1001 m10 1010 m13 1101 (d) m15 1111 group 0 0000 group 1 0100 1000 0101 0110 1001 1010 0111 1101 After grouping we only need to compare minterms from adjacent groups Don’t cares are included in this step. Compare and combine entries in adjacent groups in column 1 and fill up entries in column 2: If an entry cannot be combined.

) 2.4) (0.8) 0-00 -000 25 Example 1 – Phase I (cont.8) (4.) 2. Compare entries in adjacent groups in column 1 and fill up entries in column 2: compare groups 0 and 1 Column 1 0 4 8 5 6 9 10 7 13 15 0000 √ 0100 √ 1000 √ 0101 0110 1001 1010 0111 1101 1111 Column 2 (0.4) (0. Compare entries in adjacent groups in column 1 and fill up entries in column 2: compare groups 1 and 2 Column 1 0 4 8 5 6 9 10 7 13 15 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 √ √ √ √ Column 2 (0.5) 0-00 -000 010- 26 13 .Example 1 – Phase I (cont.

) 2.15) 0-00 -000 01001-0 10010-0 01-1 -101 0111-01 -111 1-11 28 14 .9) (8.10) (5.6) (8.13) (6. Compare entries in adjacent groups in column 1 and fill up entries in column 2: Compare remaining groups and complete column 2 Divide column 2 into groups Column 1 0 4 8 5 6 9 10 7 13 15 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 √ √ √ √ √ √ √ √ √ √ Column 2 (0.7) (9.) 2.8) (4.4) (0.6) (8.5) (4.9) (8.Example 1 – Phase I (cont.4) (0.5) (4.7) (5.13) (7.15) (13.10) 0-00 -000 01001-0 10010-0 27 Example 1 – Phase I (cont. Compare entries in adjacent groups in column 1 and fill up entries in column 2: compare groups 1 and 2 Column 1 0 4 8 5 6 9 10 7 13 15 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 √ √ √ √ √ √ √ Column 2 (0.8) (4.

6. 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.4) (0.. we first select the essential prime implicants.6) (8. rows of the table).9) (8.13) (6.15) 0-00 -000 01001-0 10010-0 01-1 -101 0111-01 -111 11-1 * * √ √ (4. – The minterms are listed along the horizontal axis (i.e. Compare entries in adjacent groups in column 2 and fill up entries in column 3. – Essential Prime implicants are listed along the vertical axis of the table (i. – Entry (i.10) (5.7.15) (13.7) (9. —It is used to select a minimum set of prime implicants. —Similar to the Karnaugh map.) • Prime Implicant Chart: It is the second part of the Quine-McCluskey algorithm.) 3. columns of the table).Example 1 – Phase I (cont.8) (4. and then we select enough prime implicants to cover all the minterms of the function.5.5) (4..7) (5.13) (7.e.15) -1-1 * * * * √ √ √ * √ √ 29 Example 1 (cont. Repeat until nothing can be combined. Column 1 0 4 8 5 6 9 10 7 13 15 Column 2 Column 3 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 √ √ √ √ √ √ √ √ √ √ (0.13.7) 01-- (5. 30 15 .

b.7) (5.13) (4.7.) minterms m4 (0. c . The prime implicant which contains that minterm will be in the minimal expression. They need not be covered by the final expression m5 m6 m8 m9 m10 m13 • • Look for minterms that are covered by a single prime implicant.4) prime implicants (0.10) (9. 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.8) (8.5.13.15) 0-00 -000 10010-0 1-01 01--1-1 X X X X X X X X X X X X X Do not include don’t cares in this table. F ( a . d ) = a b + a b d + a c d 32 16 .6.9) (8.Examples yz wx 00 00 01 11 10 01 11 10 Some implicants 1 1 1 1 1 1 1 1 1 Prime Implicants 31 Example 1 – Phase II (cont.

c. b.Phase II: Prime Implicant Chart m2 0-010 010-0 -1000 0-1-1 10--1 1-1-1 --1-1 X X X X X X X X X X X X X X X X X X X X X X X m5 m7 m8 m10 m13 m15 m17 X X X m19 m21 m23 m24 m29 m31 F ( a.31) 2 8 5 10 17 24 7 13 19 21 15 23 29 31 00010 01000 00101 01010 10001 11000 00111 01101 10011 10101 01111 10111 11101 11111 √ √ √ √ √ √ √ √ √ √ √ √ √ √ 0-010 010-0 -1000 001-1 0-101 -0101 100-1 0-111 -0111 011-1 -1101 10-11 101-1 1-101 -1111 1-111 111-1 * * * √ √ √ √ √ √ √ √ √ √ √ √ √ √ 0-1-1 -01-1 0-1-1 --101 -01-1 --101 10--1 --111 -11-1 -11-1 1-1-1 1-1-1 * √ √ --1-1 * --1-1 * √ √ * 33 Example 2 . b.Example 2 .19.Phase I: Minimize: F ( a. 23. d . 29.5.13.15. 21. 7.8. c. d . 24. e ) = acd e + bcd e + abe + ce 34 17 . e ) = ∑ ( 2.10.17.

3.2.7) a bc 00 01 11 10 00 01 11 10 0 1 1 1 F =ac + ab 1 1 0 1 1 1 1 1 G=ac + ab a c a b a c Two separate Systems (no sharing) → 6 gates and a total of 12 gate inputs One System (sharing) → 5 gates and a total of 10 gate inputs F G 35 Multiple Output Minimization (cont.6.6) a bc G(a. b .6.c) =∑(0.3.1 .6) a bc 00 01 11 10 00 01 11 10 0 1 1 1 1 F =ab + abc No sharing 0 1 G =ab + bc 1 1 1 6 gates with a total of 13 gate inputs.7) a bc G(a. 36 Shared term in a minimum solution need not be a prime implicant 18 .b. c ) = ∑ (0.Multiple Output Minimization F (a.b.c)=∑(2. F =ab + abc With sharing G =ab + abc 5 gates with a total of 11 gate inputs. F (a .c)=∑(1.b.) • Sharing may be possible even when two solutions do not have a common prime implicant.

13 ) ab cd G (a .14 . F =ac d + abd + bc No sharing G =abd + bc + bd 8 gates with a total of 21 gate inputs. 37 Example 2: Two-Output Circuit F (a . c .5 . • Look for terms that can be shared. Only the shared terms need not be prime implicants.12 .2 .5 .6 .Multiple Output Minimization Method • Look at the 1’s of each function that are not 1’s of the other function. 38 19 . d )= ∑ (0. d )= ∑ (4.6.13 .8.15 ) ab cd 00 01 11 10 00 01 11 10 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 F =ac d + abd + bc d With sharing G=abd + bc + bc d 7 gates with a total of 20 gate inputs. b . These must be covered by prime implicants of that function. c . b .7 .

13 ) ab cd 00 01 11 10 00 01 11 10 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 F =ac + ac d + abc With sharing G=ac + ac d + abc 6 gates with a total of 16 gate inputs. c .6.10 .9. 40 20 .10 .7 . b .11 .3 .12 . c . d )= ∑ (0.8 .2 . d )= ∑ (0.4 . F =ac + ad + bc No sharing G =ac + c d + ab 8 gates with a total of 18 gate inputs. G =a + bc d H =ad + ac d + bc d No sharing 10 gates with a total of 25 gate inputs.11 ) ab cd G (a . 39 Example 4: Three Output Circuit F ab cd G 00 01 11 10 ab cd 00 01 11 10 H cd ab 00 00 01 11 10 00 01 11 10 1 1 1 1 1 1 1 1 1 1 00 01 11 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 01 11 10 F =ad + ac d + bc d + bc d G =a + bc d H =ad + ac d + bc d With sharing F =ad + bd + c d 8 gates with a total of 22 gate inputs.Example 3: Two-Output Circuit F (a . b .4.