You are on page 1of 41

CpE358/CS381 Switching Theory and Logical Design Class 2

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-45

Todays Material
Fundamental concepts of digital systems (Mano Chapter 1) Binary codes, number systems, and arithmetic (Ch 1) Boolean algebra (Ch 2) Simplification of switching equations (Ch 3) Digital device characteristics (e.g., TTL, CMOS)/design considerations (Ch 10) Combinatoric logical design including LSI implementation (Chapter 4) Hazards, Races, and time related issues in digital design (Ch 9) Flip-flops and state memory elements (Ch 5) Sequential logic analysis and design (Ch 5) Synchronous vs. asynchronous design (Ch 9) Counters, shift register circuits (Ch 6) Memory and Programmable logic (Ch 7) Minimization of sequential systems Introduction to Finite Automata

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-46

Basic Concepts in Set Theory

Elements y t

x S y S t S

S = { x, y }

Set R

Set S + Operators

x i y = [if x S and if y S c = x i y S ]

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-47

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and +, + is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-48

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and +, + is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-49

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and +, + is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-50

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and +, + is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-51

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and +, + is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-52

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and *, * is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-53

Properties
1. Closure S is closed with respect to operator if

a, b S, aib S

2. Associative A binary operator on set S is associative if

a, b, c S, (aib )ic = ai(bic )

3. Commutative A binary operator on set S is commutative if

a, b S, aib = bia

4. Identity A set S has an identity element e with respect to operator if

x S, e S : x ie = ei x = x

5. Inverse A set S with identity element e with respect to operator has an inverse if

x S, y S : x i y = e

6. Distributive For a set S with operators and *, * is distributive over if

x, y , z S, x ( y iz ) = ( x y )i( x z ) S
Copyright 2004 Stevens Institute of Technology All rights reserved

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-54

Mathematical Systems

Elements y Z Special Elements

Boolean Algebra
W + Operators Commutative Associative Closure Inverse Distributive Properties
www.UandiStar

Complement

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-55

Boolean Algebra
Elements y Z W Special Elements + Operators Properties Closure Associative Complement x

Boolean Algebra

Commutative

Inverse

Distributive

There are two operators: AND () and OR (+)

NOTE: I am using symbols that look similar and act similarly to +(plus) and (times) would act for normal arithmetic. They are not PLUS and TIMES!!!

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-56

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Special Elements + Operators Properties Closure Associative Complement x

Boolean Algebra

Commutative

Inverse

Distributive

There are two operators: AND () and OR (+)

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-57

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Complement + Operators Properties Closure Associative Special Elements x

Boolean Algebra

0 0 0

1 0 1

Commutative

Inverse

0 1

Distributive

There are two operators: AND () and OR (+) Closure with respect to AND () x, y {0,1}, x i y {0,1} Closure with respect to OR (+) x, y {0,1}, x + y {0,1}

x
+ 0 0 1 1 1 1

0 1

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-58

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W + Operators Properties Closure Associative Complement x

There are two identity elements: Z=0 is the identity with respect to OR W=1 is the identity element with respect to AND Special Elements x
0 1

Boolean Algebra

0 1

0 0

0 1

x {0,1}, x i1 = x
There are two operators: AND () and OR (+)

Commutative

Inverse

Distributive

x
+ 0 0 1 1 1 1

0 1

x {0,1}, x + 0 = x

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-59

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Complement + Operators Properties Closure Associative Special Elements x

Boolean Algebra

0 0 0

1 0 1

Commutative

Inverse

0 1

Distributive

There are two operators: AND () and OR (+) Commutative with respect to AND () x, y {0,1}, x i y = y i x Commutative with respect to OR (+) x, y {0,1}, x + y = y + x

x
+ 0 0 1 1 1 1

0 1

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-60

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Complement + Operators Properties Closure Associative Special Elements x

Boolean Algebra

0 0 0

1 0 1

Commutative

Inverse

0 1

Distributive

There are two operators: AND () and OR (+) AND () is distributive over OR(+) x, y , z {0,1}, x i( y + z ) = ( x i y ) + ( x iz ) OR (+) is distributive over AND() x, y , z {0,1}, x + ( y iz ) = ( x + y )i( x + z )

x
+ 0 0 1 1 1 1

0 1

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-61

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Complement + Operators Properties Closure Associative Special Elements x

Boolean Algebra

0 0 0

1 0 1

Commutative

Inverse

0 1

Distributive

There are two operators: AND () and OR (+) There is a complement element with respect to AND and OR

x
+ 0 0 1 1 1 1

0 1

x {0,1}, x ' {0,1) : x + x' =1 xix ' = 0

Alternate ways to express complement: x ' = x = x


www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-62

Boolean Algebra
There are at least two elements (0 and 1)
Elements y Z W Complement + Operators Properties Closure Associative Special Elements x

Boolean Algebra

0 0 0

1 0 1

Commutative

Inverse

0 1

Distributive

There are two operators: AND () and OR (+) AND () is associative x, y , z {0,1}, x i( y iz ) = ( x i y )i z OR (+) is associative x, y , z {0,1}, x + ( y + z ) = ( x + y ) + z

x
+ 0 0 1 1 1 1

0 1

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-63

Boolean Algebra
There are at least two elements x
0 0 0 0 0 0
Elements y Z x

1 0
W Special Elements + Operators Closure

Boolean Algebra
Complement

0 0

Associative

Commutative

Inverse

Distributive Properties

x
+ 0 0

There are two operators: AND () and OR (+)



1 1 1 1 1 1


1 1

It is possible to define a Boolean Algebra with more than two elements, e.g., {0,,,1}. All the properties defined above can be shown to be valid.
www.UandiStar
Copyright 2004 Stevens Institute of Technology All rights reserved

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-64

Proof by Truth Tables


Show that the Boolean Algebra defined above is distributive:
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 c 0 1 0 1 0 1 0 1 b+c 0 1 1 1 0 1 1 1 a (b+c) 0 0 0 0 0 1 1 1 a b 0 0 0 0 0 0 1 1 a c 0 0 0 0 0 1 0 1 (a b)+(a c) 0 0 0 0 0 1 1 1 + 0 0 1 0 1 0 0 0

1 0 1

0 1

x
1 1 1

x, y , z {0,1}, x i( y + z ) = ( x i y ) + ( x iz ) x, y , z {0,1}, x + ( y iz ) = ( x + y )i( x + z )


CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved

Addition is also distributive Multiplication is not


www.UandiStar

1-65

Theorems and Postulates of Boolean Algebra


x +0 = x
x i1 = x

x + x' =1
x+x =x
x +1= 1

xix ' = 0
xix = x

x i0 = 0

( x ')' = x
x+y =y+x

x iy = y i x x i( y iz ) = ( x i y )iz

x + (y + z) = ( x + y ) + z

x i( y + z ) = x i y + x iz ( x + y )' = x 'i y '


x + x iy = x

x + ( y iz ) = ( x + y )i( x + z ) ( x i y )' = x '+ y '


x + x iy = x
Duality: Interchange identity Interchange operator DeMorgans Law Absorption

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-66

Operator Precedence
1. 2. 3. 4. Parenthesis NOT AND OR
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

x i y + z = ( x i y ) + z x i( y + z )

x y 0 0 0 0 0 0 1 1

(x y)+z 0 1 0 1 0 1 1 1

(y+z) 0 1 1 1 0 1 1 1

x (y+z) 0 0 0 0 0 1 1 1

www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved

1-67

Boolean Functions
F ( x, y , z ) = x i y + x 'iz

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

F(x,y,z) 0 1 0 1 0 0 1 1

F(x,y,z)

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-68

Boolean Functions Expressed as Timing Diagrams

x y z F(x,y,z)

This is an idealized timing diagram: There are no delays through gates, all events occur at instants of time.
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved

1-69

Simplifying Boolean Functions


Fa ( x, y , z ) = x 'i y 'iz + x 'i y iz + x i y '
x

x 'i y 'iz
y

x 'i y iz
F(x,y,z) z

x iy '
www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-70

Simplifying Boolean Functions


Fa ( x, y , z ) = x 'i y 'iz + x 'i y iz + x i y '
x y

= x 'izi( y '+ y ) = x 'iz + x i y '


x 'i y 'iz

+ x iy '

x 'i y iz
F(x,y,z) z

x iy '
www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-71

Simplifying Boolean Functions


Fb ( x, y , z ) = x 'iz + x i y '
x y

x 'iz
F(x,y,z) z

x iy '
www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-72

Verifying Simplification
Fb ( x, y , z ) = x 'iz + x i y '

Fa ( x, y , z ) = x 'i y 'iz + x 'i y iz + x i y '


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 x y z 0 1 0 0 0 0 0 0 x y z 0 0 0 1 0 0 0 0 x y 0 0 0 0 1 1 0 0

x z 0 1 0 1 0 0 0 0

Fa(x,y,z) 0 1 0 1 1 1 0 0

Fb(x,y,z) 0 1 0 1 1 1 0 0

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-73

Gate Complexity of Boolean Expression


Gate requirements can be estimated directly from expression for Boolean function One 3-input OR operation

F ( x, y , z ) = x i y + x 'iz + y iz
Three 2-input AND operations Expression can be simplified algebraically:

x i y + x 'iz + y iz = x i y + x 'iz + y iz( x + x ') = x i y + x 'iz + x i y iz + x 'i y iz = x i y i(1 + z ) + x 'izi(1 + y ) = x i y + x 'iz F ( x, y , z ) = x i y + x 'iz
Two 2-input AND operations

One 2-input OR operation

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-74

More Logic Functions


AND and OR function are not often seen as such in real logic designs. NOT-AND and NOT-OR are easier to implement in hardware and are generally faster NOT-AND NAND = NOT-OR = NOR

The bubble can be placed on any lead to indicate inversion. Two other common logic functions are:

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-75

More on DeMorgans Law

( x i y )' = x '+ y '


NAND NAND

( x + y )' = x 'i y '


NOR NOR
www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-76

Functions of Two Inputs


There are 16 possible functions of two inputs
x 0 0 1 1 y 0 1 0 1 F0 0 0 0 0 Z e r o F1 0 0 0 1 A N D F2 0 0 1 0 i n h i b F3 0 0 1 1 x F4 0 1 0 0 i n h i b F5 0 1 0 1 y F6 0 1 1 0 X O R F7 0 1 1 1 O R F8 1 0 0 0 N O R F9 1 0 0 1 = F10 1 0 1 0 y F11 1 0 1 1 y -> x F12 1 1 0 0 x F13 1 1 0 1 x -> y F14 1 1 1 0 N A N D F15 1 1 1 1 O n e

Name of Fn

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-77

Generic Boolean Functions


A function can be expressed in terms of min-terms or max-terms
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 Minterm x y z x y z x y z x y z x y z x y z x y z xyz Name m0 m1 m2 m3 m4 m5 m6 m7 Maxterm x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z Name M0 M1 M2 M3 M4 M5 M6 M7

An alternative description of a function is to only specify the minterms

F ( x, y , z ) = x 'i y 'iz + x i y 'iz '+ x i y iz = m1 + m4 + m7 = (1, 4,7)

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-78

Sum of Products vs. Product of Sums

x y z x y z x y z x y z
x y z

x y z
(1,4,7)

x y z

x y z x y z x y z

(0,2,3,5,6)

xyz

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-79

Conversion between () and ()

m = {m0 , m1, m2 ,, m7 } F ( x, y , z ) = (a, b, c, d ) F ( x, y , z ) = ma + mb + mc + md F '( x, y , z ) = (m {ma , mb , mc , md }) = (me , mf , mg , mh ) = me + mf + mg + mh F ( x, y , z ) = (me + mf + mg + mh )' = me 'imf 'img 'imh ' = Me iMf iMg iMh F ( x, y , z ) = (e, f , g, h )
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved

1-80

Design Considerations
These two designs are logically equivalent: x y z x y z x y z
x y z

(1,4,7) x y z

x y z
xyz

x y z

(1,4,7)

y z

x
y z x y z+ x y z y z+ y z

y z
yz

But this one incurs two more gate delays


www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-81

Other Basic Logic Gates

y Exclusive OR (XOR)
0 1

x
0 0 1 1 1 0

x y = x 'i y + x i y '

x
= 0 1 0 1 0 1

y Exclusive NOR (equivalence)

0 1

(x

y ) = x 'i y '+ x i y
www.UandiStar
Copyright 2004 Stevens Institute of Technology All rights reserved

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

1-82

Digital Logic Families


RTL Resistor Transistor Logic Original logic family used in ICs VERY slow and power hungry by recent standards Mostly replaced by TTL in 1960s-70s TTL Transistor-Transistor Logic 74xx series - workhorse of logic designs Mostly replaced by CMOS with 74xCxx equivalents ECL Emitter Coupled Logic Popular in 1970s Very high speed High power consumption MOS Metal Oxide Silicon High density, introduced for memory applications CMOS Complementary Metal Oxide Silicon Extremely low quiescent power consumption Wide range of speed/power tradeoffs Industry standard today
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved

1-83

Summary
Fundamental concepts of digital systems (Mano Chapter 1) Binary codes, number systems, and arithmetic (Ch 1) Boolean algebra (Ch 2) Simplification of switching equations (Ch 3) Digital device characteristics (e.g., TTL, CMOS)/design considerations (Ch 10) Combinatoric logical design including LSI implementation (Chapter 4) Hazards, Races, and time related issues in digital design (Ch 9) Flip-flops and state memory elements (Ch 5) Sequential logic analysis and design (Ch 5) Synchronous vs. asynchronous design (Ch 9) Counters, shift register circuits (Ch 6) Memory and Programmable logic (Ch 7) Minimization of sequential systems Introduction to Finite Automata

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-84

Homework 2 due in Class 4


Problems 2-1, 2-5, 2-15, 2-19. Show all work

www.UandiStar

CpE358/CS381 Switching Theory and Logical Design Summer-1 2004

Copyright 2004 Stevens Institute of Technology All rights reserved

1-85

You might also like