Week 8 · Unit 2 Logic gates (1): logic circuits, the list of gates, the AND gate: switches, symbol, number of forms, truth table, Boolean formula · 3 lessons
2
The AND gate: two switches in a row
ICT Secondary 3 Term 1, Unit 2, Topic 1: pp. 6–18
GoalExplain why two switches in a row light the lamp only when both are closed, and write this as a rule.
New words
in series · one after the other on a single wire, so current must pass through bothclosed switch · lets current pass: the value is 1open switch · stops current: the value is 0AND gate · a gate whose output is 1 only when all its inputs are 1
Explanation
Put two switches, A and B, in a row on one wire with a lamp L. The current goes through A, then through B, then into the lamp. If either switch is open, the path is broken and the lamp stays unlit. Only when both are closed does the lamp light. Write closed as 1 and open as 0: the lamp is 1 only when A is 1 and B is 1. This is the AND gate. One switch is one input; two switches are two inputs. Three switches in a row follow the same idea: all three must be closed. The AND rule in words is: the output is 1 only if every input is 1. People use the same idea in speech: you may enter if your ticket has the right date and a seat is reserved for you.
Switch A
Switch B
Is the path complete?
Lamp
open
open
no
unlit
open
closed
no, broken at A
unlit
closed
open
no, broken at B
unlit
closed
closed
yes
lit
Worked examples
Date right?
Seat reserved?
May enter?
no
no
no
no
yes
no
yes
no
no
yes
yes
yes
An everyday AND rule: a hall lets a visitor in only when the date on the ticket is right and a seat is reserved.
A
B
C
Lamp
closed
closed
closed
lit
closed
open
closed
unlit (broken at B)
open
closed
closed
unlit (broken at A)
closed
closed
open
unlit (broken at C)
Three switches in a row. A single open switch breaks the path.
Counting: of the eight ways to set three switches, only one lights the lamp. For two switches, one way of four does.
Class activity
Draw on paper two switches in a row with a lamp, label them A, B and L, and colour the path for each of the four states. Write which states light the lamp. Then draw three switches in a row and decide how many of the states light the lamp.
Practice
1
Two switches are in a row. A is closed and B is open. Is the lamp lit?
No. The path is broken at B.
2
Say the AND rule in words.
The output is 1 only if every input is 1.
3
Why must the current pass through both switches?
They are in series, one after the other on the same wire.
4
A game starts only when the cards are dealt and the timer is set. Which gate is this, and what are its inputs?
An AND gate. The inputs are “cards dealt” and “timer set”.