introduction to computer engineering by richard e. haskell basic logic gates module m1.1 section 3.1

21
Introduction to Computer Engineering by Richard E. Haskell Basic Logic Gates Module M1.1 Section 3.1

Post on 21-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Introduction to Computer Engineering by Richard E. Haskell

Basic Logic Gates

Module M1.1

Section 3.1

Introduction to Computer Engineering by Richard E. Haskell

Basic Logic Gates

• NOT, AND, and OR Gates

• NAND and NOR Gates

• DeMorgan’s Theorem

• Exclusive-OR (XOR) Gate

Introduction to Computer Engineering by Richard E. Haskell

X Y

Y = !X

NOT

NOT Gate -- Inverter

X Y

01

10

Introduction to Computer Engineering by Richard E. Haskell

NOT

• Y = !X

• Y = X’

• Y = X

• Y = X

Introduction to Computer Engineering by Richard E. Haskell

NOT

X !X !!X = X

X !X !!X0 1 01 0 1

Introduction to Computer Engineering by Richard E. Haskell

AND GateAND

X

Y

Z

Z = X & Y

X Y Z0 0 00 1 01 0 01 1 1

Introduction to Computer Engineering by Richard E. Haskell

AND

• X & Y• X Y• X Y• X * Y• XY

U

V

Introduction to Computer Engineering by Richard E. Haskell

OR Gate

OR

X

YZ

Z = X # Y

X Y Z0 0 00 1 11 0 11 1 1

Introduction to Computer Engineering by Richard E. Haskell

OR

• X # Y• X + Y• X V Y• X U Y

Introduction to Computer Engineering by Richard E. Haskell

NAND GateNAND

X

Y

Z

Z = !(X & Y)

X Y Z0 0 10 1 11 0 11 1 0

Introduction to Computer Engineering by Richard E. Haskell

NAND Gate

NOT-AND

X

Y

Z

W = X & Y

Z = !W = !(X & Y)

X Y W Z0 0 0 10 1 0 11 0 0 11 1 1 0

W

Introduction to Computer Engineering by Richard E. Haskell

NOR Gate

NOR

X

YZ

Z = !(X # Y)

X Y Z0 0 10 1 01 0 01 1 0

Introduction to Computer Engineering by Richard E. Haskell

NOR Gate

NOT-OR

X

Y

W = X # Y

Z = !W = !(X # Y)

X Y W Z0 0 0 10 1 1 01 0 1 01 1 1 0

ZW

Introduction to Computer Engineering by Richard E. Haskell

NAND Gate

X

Y

X

Y

Z Z

Z = !(X & Y) Z = !X # !Y

=

X Y W Z0 0 0 10 1 0 11 0 0 11 1 1 0

X Y !X !Y Z0 0 1 1 10 1 1 0 11 0 0 1 11 1 0 0 0

Introduction to Computer Engineering by Richard E. Haskell

De Morgan’s Theorem-1

!(X & Y) = !X # !Y

• NOT all variables• Change & to # and # to &• NOT the result

Introduction to Computer Engineering by Richard E. Haskell

NOR Gate

X

YZ

Z = !(X # Y)

X Y Z0 0 10 1 01 0 01 1 0

X

YZ

Z = !X & !Y

X Y !X !Y Z0 0 1 1 10 1 1 0 01 0 0 1 01 1 0 0 0

Introduction to Computer Engineering by Richard E. Haskell

De Morgan’s Theorem-2

!(X # Y) = !X & !Y

• NOT all variables• Change & to # and # to &• NOT the result

Introduction to Computer Engineering by Richard E. Haskell

De Morgan’s Theorem

• NOT all variables

• Change & to # and # to &

• NOT the result

• --------------------------------------------

• !X # !Y = !(!!X & !!Y) = !(X & Y)

• !(X & Y) = !!(!X # !Y) = !X # !Y

• !X & !Y = !(!!X # !!Y) = !(X # Y)

• !(X # Y) = !!(!X & !Y) = !X & !Y

Introduction to Computer Engineering by Richard E. Haskell

Exclusive-OR Gate

X Y ZXOR

XY

Z

Z = X $ Y

0 0 00 1 11 0 11 1 0

Introduction to Computer Engineering by Richard E. Haskell

X Y

X !X Y !Y

Exclusive-OR Gate

0 0 1 1 0 0 00 1 1 0 1 0 11 0 0 1 0 1 11 1 0 0 0 0 0

X Y !X !Y !X&Y X&!Y Z

Introduction to Computer Engineering by Richard E. Haskell

ProblemX Y

X !X Y !Y

Z

Write the logic equation for Z in terms of X and Y