Lecture 6 Universal Gates

32
1 Universal Gates

description

Digital Logic : Universal Gates

Transcript of Lecture 6 Universal Gates

Page 1: Lecture 6 Universal Gates

1

Universal Gates

Page 2: Lecture 6 Universal Gates

2

Review of Boolean algebra

• Just like Boolean logic• Variables can only be 1 or 0

– Instead of true / false

Page 3: Lecture 6 Universal Gates

3

Review of Boolean algebra• Not is a horizontal bar above the number

– 0 = 1– 1 = 0

• Or is a plus– 0+0 = 0– 0+1 = 1– 1+0 = 1– 1+1 = 1

• And is multiplication– 0*0 = 0– 0*1 = 0– 1*0 = 0– 1*1 = 1

__

__

Page 4: Lecture 6 Universal Gates

4

Basic logic gates

• NOT

• AND

• OR

• NAND

• NOR

• XOR

x x

xy

xy xyxyz

zx+yx

yxy

x+y+zz

xy

xy

x+yxy

xÅyxy

Page 5: Lecture 6 Universal Gates

Universal Gate – NANDThis presentation will demonstrate• The basic function of the NAND gate.• How a NAND gate can be used to replace an AND gate, an OR

gate, or an INVERTER gate.• How a logic circuit implemented with AOI(And, OR, Inverter)

logic gates can be re-implemented using only NAND gates.• That using a single gate type, in this case NAND, will reduce

the number of integrated circuits (IC) required to implement a logic circuit.

5

AOI Logic NAND Logic

More ICs = More $$ Less ICs = Less $$

Page 6: Lecture 6 Universal Gates

NAND Gate

6

X Y Z0 0 1

0 1 1

1 0 1

1 1 0

XY

Y X YXZ +

Page 7: Lecture 6 Universal Gates

NAND Gate as an Inverter Gate

7

X Z0 1

1 0

X XZ

XXX (Before Bubble)

Equivalent to Inverter

Page 8: Lecture 6 Universal Gates

NAND Gate as an AND Gate

8

X Y Z0 0 0

0 1 0

1 0 0

1 1 1

XY

YX YXZ

YX

NAND Gate Inverter

Equivalent to AND Gate

Page 9: Lecture 6 Universal Gates

NAND Gate as an OR Gate

9

X Y Z0 0 0

0 1 1

1 0 1

1 1 1

Equivalent to OR Gate

X

YYXY X Y XZ ++

X

NAND GateInverters

Y

Page 10: Lecture 6 Universal Gates

NAND Gate Equivalent to AOI Gates

10

INVERTERORAND

Page 11: Lecture 6 Universal Gates

Process for NAND Implementation1. If starting from a logic expression, implement the design with

AOI logic.

2. In the AOI implementation, identify and replace every AND,OR, and INVERTER gate with its NAND equivalent.

3. Redraw the circuit.

4. Identify and eliminate any double inversions (i.e., back-to-back inverters).

5. Redraw the final circuit.

11

Page 12: Lecture 6 Universal Gates

NAND Implementation

12

Example:Design a NAND Logic Circuit that is equivalent to the AOI circuit shown below.

CA C B +

Page 13: Lecture 6 Universal Gates

NAND Implementation

13

Solution – Step 2

Identify and replace every AND,OR, and INVERTER gate with its NAND equivalent.

Page 14: Lecture 6 Universal Gates

NAND Implementation

14

Redraw the circuit.

Solution – Step 3

Page 15: Lecture 6 Universal Gates

NAND Implementation

15

Identify and eliminate any double inversions.

Solution – Step 4

Page 16: Lecture 6 Universal Gates

NAND Implementation

16

Solution – Step 5

Redraw the circuit.

Page 17: Lecture 6 Universal Gates

Proof of Equivalence

17

C C B

C AC A C BZ

C AC BZ

CA C B

+

+

Page 18: Lecture 6 Universal Gates

AOI vs. NAND

18

IC Type Gates Gate / IC # ICs

74LS04 1 6 1

74LS08 2 4 1

74LS32 1 4 1

Total Number of ICs → 3

IC Type Gates Gate / IC # ICs

74LS00 4 4 1

Total Number of ICs → 1

Page 19: Lecture 6 Universal Gates

Universal Gate – NORThis presentation will demonstrate…• The basic function of the NOR gate.• How an NOR gate can be using to replace an AND gate, an OR

gate or an INVERTER gate.• How a logic circuit implemented with AOI logic gates could be

re-implemented using only NOR gates• That using a single gate type, in this case NOR, will reduce the

number of integrated circuits (IC) required to implement a logic circuit.

AOI Logic NOR Logic

More ICs = More $$ Less ICs = Less $$ 19

Page 20: Lecture 6 Universal Gates

NOR Gate

X Y Z0 0 1

0 1 0

1 0 0

1 1 0

XY

Y X Y XZ +

20

Page 21: Lecture 6 Universal Gates

NOR Gate as an Inverter Gate

X Z0 1

1 0

X XZ

XXX + (Before Bubble)

Equivalent to Inverter

21

Page 22: Lecture 6 Universal Gates

NOR Gate as an OR Gate

X Y Z0 0 0

0 1 1

1 0 1

1 1 1

XY

YX Y XZ ++

Y X +

NOR Gate “Inverter”

Equivalent to OR Gate

22

Page 23: Lecture 6 Universal Gates

NOR Gate as an AND Gate

X Y Z0 0 0

0 1 0

1 0 0

1 1 1

Equivalent to AND Gate

X

YY XY X Y XZ +

X

NOR Gate“Inverters”

Y

23

Page 24: Lecture 6 Universal Gates

NOR Gate Equivalent of AOI Gates

INVERTERORAND

24

Page 25: Lecture 6 Universal Gates

Process for NOR Implementation1. If starting from a logic expression, implement the design with

AOI logic.

2. In the AOI implementation, identify and replace every AND,OR, and INVERTER gate with its NOR equivalent.

3. Redraw the circuit.

4. Identify and eliminate any double inversions. (i.e. back-to-back inverters)

5. Redraw the final circuit.

25

Page 26: Lecture 6 Universal Gates

NOR ImplementationExample:

Design a NOR Logic Circuit that is equivalent to the AOI circuit shown below.

CA C B +

26

Page 27: Lecture 6 Universal Gates

NOR ImplementationSolution – Step 2

Identify and replace every AND,OR, and INVERTER gate with its NAND equivalent.

27

Page 28: Lecture 6 Universal Gates

NOR ImplementationRedraw Circuit.

Solution – Step 3

28

Page 29: Lecture 6 Universal Gates

NOR ImplementationIdentify and eliminate any double inversions.

Solution – Step 4

29

Page 30: Lecture 6 Universal Gates

NOR ImplementationSolution – Step 5

Redraw Circuit.

30

Page 31: Lecture 6 Universal Gates

Proof of Equivalence

B

CA C AC A +

C A C BZ

C A C B

+

+

C

C

A

C BC BCB +

C A C B +

31

Page 32: Lecture 6 Universal Gates

AOI vs NOR

IC Type Gates Gate / IC # ICs

74LS04 1 6 1

74LS08 2 4 1

74LS32 1 4 1

Total Number of ICs → 3

IC Type Gates Gate / IC # ICs

74LS02 7 4 2

Total Number of ICs → 2

32