Ee2 chapter3 basic_logicgates

Post on 31-May-2015

263 views 0 download

Tags:

Transcript of Ee2 chapter3 basic_logicgates

Apr 12, 2023

Lecturer Name lecturer_email@ite.edu.sg

Contact Number

IT2001PAEngineering Essentials (2/2)

Chapter 3 - Basic Logic Gates

2

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Lesson Objectives

Upon completion of this topic, you should be able to: Relate the operation of basic logic gates such as AND,

OR, NOT, NAND, NOR, EX-OR and EX-NOR, and construct its truth table.

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Specific Objectives

Students should be able to : Explain the use of logic gate. Describe the function of the basic logic gates (i.e. NOT,

AND, NAND, OR, NOR, EX-OR and EX-NOR) with the help of symbol, truth table and its equivalent switching circuit.

Describe how NOT, AND, OR, NOR can be constructed from NAND gates.

Describe how NOT, AND, OR, NOR can be constructed from NOR gates.

4

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Logic Gates

In digital logic system, events are describedas either ‘0’ or ‘1’

Logic 1 Logic 0

Switch ON Switch OFF

Bulb lights up Bulb unlighted

High Low

True False

5 volts 0 volts

2.4V to 5V 0V to 0.4V

5

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Logic Gates

Positive Logic

In a positive logic system, a high voltage is used to represent logicaltrue(1), and a low voltage for logical false (0).In positive logic circuits it is normal to use +5V for true and0V for false.

In a negative logic system, a low voltage is used to representlogical true (1) and a high voltage for a logical false (0).

Negative Logic

6

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Gate

- - it has 2 or more binary inputs and 1 outputit has 2 or more binary inputs and 1 output

GateGateBinaryInputs

Binary Output

7

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

7 Basic Logic Gates

AND gate OR gate INVERTER ( NOT ) gate NAND gate NOR gate XOR gate XNOR gate

8

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table

Table which relates the output of a logic function to all the possible combinations of the inputs.

The number of possible combinations of the inputs is equal to 2N, where N is the number of inputs

Inputs Output

0 0 Depends on the logic function

0 1 Depends on the logic function

1 0 Depends on the logic function

1 1 Depends on the logic function

A logic gate with 2 inputs 22= 4 possible combinations from its inputs

9

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The AND Operation

A

Lamp: Off=0Off=0 Switch: Open=0Open=0 ON=1 Closed=1ON=1 Closed=1

B

L = A . B

10

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of AND Gate

A B LA B L

0 0 0

0 1 0

1 0 0

1 1 1

Lamp : Off = 0 On = 1

Switch : Open =0 Closed=1

11

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The AND Gate

Equation : Y = A.B.C

SymbolSymbol

A

B Y = A . B . CC

12

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Summary of AND Gate

The AND gate produces a HIGH output only when all of the inputs are HIGH

1

11

When any of the inputs is LOW, the output is LOW

0

10

1

00

0

00

13

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of AND Gate

A B CA B C LL

00 0 00 10 0

00 01

00 1 1

1 0 0 01 0 1 0

1 1 0 0

1 1 1 1 Output = 1 only if all inputs are 11 1 1 1

14

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Example

Determine the output waveform for the AND gate shown.

A

B

A

B

Y

0

0

0Y

1

0

0

0

0

0

1

0

0

1

1

1

0

0

0

15

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The OR Operation

Lamp: OFF=OFF= 0 0 ON=1ON=1

B

A

Switch: Open=0 Open=0 Closed=1Closed=1

16

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of OR Gate

A B LA B L

0 0 0

0 1 1

1 0 1

1 1 1

Lamp : OFF =0 ON=1

Switch : Open=0 Closed=1

17

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The OR Gate

Equation : Y = A + B + C

SymbolSymbol

A

BC

Y

18

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Summary of OR Gate

The OR gate produces a HIGH on the output when any of the inputs is HIGH

1

01

The output is LOW only when all the inputs are LOW

0

00

0

11

1

11

19

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of OR Gate

A B CA B C LL

0 0 0 00 10 1

10 01

10 1 1

1 0 0 11 0 1 1

1 1 0 1

1 1 1 1Output = 1 only if any of inputs is 1

20

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Example

Draw the output waveform for the OR gate

A

BYA

B

Y

0

0

0

1

1

1

0

1

1

1

0

1 0

0

0

21

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The NOT Operation (Inverter)SymbolSymbol

Equation

A A

A A

Y = A Y = A

22

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of Inverter

Inputs Output

0 1

1 0

Its logic output is always the inverse of the logic inputs

23

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

NAND Gate

X = A B

A

B

EquationEquation

X = A BX = A B

X = A B

A

B

24

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of NAND Gate

Inputs

A B

0 0

0 1

1 0

1 1

AND

AB

0

0

0

1

NAND

AB

1

1

1

0

25

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Summary of NAND Gate

The NAND gate produces a LOW output only when all the inputs are HIGH

When any of the inputs is LOW , the output will be HIGH

01

1

1

01

0

11

0

01

26

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Example

Draw the output waveform for the NAND gate shown

A

BY

A

B

Y

0

1

1

1

1

0

0

1

1

0

0

1

27

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

NOR Gate

X = A + BA

B

EquationEquation

A

BX = A + B

X = A + BX = A + B

28

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Truth Table of NOR Gate

Inputs

A B

0 0

0 1

1 0

1 1

OR

A+B

0

1

1

1

NOR

A+B

1

0

0

0

29

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Summary of NOR Gate

The NOR gate produces a HIGH output only when all the inputs are LOW

When any of the inputs is HIGH , the output will be LOW

0

01

1

00

0

10

1

10

30

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Example

Draw the output waveform for the NOR gate shown

A

B

A

BY

Y

0

1

0

1

1

0

0

0

1

1

1

0

0

0

1

1

0

0

31

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

EX-NOR Gate

EX-OR Gate

32

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

EX-OR Gate

A

BBAX

A B Y

0 0 0

0 1 1

1 0 1

1 1 0

Its output is High only when the inputs are at different levels.BAX

BABAX

Logic Equation

Truth Table

33

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

EX-NOR Gate

A B Y

0 0 1

0 1 0

1 0 0

1 1 1

Its output is High only when the inputs are at the same levels.BAX

ABBAX

Logic Equation

Truth Table

A

BBAX

34

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Exercise on Timing Diagram

Draw the output waveform X of the EX-OR gate with inputsA and B given below:

A

B

A

B

X

X

35

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Exercise on Timing Diagram

Draw the output waveform X of the EX-NOR gate with inputs A and B given below:A

B

X

A

B

X

36

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Next Lesson