Last year I posted a fun review of how I tried to explain internet advertising to my son’s kindergarden class. I got a ton of great feedback from other parents about using the techniques, and some folks in the ad industry even used it to explain what we do to other adults!

So when my buddy Max (11) asked me to be the guest speaker in his class I jumped at the chance to continue my experiment in teaching. Max had different motives – he knew that I used to work at Google and wanted me to tell cool stories about self-driving cars, Google Glass, and GoogleX (Sergei’s secret lab where he’s turning himself into Bat Man).

I decided to split the time between the Google stuff and a lesson about how computers really work at the lowest level. Keep in mind that these kids know basic math pretty well at this point, so I was trying to keep it within their abilities for addition, multiplication, etc. Here’s how the lesson went, I hope you find this interesting and helpful and leave comments with your thoughts.

**Starting with the Concepts**

To get the kids talking and motivated I started with some simple questions:

- “How many of you like computers?” – All hands raised
- “How many of you like math?” – A couple of hands dropped
- “Did you know that math and computers are basically the same thing?”

This got a couple of the kids intrigued and got some puzzled looks from others. I explained that when they’re playing a game or a movie on an iPad, it’s basically just an enormous number of math equations taking place that make that game run, and I was going to explain to them how it worked.

- “What’s the one thing that makes every computer run?”

Some kids said “chips”, but pretty quickly they volunteered “electricity”. With that I explained that a computer is just a machine that runs on electricity like a blender or anything else in your house. But how do we translate electricity to math and then to games, words, videos, etc.?

That’s when I broke out the cheap, RadioShack flashlight ($3.99, in-store only).

I turned on the flashlight and asked:

- “Imagine if we wanted to count using electricity. If this flashlight was like an on/off switch that was used for counting, how would we count to 5?"

One boy volunteered and came up to the front to turn on and off the flashlight five times.

- "Great, now what if wanted to count to a million or a billion?”

The kids were flummoxed. Until I broke our my four-bit array of flashlights:

- How high do you think I can count using just four flashlights?

I started counting from zero to 15 using the flashlights, stopping every once in a while to ask the kids how to get to the next number. For example, when I was up to 9, the 8 and the 1 were both on, and I asked “how would I get to ten?” and the kids were able to get it pretty easily.

Once I got to 15 I made the point that with one flashlight I could only count to one, but with four I could count to 15.

**Introducing Binary Math**

Going to the whiteboard (all kids classes seem to have them now) I wrote down “1 2 4 8” and noted that each new flashlight was double the value of the previous one.

- “Help me continue the sequence. Who wants to tell me what’s after 8?”

With some help from me, we pretty quickly expanded two to the 15th power:

1

2

4

8

16

32

64

128

256

512

1,024

2,048

4,096

8,192

16,384

32,768

So what?

- With a fairly small number of flashlights we could reach very large numbers.
- We could get to the millions with only a couple more doublings.
- Each flashlight is a “bit” or “binary digit"
- Each group of 8 bits is a "byte”.

To make this resonate I asked if anyone has heard the term “megabyte” (which everyone had, thanks to marketing of electronics) and explained that this was equal to “a million bits, or a million flashlights!” They were impressed.

Next I wanted to transition from flashlights to the ones and zeros used in binary notation. I had prepared slides/print-outs to use, starting with the familiar decimal notation:

Then showing the binary notation:

I was pressed for time, and the kids seemed a little freaked out, so instead, I used the whiteboard and wrote out much simpler decimal examples with only three digits like 156 = 1×100 + 5×10 + 6×1 vs simply binary numbers like 111 = 4×1 + 2×1 + 1×1 = 7.

At this point, I’d say there were one or two kids who’s entire minds were blown wide open. The remaining kids were about 50-50 between those that were still with me and those that were a little confused.

**But How Do We Get from Flashlights to Games?**

Counting in binary is a building block, but I wanted to reinforce the lesson that binary math is the essence of all the higher level programs kids enjoy. I wanted them to use the binary math to create something visual, and an exercise was the best teaching technique.

I printed out strips of paper that represented a 5-bit array and included greyed-out “cheats” to let them know the decimal value of the places withiin the binary number:

In advance, I had hand-written a set of specific numbers on each slip. I asked the kids to put a big “X” within the cells of the paper slip that added up to the written number. For example, if I wrote “17” on the slip, the kid should have put the X in the 16 and the 1 boxes. (These instructions ended up being confusing, I’m sure there’s a better way to explain this and switching from ones and zeros to X’s was probably a mistake).

Most of the kids were able to complete the task pretty easily and I walked around the room to help those who were having difficulty.

I then called out the following numbers in order and asked that if a kid had a slip with that number to bring it up to me:

4

10

17

17

31

17

17

As I got the slips I taped them to the wall. When they were assembled, the “X” marks in the boxes created a bitmapped image of the letter “A”. This photo shows it, though its a little hard to make out since some kids put 0’s in the empty spaces:

Using just numbers, which were the equivalent of flashlight on/off switches, we had created the letter “A”, and the same techniques could be used to create an image, a video, a game, or anything else you might see on a computer screen. I think they got it, and if not it gave them a little inkling of what lies ahead as they learn some of these concepts in a more formal setting.

**Resources**

I’ve put together my examples and exercise materials in a Powerpoint, let me know if you would like a copy.