ceng 241 digital design 1 lecture 1 amirali baniasadi [email protected]

36
CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi [email protected]

Upload: isaiah-proffit

Post on 14-Dec-2015

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

CENG 241Digital Design 1

Lecture 1

Amirali [email protected]

Page 2: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

2

CENG 241: Digital Design 1

Instructor: Amirali Baniasadi (Amir) Office hours: EOW 441, Only by appt. Email: [email protected] Office Tel: 721-8613 Web Page for this class will be at http://www.ece.uvic.ca/~amirali/courses/CENG241/ceng241.html

Text: Digital Design

Fifth edition,

by Morris Mano, Prentice Hall Publishers

Page 3: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

3

Course

Structure

Lectures: Mostly follow textbook.

Reading assignments posted on the web for each week.

Homework: Some from the book some will be posted on the web site.

Quizzes: 3 in class exams. Dates will be announced in advance.

Note that the above is approximate.

Page 4: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

4

Course Problems

Late homework 10% penalty per day up to maximum of 5 days (after that Homework will not be accepted)

Guide to completing assignments Studying together in groups is encouraged Discussion (only) Work submitted must be your own

Page 5: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

5

Course Philosophy

Book to be used as supplement for lectures (If a topic is not covered in the class, or a detail not presented in the class, that means I expect you to read on your own to learn those details)

Regular Homework (10%)

Lab (30%)- Attend orientation @ ELW A359.

Three Quizzes (30%)- Dates will be announced in advance.

Final Exam(30%)

To pass the course you should also pass the lab and the final exam.

Page 6: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

6

What are my expectations?

Stay Positive and Enjoy.

Commitment: Regular study and homework submission

Page 7: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

7

This Lecture

Digital Design? Binary Systems

Page 8: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

8

Binary storage & registers

How do we store binary information?

Binary cell : place to store one bit of information. 0 or 1.

Register: a group of binary cells.

Register transfer: An operation in a digital system

Page 9: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

9

Binary storage & registers

Page 10: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

10

Binary information processing

Example: Add two 10-bit binary numbers

Page 11: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

11

Binary logic

Binary logic deals with variables that take on two discrete values and operations that assume logical meaning.

Logic gates: electronic circuits that operate on one or more input signals to produce an output signal.

Example x y x AND y0 0 00 1 01 0 01 1 1

Page 12: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

12

Electrical signals

Two values: 0 or 1

Page 13: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

13

Symbols for digital logic circuits

Page 14: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

14

Input-Output signals for gates

Page 15: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

15

Gates with multiple inputs

Page 16: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

16

Boolean Algebra

Basic definitions:

x+0=0+x=x x.1=1.x=x x.(y+z)=(x.y)+(x.z) x+(y.z)=(x+y).(x+z) x+x’=1 x.x’=0

Page 17: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

17

Boolean Algebra Theorems

x+x=x x.x=x x+1=1 x.0=0 x+x.y=x x.(x+y)=x

Page 18: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

18

Boolean Algebra Functions

examples: F1=x+y’.z

F2=x’.y’.z+x’.y.z+x.y’ =x’.z(y’+y)+x.y’ F2=x’.z+x.y’

A Boolean Function can be represented in many algebraic forms

We look for the most simple form

Page 19: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

19

Boolean Function: Example

Truth table

x y z F1 F2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0

A Boolean Function can be represented in only one truth table forms

Page 20: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

20

Boolean Function Implementation

y’

Y’.z

Page 21: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

21

Boolean Function Implementation

X’.y’.z

X’.y.z

X.y’

X.y’

X’.z

Page 22: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

22

Complement of a function

DeMorgan’s theorem: (x+y)’=x’.y’

(x.y)’=x’+y’

What about three variables?

(x+y+z)’=? Let A=x+y (A+z)’=A’.z’=(x+y)’.z’=x’.y’.z’

(x.y.z)’=x’+y’+z’

Page 23: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

23

Canonical & Standard Forms

Consider two binary variables x, y and the AND operation four combinations are possible: x.y, x’.y, x.y’, x’.y’ each AND term is called a minterm or standard products

for n variables we have 2n minterms

Consider two binary variables x, y and the OR operation four combinations are possible: x+y, x’+y, x+y’, x’+y’ each OR term is called a maxterm or standard sums

for n variables we have 2n maxterms

Canonical Forms: Boolean functions expressed as a sum of minterms or product of

maxterms.

Page 24: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

24

Minterms

x y z Terms Designation

0 0 0 x’.y’.z’ m0 0 0 1 x’.y’.z m1 0 1 0 x’.y.z’ m2 0 1 1 x’.y.z m3 1 0 0 x.y’.z’ m4 1 0 1 x.y’.z m5 1 1 0 x.y.z’ m6 1 1 1 x.y.z m7

Page 25: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

25

Maxterms

x y z Designation Terms

0 0 0 M0 x+y+z

0 0 1 M1 x+y+z’

0 1 0 M2 x+y’+z

0 1 1 M3 x+y’+z’

1 0 0 M4 x’+y+z

1 0 1 M5 x’+y+z’

1 1 0 M6 x’+y’+z

1 1 1 M7 x’+y’+z’

Page 26: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

26

Boolean Function: Exampl

How to express algebraically

Question: How do we find the function using the truth table?

Truth table example: x y z F1 F2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0

Page 27: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

27

Boolean Function: Exampl

How to express algebraically

1.Form a minterm for each combination forming a 1 2.OR all of those terms

Truth table example: x y z F1 minterm 0 0 0 0 0 0 1 1 x’.y’.z

m1 0 1 0 0 0 1 1 0 1 0 0 1 x.y’.z’

m4 1 0 1 0 1 1 0 0 1 1 1 1 x.y.z

m7

F1=m1+m4+m7=x’.y’.z+x.y’.z’+x.y.z=Σ(1,4,7)

Page 28: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

28

Boolean Function: Exampl

How to express algebraically

Truth table example: x y z F2

minterm 0 0 0 0 m0 0 0 1 0 m1 0 1 0 0 m2 0 1 1 1 m3 1 0 0 0 m4 1 0 1 1 m5 1 1 0 1 m6 1 1 1 1 m7

F2=m3+m5+m6+m7=x’.y.z+x.y’.z+x.y.z’+x.y.z=Σ(3,5,6,7)

Page 29: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

29

Boolean Function: Exampl

How to express algebraically

1.Form a maxterm for each combination forming a 0 2.AND all of those terms

Truth table example: x y z F1 maxterm 0 0 0 0 x+y+z M0 0 0 1 1 0 1 0 0 x+y’+z M2 0 1 1 0 x+y’+z’ M3 1 0 0 1 1 0 1 0 x’+y+z’

M5 1 1 0 0 x’+y’+z M6 1 1 1 1

F1=M0.M2.M3.M5.M6 = л(0,2,3,5,6)

Page 30: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

30

Boolean Function: Exampl

How to express algebraically

Truth table example: x y z F2 maxterm 0 0 0 0 x+y+z M0 0 0 1 0 x+y+z’

M1 0 1 0 0 x+y’+z

M2 0 1 1 1 1 0 0 0 x’+y+z M4 1 0 1 1 1 1 0 1 1 1 1 1

F=M0.M1.M2.M4=л(0,1,2,4)=(x+y+z).(x+y+z’).(x+y’+z).(x’+y+z)

Page 31: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

31

Maxterms & Minterms: Intuitions

Minterms: If a function is expressed as SUM of PRODUCTS, then if

a single product is 1 the function would be 1.

Maxterms: If a function is expressed as PRODUCT of SUMS, then if

a single product is 0 the function would be 0.

Canonical Forms: Boolean functions expressed as a sum of minterms or

product of maxterms.

Page 32: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

32

Standard Forms

Standard From: Sum of Product or Product of Sum

Page 33: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

33

Nonstandard Forms

Nonstandard From: Neither a Sum of Product nor Product of Sum

Page 34: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

34

Implementations

Three-level implementation vs. two-level implementation

Two-level implementation normally preferred due to delay importance.

Page 35: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

35

Digital Logic Gates

Page 36: CENG 241 Digital Design 1 Lecture 1 Amirali Baniasadi amirali@ece.uvic.ca

36

Summary?

• Read textbook & readings• Be up-to-date• Solve exercises• Come back with your input & questions for discussion

• Binary systems, Binary logic.