Using Digital Logic and Technology in the 21st Century

advertisement
Using Digital Logic and Technology in the
21st Century Classroom
Presenters
• Tony White
(twhite@neenah.k12.wi.us)
– Technology & Engineering Teacher at Neenah HS
• Lisa O’Neill
(loneill@neenah.k12.wi.us)
– Math Teacher at Neenah HS
LogiSim Software Needed - Free
http://ozark.hendrix.edu/~burch/logisim/
DOWNLOAD NOW
1
Using Digital Logic and Technology in the
21st Century Classroom
History
o Neenah HS implemented Project Lead the Way (PLTW) in 2009-10
Cross-Curricular Exposure
o Identify students in ALL curricular areas – Peak students interest in STEM
Year 1
o Trained 2 Technology teachers in Introduction to Engineering Design (IED)
Year 2
o Trained 1 Technology teacher & 2 Science teachers in Principles of
Engineering (POE)
Year 3
o Trained 1 Technology teacher & 1 Math teacher in Digital Electronics (DE)
2
Using Digital Logic and Technology in the
21st Century Classroom
Co-Teaching
PLTW Summer Training 2011 – Digital Electronics
o Technology & Math teacher discussed how digital logic would be great to teach to
Math classes
Fall 2011
o Advanced Geometry Class – In math classes we teach Logic along with proofs.
o Instead of teaching the old (boring) way of logic wanted to incorporate a more
rigorous and relevant way to teach.
o Math & Technology teacher collaborated and co-taught the Advanced Geometry
class using the digital logic portion of Digital Electronics to teach logic and proofs.
3
Cross-Curricula Teaching
Why use Digital Electronics
in Math Courses
It is an exact science
4
Truth Tables & Logic Expressions
Advanced Geometry and
Digital Electronics
Proof Machine Project
5
Truth Tables & Logic Expressions
Objective 1
Introduction to Digital Logic (Basics)
This presentation will demonstrate how to…
A.
B.
C.
D.
What are the 1’s and 0’s in Logic
Constructing a truth table
1.
2 Inputs

General Problem

Math Based Problem
2.
3 Inputs

Math Based Problem
Write a Sum-Of-Products (SOP) logic expression from a truth table
Given design specifications (i.e., word problem) create a Truth Table and Write SOP logic
Expression
EQUALS
Design
Specifications
X
Y
OUT
0
0
0
0
1
0
1
0
1
1
1
0
Truth Table
OUT  X Y
EQUALS
EQUALS
Logic
Expression
End
Product
6
A. What are the 1’s and 0’s in Logic?
• 1’s and 0’s are the heart and soul of computer
language. This is binary. Binary is the number
system that computers understand
• Typically in the world of computers, and in the
case of TRUTH TABLES
0’s
mean off or false
1’s
mean on or true
7
B. Constructing A Truth Table (Example 1)
• A truth table shows how a logic design’s output
respond to ALL combinations of possible inputs.
• A logic design with N inputs will have 2N input
combinations.
3 Inputs
2 Inputs
Input 1
Input 2
Output
0
0
0
0
1
0
1
1
0
1
0
1
Input 1
Input 2
Input 3
Output
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
1
1
1
1
1
All possibilities
(This is known for all Truth Tables)
8
1. Construct a Truth Table-2 Inputs (example #2)
Create a truth table to represent this situation:
I want to pick all girls in the class who have glasses.
The “truth” or how you get “picked” is to be a girl AND to have glasses.
Step 1) How many Inputs?
= 2 (Girls & Glasses)
Step 2) 2N = 22 = 4 Columns
Step 3) Create Truth Table with 4 Columns
Step 4) Label Input 1 & Input 2
Input 1
GIRL
Input 2
GLASSES
Output
Girls with
Glasses
0
0
0
Step 6) Fill in 0s & 1s --- All possible solutions
0
1
0
Step 7) Fill in Outputs
* This is an “AND” problem
* We only care when
Girl “AND” Glasses are True or “1”
1
0
0
1
1
1
Step 5) Label Output
9
1. Construct a Truth Table-2 Inputs (example #3)
Create a truth table to represent this situation:
“Polygons that are squares”.
The “truth” is” only the polygons that are squares.
1) Identify the inputs
What make a square a square?
Number of sides, sides the same
2) Create the truth table
What row are you concerned with?
Why?
THAT”S where the TRUTH located for
this problem! HOW DO YOU
know?????
4 sides?
Sides ≅?
SQUARE?
0
0
0
0
1
0
1
0
0
1
1
1
10
2. Construct a Truth Table-3 Inputs (example #4)
Create a truth table to represent this situation:
“What makes a polygon a Right Isosceles Triangle”.
The “truth” is” only the polygons THAT ARE Right Isosceles Triangles.
#of sides
2 sides ≅ ?
0
0
0
0
0
0
1
0
0
1
0
0
2) Create the truth tableDIFFERENT THIS TIME!
2N = 23 = 8 Columns
What row are you concerned with?
Why?
0
1
1
0
1
0
0
0
1
0
1
0
THAT”S where the TRUTH located for
this problem! HOW DO YOU
know?????
1
1
0
0
1
1
1
1
1) Identify the inputs
What make Right Isosceles Triangle?
Number of sides, two sides the same
right angle
rt. Angle?
rt.isos. Δ?
C. Logic Expression From Truth Table (example #5)
• Write the Minterm adjacent to every row in the truth table that contains a one
in the output column.
• WE ARE ONLY CONCERENED WHERE THE OUTPUTS ARE 1.
• Write the Sum-Of-Products (SOP) logic expression by summing together all of
the MinTerms.
Ex. X = 1
X =0
Example
Write the SOP logic expression for the output F5 in the truth table below.
X
Y
Z
F5
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
1
 XYZ
1
0
0
1
 XYZ
1
0
1
0
1
1
0
1
1
1
1
0
F5  X Y Z  X Y Z  X Y Z  X Y Z
 XYZ
MinTerms
SOP Logic Expression
 XYZ
12
Practice #1: T/T→Logic Expression
Example
Write the SOP logic expression for the output F6 in the truth
table below.
Solution
A
B
C
D
F6
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
1
1
1
0
0
0
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
13
Answer Key Provided
D. Truth Table from Design Specs (example #6)
• Create a
1)
2)
3)
4)
Truth Table
Write MinTerms
Write SOP
Write Logic Expression
Example
A large fuel tank has sensors that monitor temperature and pressure. Both
sensors output 0 if they are within safety range. An alarm will sound if
either sensor indicates an unsafe condition is present. Create a truth table
for this logic design.
Assignment :
• P: Pressure Sensor → 0=Safe / 1=Unsafe
• T: Temperature Sensor → 0=Safe / 1=Unsafe
• A: Alarm → 0=Alarm Off / 1=Alarm On
14
D. Truth Table from Design Specs - ANSWER
Example
A large fuel tank has sensors that monitor temperature and pressure. Both
sensors output a logic LOW if they are within safety range. An alarm will sound if
either sensor indicates an unsafe condition is present. Create a truth table for this
logic design.
1. Truth Table
Assignment :
• P: Pressure Sensor → 0=Safe / 1=Unsafe
• T: Temperature Sensor → 0=Safe / 1=Unsafe
• A: Alarm → 0=Alarm Off / 1=Alarm On
P
T
A
0
0
0
0
1
1
 PT
1
0
1
 PT
1
1
1
 PT
3. Logic Expression
2. MinTerms
APTPTPT
15
Introduction to LogiSim software
Objective 2
This presentation will demonstrate how to…
A.
B.
C.
D.
Constructing a truth table – 3 Inputs
Write a Sum-Of-Products (SOP) logic expression from a truth table
Create a truth table from a set of design specifications (i.e., word problem)
Design Class Problem on LogiSim
Switch = Pin
Inverter
AND Gate
OR Gate
LED
16
Example #7
Try on own before next slide
Your teacher keeps her final exams in her office. For security reasons, she would like you to
design an alarm system for her office. The office has a window and door that are equipped
with sensors that output a one when they are secured (i.e., closed). When the alarm system
is turned on with a key, the siren should sound if either the window or door is unsecured
(i.e., opened).
Assignment Name____________________________
Truth Table
_____ 5
Write MinTerms
_____ 5
Write Logic Expression
_____ 5
•
•
•
•
K
D
W
S
MinTerms
K : Key → 0=System Off / 1=System On
D : Door Sensor → 0=Open / 1=Closed
W : Window Sensor → 0=Open / 1=Closed
S : Siren → 1=On / 0=Off
Logic Expression
Siren = ____________________________
17
Class Example ANSWER
Your teacher keeps her final exams in her office. For security reasons, she would like you to
design an alarm system for her office. The office has a window and door that are equipped
with sensors that output a one when they are secured (i.e., closed). When the alarm system is
turned on with a key, the siren should sound if either the window or door is unsecured (i.e.,
opened).
MinTerms
K
D
W
S
Assignment Name____________________________
Truth Table
_____ 5
0
0
0
0
Write MinTerms
_____ 5
0
0
1
0
Write Logic Expression
_____ 5
0
1
0
0
0
1
1
0
1
0
0
1
 KDW
1
0
1
1
 K DW
1
1
0
1
 KDW
1
1
1
0
•
•
•
•
K : Key → 0=System Off / 1=System On
D : Door Sensor → 0=Open / 1=Closed
W : Window Sensor → 0=Open / 1=Closed
S : Siren → 1=On / 0=Off
Logic Expression
K D W  K DW  K D W
Siren = ____________________________
18
Download LogiSim
http://ozark.hendrix.edu/~burch/logisim/
19
Introduction to LogiSim
Step 1) How many Inputs --- How many Pins Needed
Step 2) Need 2 Inverters --- K is always ON
Step 3) Need 3 AND Gates --- One for each Input
Step 4) Need 3 OR Gates --- One for each Input
Step 5) Need 1 LED --- Under Input/Output
Layout Example
20
Introduction to LogiSim
Need to add wires
* Before Inverter means On/True/1
* After Inverter means Off/False/0
Step 5) What makes each AND Gate True
Top AND Gate
= KD’W’
Middle AND Gate
= KD’W
Bottom AND Gate
= KDW’
21
Introduction to LogiSim
ADD Wires for Top AND Gate = KD’W’
22
Introduction to LogiSim
ADD Wires for Top AND Gate = KD’W
23
Introduction to LogiSim
ADD Wires for Top AND Gate = KDW’
24
Introduction to LogiSim
Add wires from AND Gates to OR Gates
Add wire from OR Gate to LED
25
Example #7 on LogiSim
26
Example #7 on Multisim
27
Construct a Truth Table-3 Inputs
Class Problem – Do on own
Polygons that have 4 sides the same OR opposite sides parallel AND 4 right angles
Assignment
MinTerms
1. Construct Truth Table
2. Fill in Inputs
3. Fill in Possible Solutions in Truth
Table
4. Fill in 1’s when Output is TRUE
5. Write MinTerms for True Outputs
6. Write SOP Expression
7. Design on LogiSim
Logic Expression
Polygons = ____________________________
Answer Key Provided
28
Questions?
29
Answer Key
30
Practice #1: T/T→Logic Expression
ANSWER KEY
Example
Write the SOP logic expression for the output F6 in the truth
table below.
Solution
A
B
C
D
F6
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
1
1
1
0
0
0
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
 A BCD
 A BCD
F6  A B C D  A B C D  A B C D  A B C D  A B C D
 A BCD
 A BCD
 A BCD
31
Answer from Slide 13
Construct a Truth Table-3 Inputs - ANSWER
Polygons that have 4 sides the same OR opposite sides parallel AND 4 right angles
4 sides ≅
opp sides
4 rt angles.
Polygons
MinTerms
ll
0
0
0
0
1. Construct Truth Table
0
0
1
0
2. Fill in Inputs
0
1
0
0
3. Fill in Possible Solutions in Truth
Table
0
1
1
1
1
0
0
0
1
0
1
1
1
1
0
0
1
1
1
1
Assignment
4. Fill in 1’s when Output is TRUE
5. Write MinTerms for True Outputs
6. Write SOP Expression
7. Design on LogiSim
 C PR
 CPR
 CPR
Logic Expression
CPR  C PR  CPR
Polygons = ____________________________
Answer from Slide 29
32
Practice #2 -- Answer
33
Quadrilateral Machine
Lesson Plan
Providing a Differentiated Lesson plan for a Quadrilateral Machine
* Use Lesson plan as a template to modify to your class needs
* The Lesson plan is not perfect (New) – but students learn the
concepts (Taught to students at NHS)
* This is an new process and constantly evolving
* We will send updates to those who provide an email
34
Download