Lesson 3: Making Decisions with Switches — NOT, AND, and OR Logic Gates

Time: 50 minutes

Unit: Binary, Pixels, Logic Gates, and Packet Switching | Previous: Lesson 2 | Next: Lesson 4

Goal

Complete truth tables for NOT, AND, and OR logic gates, model series and parallel switch paths, and trace the output of a 2-gate combination circuit for all four input pairs.

Materials

Steps

1. Opening (5 min): How Do 0s and 1s Make Decisions?

Ask the class: - "Lessons 1 and 2 showed how 0s and 1s store numbers, letters, and pictures. But how does a computer actually decide something — like turning on a terrarium misting sprayer only when the soil is dry AND the lid is closed?" - Explain that inside a processor chip, billions of microscopic electronic switches (logic gates) take 0/1 inputs and produce a 0/1 output according to three fundamental rules: NOT, AND, and OR.

2. Main Activity Part A (15 min): Acting Out the Three Fundamental Logic Gates

Select student volunteers to act as Switch Gatekeepers along chalk paths drawn on the floor (or trace the paths at desks using a tabletop diagram, paper switch cards, or pointing so standing/walking is optional): - 1 = Gate Closed (Bridge Down / True): The messenger can walk across. - 0 = Gate Open (Bridge Up / False): The path is blocked.

1. The NOT Gate (Inverter) — 1 Input

Flips the input bit to its opposite:

Input A Output NOT A
0 1
1 0

Everyday example: A refrigerator interior light switch that turns the bulb ON (1) when the door is NOT closed (0).

2. The AND Gate (Series Path) — 2 Inputs

Draw two switches A and B in a single straight line (in series). To walk from the battery to the lightbulb, the messenger must cross both A and B:

Input A Input B Output A AND B
0 0 0
0 1 0
1 0 0
1 1 1

Rule: A AND B outputs 1 only when both inputs are 1.

3. The OR Gate (Parallel Path) — 2 Inputs

Draw a path that splits into two side-by-side branches (Switch A on the top branch, Switch B on the bottom branch) and rejoins before the lightbulb. The messenger can reach the lightbulb if either A is closed, or B is closed, or both:

Input A Input B Output A OR B
0 0 0
0 1 1
1 0 1
1 1 1

Rule: A OR B outputs 1 whenever at least one input is 1.

3. Main Activity Part B (15 min): Combining Gates in a Terrarium Controller

Connect to the Grade 6 Science unit (Fungi and Decomposition): suppose your class is modeling an ideal Boolean simulation of a mushroom decomposition terrarium controller with three idealized binary inputs: - D (Dry): 1 if humidity is too low, 0 if moist enough. - L (Lid Closed): 1 if the terrarium lid is safely closed, 0 if open. - M (Manual Override Button): 1 if a student presses the test-spray button, 0 otherwise.

Worked Example: Tracing (D AND L) OR M

Let's trace when the Sprayer (S) turns ON (S = 1) for different sensor readings by adding an intermediate column X = (D AND L) first:

D (Dry) L (Lid) M (Manual) Step 1: X = D AND L Step 2: S = X OR M
1 0 0 1 AND 0 = 0 0 OR 0 = 0 (OFF — lid is open!)
1 1 0 1 AND 1 = 1 1 OR 0 = 1 (ON — dry and lid closed)
0 0 1 0 AND 0 = 0 0 OR 1 = 1 (ON — manual button pressed)

4. Discussion & Student Practice (15 min)

Practice Tasks (3.1 – 3.8)

  1. Task 3.1: Evaluate 1 AND 0, 1 OR 0, and NOT 0.
  2. Task 3.2: Evaluate (1 OR 0) AND (NOT 1). Show the intermediate value of each parentheses group first.
  3. Task 3.3: Complete all 4 rows of the truth table for the circuit Output = (NOT A) AND B (where (A, B) takes values (0,0), (0,1), (1,0), (1,1)).
  4. Task 3.4: Complete all 4 rows of the truth table for the circuit Output = NOT (A OR B).
  5. Task 3.5 (Safety Bug Analysis in Our Boolean Simulation): In the simulated mushroom terrarium controller S = (D AND L) OR M, notice Row 3 of the worked example (D=0, L=0, M=1): if the lid is open (L = 0) and someone presses the Manual button (M = 1), the sprayer output is still 1! Rewrite the Boolean formula using D, L, and M so that in this ideal logic model the sprayer output is 1 when dry or when the manual button is pressed, but ONLY if the lid input L is closed (L = 1).
  6. Task 3.6 (Comparing Circuits): Compute all 4 rows of (NOT A) AND (NOT B) and compare the output column to Task 3.4 (NOT (A OR B)). What do you discover?
  7. Task 3.7 (Bitwise Masking): Computers often apply an AND gate to two 4-bit numbers column by column. Compute 1101 AND 0110 bit by bit.
  8. Task 3.8 (Ratio of True Outputs): Out of the 4 possible input rows in a 2-input truth table (00, 01, 10, 11), what is the ratio of 1 (TRUE) outputs to total rows for an AND gate vs. an OR gate?

Complete Answer Key (Tasks 3.1 – 3.8)

Vocabulary

Differentiation

Safety

Keep floor pathways clear of backpacks and chairs during the human-circuit walkthrough.

Teacher notes