Light bulbs, gates and truth tables

 
Image credit: Mathematics Stack Exchange

Image credit: Mathematics Stack Exchange

Helpful resources:

Optional materials:

  • Two-color manipulatives

________________________________________________________________

Teacher’s note: this lesson can fit smoothly after a lesson on informal logic puzzles that are often a lot of fun. Informal logic lessons can include knights and liars puzzles, grid puzzles, puzzles with incomplete or incorrect information from which the truth needs to be extracted, and so on.

Suppose we start with a light switch connected directly to an on/off switch. Easy, when you flip the switch to on, the light becomes illuminated. But what if we make it an inverse light switch? When the switch is turned to on, the light bulb turns off, and vice versa. Let’s see what other setups of switches could affect the behavior for our light bulb.

For example, let’s say we have one light above the center of the staircase. Two light switches control it, one at the top of the stairs and one at the bottom. What possiblities do we have for how we could set up the light to behave? Well: the light could require both switches to be on at once in order to turn on, or it might just need one to be switched on. Alternatively, we could use our “inverse” light switches and have the light turn on when the switches are turned to off.

Now, let’s make our circuits more complicated. A reminder of some terminology:

  • not means on changes to off, and off changes to on (flip the value)

  • and means both of the two switches have to be on

  • or means at least one of the switches has to be on

Will the light turn on, in each of these cases?

A and B are both off, and light will turn on if: (not A) and (not B)

—> answer: this turns into (not Off) and (not Off) = (On) and (On) meaning our light will turn on :)

A is on, B is off, and light will turn on if: (A) and (B)

—> answer: this is (On) and (Off), but since “and” requires both to be on and this is not the case, our light will stay off.

A and B are both on, and light will turn on if: (not A or not B) and (A)

—> answer: this becomes (not On or not Off) and (On), which is the same as (Off or On) and (On), which turns into (On) and (On), which means it will light up!

Let’s generalize this idea outside of light switches and to any property that can be true (in our case, on) or false (off). We can construct a table to summarize what the behavior of the result will be in each case.

Teacher’s note: here you might consider bringing up some examples of other properties that could model the light switches. For example, we could 0’s and 1’s to represent the switches.

A --- B --- (A and B) --- (A or B) ----(Not A) ----((Not A) or B)
T T T T F T
T F F T F F
F T F T T T
F F F F T T

From here, we can try to construct some expressions that give “behaviors” equivalent to one another (i.e. the column of T’s and F’s becomes identical). This is a nice way to introduce the intuition behind DeMorgan’s rules:

  • (Not A) or (Not B) = Not (A and B)

  • (Not A) and (Not B) = Not (A or B)

Finally, a great way to reinforce these ideas is by playing around with logic gates. There are simulations available online (see resources list at top) that help learn these and it’s a nice way to see the light bulb turning on or off depending on the gates that are used in the circuit of switches.

 
Previous
Previous

Simple encryption

Next
Next

10 or 2? Intro to number bases