24 - Logic Gates and Truth Tables
24 - Logic Gates and Truth Tables
Logic Gates
Learning Objective: To be able to demonstrate an understanding of
logic gates and the notation/diagrams used.
Computer Science
Success Criteria:
1. I can complete a logic gate diagram.
2. I can write a logic statement.
3. I can create truth tables for AND, OR and NOT gates.
4. I can use correct logic notation.
(J276/02)
What is binary?
Computational Thinking, Algorithms & Programming
You can see why we need binary, logic and transistors in this video
here: https://www.youtube.com/watch?v=GdqbLmdKgw4
(J276/02)
Key Words
Computational Thinking, Algorithms & Programming
(J276/02)
Logic Gates
Computational Thinking, Algorithms & Programming
AND OR NOT
(J276/02)
Truth Tables
Computational Thinking, Algorithms & Programming
(J276/02)
Input An AND gate can have two or more
inputs.
AND The output will be positive (true)
Computational Thinking, Algorithms & Programming
GATE
Output when both inputs (the input one
Input AND the input two) are positive
(true).
Computer Science
PERSON SENSOR
(J276/02)
The AND Gate
Computational Thinking, Algorithms & Programming
(J276/02)
Input An OR gate can have two or more
OR inputs.
GATE The output will be positive (True) if
Computational Thinking, Algorithms & Programming
FRONT DOORBELL
Computer Science
SWITCH
OR
GATE DOORBELL
BACK DOORBELL
SWITCH
(J276/02)
The OR Gate
Computational Thinking, Algorithms & Programming
(J276/02)
A NOT gate (inverter) has only
one input.
NOT It reverses the logic state.
Computational Thinking, Algorithms & Programming
GATE
Input Output
(J276/02)
ON or OFF ?
BEDROOM
Computational Thinking, Algorithms & Programming
SENSOR
OR
GATE AND
FRONT ROOM GATE BURGLAR
SENSOR ALARM
Computer Science
ON SWITCH
FOR ALARM
(J276/02)
The NOT Gate
Computational Thinking, Algorithms & Programming
(J276/02)
Is the Final Output ON (True)
or OFF (false) ?
Computational Thinking, Algorithms & Programming
OR
GATE AND
GATE
Computer Science
FINAL
AND OUTPUT
NOT GATE ON ? OFF ?
GATE
(J276/02)
Computational Thinking, Algorithms & Programming
1.
Activity 1: 4.
ON OFF
OFF
? ON
?
ON
5.
2.
ON
Computer Science
OFF
ON ?
ON ?
OFF 6.
ON
3.
OFF ?
ON
OFF ? The output is
ON or OFF ?
OFF
(J276/02)
7. Activity 1: 10.
OFF ON
?
Computational Thinking, Algorithms & Programming
ON
OFF OFF
8. ON
ON
ON
ON ? OFF ?
Computer Science
OFF ON
9. OFF
ON
ON OFF
ON
ON ?
ON
ON ON
The output is
ON or OFF ?
(J276/02)
Computer Science
(J276/02)
Computational Thinking, Algorithms & Programming
(J276/02)
Activity 4: Truth Tables
Computational Thinking, Algorithms & Programming
A⋀(BVC)
• Have a go yourself and then check your steps with the PowerPoint
(J276/02)
Computer Science
(J276/02)
Computational Thinking, Algorithms & Programming
Activity 4
• Here is the diagram
A⋀(BVC)
Activity 4 – Answer
Computational Thinking, Algorithms & Programming
A⋀(BVC)
• Here is the empty truth table
Computer Science
A B C BVC A⋀(BVC)
(J276/02)
Activity 4 – Answer
Computational Thinking, Algorithms & Programming
A⋀(BVC)
• Here is the empty truth table
Computer Science
(J276/02)