basic gates 3.1 basic digital logic: nand and nor gates ©paul godin created september 2007 last...

38
Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Upload: jean-payne

Post on 05-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.1

Basic Digital Logic:NAND and NOR Gates

©Paul GodinCreated September 2007Last Update Sept 2009

Page 2: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.2

The Universal Gates:NAND and NOR

Page 3: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.3

Combinational logic

◊ How would your describe the output of this combinational logic circuit?

A

B

Z

Page 4: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.4

NAND Gate

◊ The NAND gate is the combination of an NOT gate with an AND gate.

The Bubble in front of the gate is an inverter.

A

B

Z

Page 5: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.5

NAND Gate

◊ IEEE Symbol

◊ Boolean equations for the NAND gate:

&

A●B = x

AB = x

The triangle is the same as the bubble.

Page 6: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.6

Combinational logic

◊ How would your describe the output of this combinational logic circuit?

B

AZ

Page 7: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.7

NOR gate

◊ The NOR gate is the combination of the NOT gate with the OR gate.

The Bubble in front of the gate is an inverter.

B

AZ

Page 8: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.8

NOR Gate

◊ IEEE Symbol for a NOR gate:

◊ Boolean equation for a NOR gate:

≥1

A+B = x

Page 9: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.9

Exercise 1

Complete the Truth Table for the NAND and NOR Gates

Input Output

0 0

0 1

1 0

1 1

Input Output

0 0

0 1

1 0

1 1

NAND NOR

Hint: Think of the AND and OR truth tables. The outputs for the NAND and NOR are inverted.

Page 10: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.10

Exercise 2

◊ Turn the NAND and NOR gates into inverter (NOT) gates. Hint: Look at the Truth Table.

Page 11: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.11

Exercise 3

Complete the following timing diagram

A

B

Z

A

B

Z

Page 12: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.12

Exercise 4

Complete the following timing diagram

A

B

Z

A

B

Z

Page 13: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.13

Exercise 5

◊ Draw the following circuit: AB + BC

Page 14: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.14

Exercise 6

◊ Describe the function of a NAND gate, starting with the term “If any input...”

◊ Describe the function of a NOR gate, starting with the term “If any input...”

Page 15: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.15

DeMorgan

Page 16: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.16

DeMorgan Theorem

◊ The DeMorgan Theorem describes a method for converting between AND/NAND and OR/NOR operations.

◊ The theorem states:

A ● B = A + B

A + B = A ● B

“Break the bar and change the sign”

Page 17: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.17

DeMorgan

An example of DeMorgan:

AB + BC

ABC

1

2

3

4

Original Equation

DeMorgan applied to NOR expression

Double inversions cancel

Simplified expression

AB ● BC

AB ● BC

Page 18: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.18

DeMorgan Exercise 1

Use DeMorgan to simplify the following expressions

A+B+C

AB

AB + C+D

“Break the bar and change the sign”

Page 19: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.19

Universal Gates

◊ The NAND and NOR gates are considered Universal Gates. They can be used to create any other gate.

◊ Using universal gates is an important aspect of digital logic design.

Examples provided in class.

Page 20: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.20

NAND and NOR as NOT

ZA

VccA Z

Method 1

A Z

Method 1

A Z

Method 2

A

Z

Method 2

Page 21: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.21

NAND and NOR as AND

ZB

A

ZB

A

AB = AB = A+B (DeMorgan)

A

ZB

Page 22: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.22

NAND and NOR as OR

A+B = A+B = AB (DeMorgan)

ZB

A

A

ZB

ZB

A

Page 23: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.23

Universal Gates Exercise 1

◊ Convert NAND as NOR

◊ Convert NOR as NAND

Page 24: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.24

Example: Universal Gates

Convert the following circuit to NAND only:

Convert each of the gates in the circuit to its NAND equivalent and progressively re-draw the circuit.

Additional Examples given in class

Page 25: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.25

Active Input States

Page 26: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.26

Digital 1’s and 0’s

◊ In a binary system, the logic 1’s are as important as the logic 0’s. A “0” is a signal also.

◊ When the “0” forces a change it is called Active Low (the low causes the action).

◊ When the “1” forces a change it is called Active High (the high causes the action).

Page 27: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.27

Comparison of Active States

A logic 0 causes the LED

to light up

A logic 1 causes the LED

to light up

Vcc

Page 28: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.28

Comparison of Active Inputs

A ZB

Active Low InputsActive High Output

Active High InputsActive Low Output

ZBA

Page 29: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Alternate Gate Representations

Basic Gates 3.29

Page 30: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Comparison of Active Inputs

A ZB

Active Low InputsActive High Output

Active High InputsActive Low Output

ZBA

Basic Gates 3.30

Page 31: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Bubble to Bubble

◊ Alternate gate representations can make circuit analysis faster.

◊ A bubble attached to a bubble means the bubbles cancel.

=Bubbles Cancel

Basic Gates 3.31

Page 32: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Bubble to Bubble Cancellation Example

2 Z1ABC

In this example with bubble-to-bubble representation, the output bubble from gate 1

cancels with the input bubble from gate 2.

This makes it easy to quickly determine that if either A or B inputs are low, outcome Z is low.

2 Z1ABC

Basic Gates 3.32

Page 33: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Alternate Representations

◊ The “bubble” on a gate represents inversion.

◊ In many cases it is easier to follow the circuit logic if “bubble” outputs are linked to “bubble” inputs

◊ Cancelled bubbles helps make the active input state more easily visible for troubleshooting

Basic Gates 3.33

Page 34: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Example use of Alternate Representation

◊ The output is active when the input state is a 101

◊ Note how much easier it is to see the active input at a glance using a bubble instead of a NOT gate.

Z

CBA

Basic Gates 3.34

Page 35: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.35

Example of Alternate Representation

A

ZB

ZB

A

A

ZB

Equals

Equals

A+B = AB (DeMorgan)

Page 36: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.36

Alternate Representation

ZBA

Z

A Z A Z

AZB

AB

ZBA

ZBA Z

A ZB

AB

ZBA

Page 37: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.37

Alternate Representation Exercise

Z

A ZB

AB

Z

A ZB

AB

Identify the gate that is alternately represented

Page 38: Basic Gates 3.1 Basic Digital Logic: NAND and NOR Gates ©Paul Godin Created September 2007 Last Update Sept 2009

Basic Gates 3.38

END

101101101

©Paul R. Godinprgodin°@ gmail.com