Teacher Guide: Logic Gates
Learn how AND, OR, NOT, XOR, NAND and NOR gates turn 1s and 0s into decisions, and how to find the output of a small circuit.
Use this lesson with your class
Free, no student accounts needed.
Share with students
Students open the lesson and practise with instant feedback.
Class quiz
10 questions on Boolean Logic. Students join with a name, you see everyone's score.
For Teachers
- Explain what a logic gate is and what the inputs and outputs 1 and 0 stand for
- Recall the truth tables of the AND, OR, NOT, XOR, NAND and NOR gates
- Find the output of a circuit with 2 or 3 gates for given inputs
- Write the Boolean expression of a circuit described in words
- Describe real uses of logic gates, such as alarms and the half adder
- • The AND, OR and NOT operations and their truth tables (The AND Operation, The OR Operation, The NOT Operation)
- • Building truth tables for 2 and 3 variables (Truth Tables)
- • Evaluating Boolean expressions with brackets (Compound Boolean Statements, Boolean Expressions)
- 1. Where in your home is a decision made by AND (two things must both be true)? Where by OR?
- 2. A light on a staircase can be switched from the top and from the bottom. Which gate describes it, and why?
- 3. Why might a factory prefer to build every chip from just one kind of gate?
- 4. How can a machine that only knows 1 and 0 add numbers like 25 + 17?
OR means one or the other but not both
Remediation: In everyday language or often means exclusive or. Put the OR and XOR columns side by side and point to the row with inputs 1, 1. Use a doorbell with a button at the front door and one at the back door: if both are pressed at once, it still rings (OR).
also holds for gates
Remediation: Remind students that a gate output is a single wire that can only be on or off. Write (OR) next to (binary addition with a half adder) and discuss the difference.
In a circuit every gate works with the original inputs
Remediation: Have students label every wire with its value, gate by gate, like a relay race where each runner only gets the baton from the previous runner.
For Struggling Students:
- • Start with AND, OR and NOT only, using the light switch picture (on = 1, off = 0)
- • Give a printed gate table to look up while tracing circuits
- • Use circuits of only 2 gates with the inputs already filled in
For On-Level Students:
- • Trace circuits of 3 gates for several input combinations
- • Write Boolean expressions for circuits described in words, and the reverse
- • Build the half adder table and identify the XOR and AND gates
For Advanced Students:
- • Show how NOT, AND and OR can be built from NAND gates only
- • Design a majority circuit for three inputs and count its rows with output 1
- • Research the full adder and how 4 of them add two 4-bit numbers
- CCSS.MATH.PRACTICE.MP4 (MP4)
Model with mathematics
- CCSS.MATH.PRACTICE.MP6 (MP6)
Attend to precision
- CCSS.MATH.PRACTICE.MP7 (MP7)
Look for and make use of structure
- visualInteractive Gate Table
Students switch between the six gates, read each truth table and see the gate symbol for AND, OR, NOT and XOR
- activityHuman Circuit
Students act as gates, hold up 1 or 0 cards and pass their output to the next student in the circuit
- worksheetTrace the Circuit
Circuits of 2 and 3 gates described in words: find the output and write the Boolean expression
Lesson Content
Everything students see: definition, examples, common mistakes, applications. Tap to open.
Lesson Content
Everything students see: definition, examples, common mistakes, applications. Tap to open.
Definition
- 1 = voltage on (high), which means true
- 0 = voltage off (low), which means false
| AND | OR | XOR | NAND | NOR | ||
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
- AND: output 1 only when both inputs are 1
- OR: output 1 when at least one input is 1
- XOR (exclusive OR): output 1 when the inputs are different
- NAND (NOT AND): the opposite of AND, output 0 only when both inputs are 1
- NOR (NOT OR): the opposite of OR, output 1 only when both inputs are 0
Glossary
- Logic gate
- An electronic circuit that performs one Boolean operation on inputs of 1 and 0
- Input / output
- The signals going into a gate and the single signal coming out of it
- Circuit
- Gates connected by wires, where the output of one gate is an input of another
- Inverter
- Another name for the NOT gate, which flips 1 to 0 and 0 to 1
- XOR (exclusive OR)
- A gate whose output is 1 when its inputs are different, written
- Half adder
- A circuit of one XOR and one AND gate that adds two binary digits: ,
Formula Card
AND
1 only when both inputs are 1
OR
1 when at least one input is 1
NOT
Flips the input
XOR
1 when the inputs are different
NAND
Opposite of AND: 0 only when both inputs are 1
NOR
Opposite of OR: 1 only when both inputs are 0