digital logic designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...subject information...

44
DIGITAL LOGIC DESIGN (ELE 241) Ali Mustafa Lecture # 01 & 02

Upload: others

Post on 09-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

DIGITAL LOGIC DESIGN (ELE 241)

Ali Mustafa Lecture # 01 & 02

Page 2: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Instructor Introduction

Ali Mustafa

BSC Computer Engineering

(Comsats Pakistan)

MS Mobile Communication

(University of Bradford England)

Worked as

GSM Engineer in I-Track

Telecom Engineer in UFONE

WiMAX Engineer in NUST

Page 3: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Get in Touch with Instructor

Class Meeting Times & Locations: Monday 11:30 am – 01:30 am Wed 11:30 am – 1:00 pm

Instructor Name: Mr.Ali Mustafa

Instructor Telephone: 057-9316329-137

Instructor E-Mail Address: [email protected]

Instructor Office Hours: Thursday 9:00 am -4:30 pm

Instructor Office Location : Room # 24 EE Department

Course Web : http://digitallogicdesign.weebly.com/

Page 4: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Subject Information

SUBJECT CODE & NAME:

ELE 241, DLD

CREDIT HRS :

03-01

CONTACT HRS :

03 per week

TEXT BOOK :

Digital Design (4th Edition) M. Morris Mano, Michael D. Ciletti

REFERANCE BOOK :

Digital Fundamentals (9th Edition) Floyd, Shanjay sharma

Page 5: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Objectives

Understand theory of operation for most of digital

electronic devices.

Analyzing how can a digital computer perform the

complex operations based on simply manipulating

bits (zeros and ones).

Design of digital logic systems.

Page 6: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Topics to be covered

Digital Systems and Binary Systems

Boolean Algebra and Logic Gates

Gate-Level Minimization

Combinational Logic

Synchronous Sequential Logic

Registers And Counters

Digital Integrated Circuits

Page 7: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Evaluation Plan

The Course assessment will be made up of the

following four components;

1. Sessionals --- 25%

2. Quizzes --- 15%

3. Assignments --- 10%

4. Final Examination --- 50%

5. Presentation

Page 8: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Students are responsible for:

1. Attendance. If a student misses more than 3 class sessions they may be dropped.

2. Arriving to each class on time. Late comers are disruptive to the class.

3. Letting the instructor know if you require any special considerations such as special seating.

4. Turning off all cell phones while in class.

5. Conducting themselves in a professional manner; refraining from talking in class except as part of a classroom discussion or to ask a question.

Page 9: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Students are responsible for:

6. Knowing and adhering to due dates for all assignments, mid-term and final exam.

7. Taking or acquiring class notes.

8. Knowing COMSATS policies and procedures, This includes plagiarism and cheating.

9. Letting the instructor know if you are having difficulty with any part of the course. Special time can be arranged for individual assistance.

10. All assignments and quizzes will be submitted on A4 Page. Any other paper is not acceptable and simply marked zero.

Page 10: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Student Introduction

Welcome to COMSATS

Welcome to this Course

Brief Introduction

About yourself

Last semester experience

Suggestions

NOTE: Medium of communication will be English in the class.

Page 11: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

What’s the importance of digital logic

Page 12: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Flash back on Digital logic history

1850: George Boole invents Boolean algebra.

1946: ENIAC: 1s telectronic computer

18,000 vacuum tubes

5,000 operations per second

1,000 square feet

It really cost a lot of power to turn on the switch?

Page 13: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

And it went on………

1947: Shockley, Brittain, and Bardeen invent the transistor

replaces vacuum tubes

enable integration of multiple devices into one package

1955: TRADIC: AT&T Bell Laboratories announced the first fully transistorized

1958: 1stIntegrated Circuit

1972: Intel’s 8088 1stmicroprocessor.

Page 14: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Applications of logic design

Conventional computer design

CPUs, busses, peripherals

Networking and communications

Phones, modems, routers

Embedded products

Cars

Toys

Appliances

Entertainment devices, e.g. MP3 players, PS3, and many others

Page 15: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Classification of Signals/Systems

They are classify into two categories

Analog Signal:

They have infinite number of different magnitudes or values.

They varies continuously with time.

Digital Signal:

A signal is known as digitised if it has finite number of

magnitudes.

Page 16: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Analog Signals

An analog or analogue signal is any variable signal

continuous in both time and amplitude. e.g. Sound

ExampleThey have infinite number of values

They are continuous in nature

Source of signals can be signal generator

Sine wave is an example

Page 17: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Digital Signals

Digital describes any system based on discontinuous

data or events.

Computers are digital machines because at their most

basic level they can distinguish between just two

values, 0 and 1, or off and on.

Number of values can be finite (2,8,16)

Nature of signals are discrete

Source can be computer or A to D converter

Binary signal is an example

Page 18: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Advantages of Analog signals

They are used in

Filter design

Amplifier circuits

Signal Generators

Motor Speed Controller

Page 19: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Drawback of Analog System

Less accurate

Less reliable

Memory/Storage is an issue

Performance changes as temperature varies

Distortion and noise

Page 20: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Advantages of Digital System

It manipulates discrete element of information such

as decimal digits or alphabets.

Signal in digital system represented by a binary

digit called a bit.

Discrete elements of information are represented by

a group of bits called Binary Codes.

They are reliable,flexible,programmable and

updating technology.

Page 21: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Basic Digital Devices

Logic Gates

Combinational circuits

Sequential circuits

ICs

Page 22: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Logic Gates

Digital Logic Gates are the basic unit to build any

digital circuit.

It operates on a number of binary inputs to perform

a logical function.

There are different types of gates available ,e.g

AND,OR,NOT,NAND,EX-OR,NOR

Page 23: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Combinational Circuits

When number of logical gates are connected

together to produce specified output by

combination of input variables.

It has no memory element.

Combinational Logic Circuit N Inputs M Outputs

Page 24: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Sequential Circuits

The circuit in which digital outputs are required to

be generated in accordance with the specified

sequence.

It has the memory interface (Flip Flop)

Combinational

Circuit

Memory Element Input

Output

Page 25: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Integrated IC

For complex circuits which involves number of

gates,IC is used.

Small Scale IC (SSI) 20 gates circuit

Medium Scale IC(MSI) 20-200

Large Scale IC(LSI) 200 – 200,000

Very Large Scale IC(VLSI) 1,000,000

Page 26: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Binary Logic

Logic is defined as a statement which is true ,if

some condition is satisfied or vice versa.

Binary logic has two levels

High (1)

Low (0)

Lamp

OFF , LOW (Logic 0)

Negative

ON , High (Logic 1)

Positive

Page 27: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Negative & Positive Logic

Electrical Signals [ voltages or currents ] that exist throughout a digital system is in either of two recognizable values [ logic 1 or logic 0 ]

Logic 0 and 1 can be represented by another way of logic

Positive Logic Logic 0 (Low) 0V

Logic 1 (High ) +5V

Negative Logic Logic 0 (Low) +5V

Logic 1 (High ) 0V

Page 28: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Introduction to Number System

Number system is basis for counting various items.

Modern computer operated in binary number system.

Decimal,Octal,Hexa,BCD represents more bits in a

binary numbers in a compressed form.

Base/Radix of the number systems are 2,8,10,16

Base decides the total no of digits available in a system E.g Binary Base 2 0 or 1

Page 29: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Introduction to Number System

Each digit position represent different multiples of

base.

3 4 9 . 2 5

Radix Point

Power 0 Power1 Power 2 Power -1 Power -2

Page 30: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Different Number Systems

Decimal Base 10 0 to 9

Binary Base 2 0 or 1

HexaDecimal Base 16 0 to 15

Page 31: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Decimal Number System

In decimal number system we can express any

decimal number in units,ten ,hundresd and

thousand.

E.g Represent binary number 98.72 in power of 10

9 8 . 7 2

N = 9*101 + 8 * 100 + 7*10-1 + 2*10-2

Page 32: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Binary Number System

E.g Represent binary number 1101.101 in power of

2 & find its decimal equivalent.

N = 1 1 0 1. 1 0 1

1*23 + 1*22 +0*21 + ...........................................

8 + 4+ 0+ 1+ 0.5+ 0+ 1.25

N

= (13.625)10

Page 33: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Octal Number System

Represent 0-7 digits in 3 bit format 000-421

E.g Represnt octal number 567 in power of 8 & find

its decimal equivalent.

N = 5 6 7

5*82 + 6*81 + 7*80

320 + 48 + 7

(375)10

Page 34: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Hexadecial Number System

DECIMAL BINARY HEX

0 0000 0

1 0001 1

2 0010 2

3 0011 3

4 0100 4

5 0101 5

6 0110 6

7 0111 7

8 1000 8

9 1001 9

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

Invalid state for Decimal

Page 35: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Hexadecimal Number System

4 bits representation 0000 - 8421

Represnt hexadecial number 3FD in power of 16 &

find the decimal equivalent.

N = 3 F D

3*162 + 15*161 + 13*160

768 + 240 + 13

(1021)10

Page 36: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Binary to Octal Conversion

Convert 111101100 to octal

Solution: 111 101 100

7 5 4

(754)8

Page 37: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Octal to Binary Conversion

Convert (634)8 to Binary

Solution: 6 3 4 110 011 100

(110011100)

Page 38: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Binary to Hex

Convert 1101100010011011 binary into hex.

Solution: 1101 1000 1001 1011

D 8 9 B

(D89B)16

Page 39: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Hex to Binary

Convert (3FD)16 to Binary

Solution: 3 F D

0011 1111 1101

(001111111101)2

Page 40: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Octal to Hexadecimal

Convert (615)8 to hex

Solution : 6 1 5 110 001 101 Binary

Now we will change binary into hex

0001 1000 0101

1 8 B

3 zero’s added to

the left

Page 41: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Hexa to Octal

Convert (25B)16 to octal

Solution : 2 5 B

0010 0101 1011 Binary

Now we will convert convert into octal (Set of three bits)

001 001 011 011

( 1 1 3 3 )8

Page 42: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Example

Convert decimal 37 into binary

37 2

18

36

1 LSB

18 2

9

18

0

9 2

4

8

1

4 2

2

4

0

2 2

1

2

0

1 2

0

0

1 MSB

Binary = 100101

Page 43: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Self TasK

Convert decimal 214 to octal

Determine Base 1st

Ans = (326)8

Page 44: Digital Logic Designdigitallogicdesign.weebly.com/uploads/1/3/5/4/13541180/...Subject Information SUBJECT CODE & NAME: ELE 241, DLD CREDIT HRS : 03-01 CONTACT HRS : 03 per week TEXT

Class Exercises

Convert (475.25)8 to decimal

Convert (9B2.1A)16 to decimal

Convert (3102.12)4 to decimal