36
May 24, 2022 Lecturer Name [email protected] Contact Number IT2001PA Engineering Essentials (2/2) Chapter 3 - Basic Logic Gates

Ee2 chapter3 basic_logicgates

  • Upload
    ck-yang

  • View
    263

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ee2 chapter3 basic_logicgates

Apr 12, 2023

Lecturer Name [email protected]

Contact Number

IT2001PAEngineering Essentials (2/2)

Chapter 3 - Basic Logic Gates

Page 2: Ee2 chapter3 basic_logicgates

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.

Page 3: Ee2 chapter3 basic_logicgates

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.

Page 4: Ee2 chapter3 basic_logicgates

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

Page 5: Ee2 chapter3 basic_logicgates

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

Page 6: Ee2 chapter3 basic_logicgates

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

Page 7: Ee2 chapter3 basic_logicgates

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

Page 8: Ee2 chapter3 basic_logicgates

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

Page 9: Ee2 chapter3 basic_logicgates

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

Page 10: Ee2 chapter3 basic_logicgates

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

Page 11: Ee2 chapter3 basic_logicgates

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

Page 12: Ee2 chapter3 basic_logicgates

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

Page 13: Ee2 chapter3 basic_logicgates

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

Page 14: Ee2 chapter3 basic_logicgates

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

Page 15: Ee2 chapter3 basic_logicgates

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

Page 16: Ee2 chapter3 basic_logicgates

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

Page 17: Ee2 chapter3 basic_logicgates

17

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

The OR Gate

Equation : Y = A + B + C

SymbolSymbol

A

BC

Y

Page 18: Ee2 chapter3 basic_logicgates

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

Page 19: Ee2 chapter3 basic_logicgates

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

Page 20: Ee2 chapter3 basic_logicgates

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

Page 21: Ee2 chapter3 basic_logicgates

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

Page 22: Ee2 chapter3 basic_logicgates

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

Page 23: Ee2 chapter3 basic_logicgates

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

Page 24: Ee2 chapter3 basic_logicgates

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

Page 25: Ee2 chapter3 basic_logicgates

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

Page 26: Ee2 chapter3 basic_logicgates

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

Page 27: Ee2 chapter3 basic_logicgates

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

Page 28: Ee2 chapter3 basic_logicgates

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

Page 29: Ee2 chapter3 basic_logicgates

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

Page 30: Ee2 chapter3 basic_logicgates

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

Page 31: Ee2 chapter3 basic_logicgates

31

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

EX-NOR Gate

EX-OR Gate

Page 32: Ee2 chapter3 basic_logicgates

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

Page 33: Ee2 chapter3 basic_logicgates

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

Page 34: Ee2 chapter3 basic_logicgates

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

Page 35: Ee2 chapter3 basic_logicgates

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

Page 36: Ee2 chapter3 basic_logicgates

36

Chapter 3 - Basic Logic Gates

IT2001PA Engineering Essentials (2/2)

Next Lesson