Here’s a computer science lesson and craft activity that speaks to my geeky heart. I do it with groups of all ages, and it would be perfect for Activity Day girls. It could also work for Cub Scouts, perhaps with a hemp cord for a masculine look. It was inspired by the Code.org-sponsored “Hour of Code” event last year. The lesson plan by Thinkersmith is excellent, and covers everything you need to know. It is comprehensive enough for someone without any computer science background to run the activity successfully. I’ll summarize a few points here, but you should go read it. The necklace craft was my own addition. My daughter is modeling her necklace in the photo at left.
Background: Everything is numbers!
To introduce the project, the lesson plan includes background information such as photos of what computer components look like inside and how computers store data on DVDs. Inside a computer, EVERYTHING is numbers–specifically, binary (base-2) numbers. As far as the computer is concerned, the above photo of my daughter is just a bunch of binary numbers. This blog post, your grandma’s voice and face on Skype, all the movies you watch on Netflix–all these things are just binary numbers. The computer doesn’t actually distinguish between these things in storing the data or performing computations on it in the CPU. Software imposes our human interpretations on the data–it could interpret the exact same binary number as a high pitch sound in one case, as a shade of dark green in another, and in yet a third case as a letter of the alphabet. When people agree on what interpretation we want to impose on different collections of binary numbers, it gives them meaning in that context. We call these agreed-upon interpretations encoding schemes or just encodings. This activity explores an encoding named ASCII, which is one common way of interpreting binary numbers as letters of the alphabet.
The ASCII Code
The ASCII code for capital letters is shown below. Unlike base-10 numbers, which can have the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, binary (base-2) numbers can only have the digits 0 and 1 (we usually call the binary digits bits). On this cheat-sheet card, the white squares represent 1 and the black squares represent 0.
Using this card, you can see that the word “CAT” would be spelled 01000011 (C) 01000001 (A) 01010100 (T). ASCII is also able to encode lower-case letters, spaces, and some punctuation, so you can refer students who are interested in those to a complete ASCII table.
Writing your name
The craft activity involves letting the students make a stylish necklace for themselves, where their names are spelled out in binary using black and white beads. To prepare for beading, the lesson plan includes printable worksheets where kids can color in squares to spell out their names. There are two versions of the worksheet: one with very large boxes for smaller kids, and one with smaller boxes for older kids (and longer messages). Here is what the younger version looks like (each row is one letter, because ASCII encodes each letter with 8 bits):
Making the necklace
After the students have spelled out their names on paper, let them write out the letters with beads to make a necklace. Here is my daughter’s necklace. She used glow-in-the-dark beads to separate each letter. In computer science, we call special separating markers like this delimiters. Many encodings use delimiters, especially if the size of each unit can vary. Of course, you don’t actually need a delimiter to know when one character ends and another begins in ASCII (assuming you know the start of the whole message), because the size of each character doesn’t vary–we can always rely on each character using exactly 8 bits.
I hope you are able to use this activity to inspire a love for computer science in some special kid in your life: those you lead, your own child, a neighbor or friend’s kid, a grandchild, a niece or nephew–just to name a few ideas. Give the gift of geek!
Thinkersmith materials used in this post are made available under a Creative Commons attribution, noncommerical, sharealike license. Please credit their work if you reuse!
Other Primary lesson ideas: