03_Logic_Gates - Iowa State University

advertisement
CprE 281:
Digital Logic
Instructor: Alexander Stoytchev
http://www.ece.iastate.edu/~alexs/classes/
Logic Gates
CprE 281: Digital Logic
Iowa State University, Ames, IA
Copyright © Alexander Stoytchev
Administrative Stuff
This is the official class web page:
http://www.ece.iastate.edu/~alexs/classes/2014_Spring_281/
A link was e-mailed to you. Let me know if you did not get
that e-mail.
Administrative Stuff
• HW1 is out
• It is due on Wednesday Jan 22 @ 4pm.
• Submit it on paper before the start of the lecture
Administrative Stuff
The labs and recitations start next week:
• Section F: Tuesdays, 12:10 - 3:00pm (Coover Hall, room 2050)
• Section K: Tuesdays, 3:10 - 6:00pm (Coover Hall, room 2050)
• Section J: Wednesdays, 12:10 - 3:00pm (Coover Hall, room 2050)
• Section G: Wednesdays, 6:10 - 9:00pm (Coover Hall, room 2050)
Labs Next Week
Figure 1.5 in the textbook: An FPGA board.
Labs Next Week
• Please download and read the lab assignment for
next week before you go to your lab section.
• You must print the answer sheet and do the prelab
before you go to the lab.
• The TAs will check your answers at the beginning
of the lab.
Administrative Stuff
• No class next Monday (University Holiday)
• The lab schedule is posted on the class web page
A Binary Switch
x = 0
x = 1
(a) Two states of a switch
S
x
(b) Symbol for a switch
[ Figure 2.1 from the textbook ]
A Light Controlled by a Switch
S
Battery
x
Light
(a) Simple connection to a battery
[ Figure 2.2a from the textbook ]
A Light Controlled by a Switch
S
Power
supply
x
Light
(b) Using a ground connection as the return path
[ Figure 2.2b from the textbook ]
The Logical AND function
(series connection of the switches)
Power
supply
S
S
x1
x2
Light
[ Figure 2.3a from the textbook ]
The Logical OR function
(parallel connection of the switches)
S
x1
Power
supply
S
Light
x2
[ Figure 2.3b from the textbook ]
A series-parallel connection
of the switches
S
X1
Power
supply
S
S
X3
Light
X2
[ Figure 2.4 from the textbook ]
An Inverting Circuit
R
Power
supply
x
S
Light
[ Figure 2.5 from the textbook ]
The Three Basic Logic Gates
x
x
NOT gate
x1
x2
x1 ×
x2
AND gate
x1
x2
x1 + x2
OR gate
[ Figure 2.8 from the textbook ]
Truth Table for NOT
x
x
x
x
0
1
1
0
Truth Table for AND
x1
x2
x1 ×
x2
Truth Table for OR
x1
x2
x1 + x2
Truth Tables for AND and OR
[ Figure 2.6b from the textbook ]
Logic Gates with n Inputs
x1
x2
x1 ×
x2 ×
×xn
xn
x1
x2
x1 + x2 + + xn
xn
AND gate
OR gate
[ Figure 2.8 from the textbook ]
Truth Table for 3-input AND and OR
[ Figure 2.7 from the textbook ]
Example of a Logic Circuit
Implemented with Logic Gates
x
x
x
1
2
3
f = (x + x ) ×x
1
2
3
[ Figure 2.8 from the textbook ]
Example of a Logic Circuit
Implemented with Logic Gates
x
x
x
1
2
3
f = (x + x ) ×x
1
2
3
[ Figure 2.8 from the textbook ]
Network Analysis
[ Figure 2.10 from the textbook ]
Network Analysis
[ Figure 2.10 from the textbook ]
Network Analysis
[ Figure 2.10 from the textbook ]
Network Analysis
[ Figure 2.10 from the textbook ]
Network Analysis
[ Figure 2.10 from the textbook ]
Timing Diagram
[ Figure 2.10 from the textbook ]
Truth Table for this Network
[ Figure 2.10 from the textbook ]
Functionally Equivalent Networks
[ Figure 2.10 from the textbook ]
Functionally Equivalent Networks
[ Figure 2.10 from the textbook ]
The XOR Logic Gate
[ Figure 2.11 from the textbook ]
The XOR Logic Gate
[ Figure 2.11 from the textbook ]
Addition of Binary Numbers
[ Figure 2.12 from the textbook ]
Addition of Binary Numbers
[ Figure 2.12 from the textbook ]
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
?
Addition of Binary Numbers
AND
Addition of Binary Numbers
Addition of Binary Numbers
?
Addition of Binary Numbers
XOR
Addition of Binary Numbers
Addition of Binary Numbers
Addition of Binary Numbers
a
b
s0
s1
The following examples came from this book
[ Platt 2009 ]
[ Platt 2009 ]
[ Platt 2009 ]
Questions?
THE END
Download