If you teach Computer Science, chances are that learning about the binary numbering system is part of the curriculum at some point.
Why teach binary?
Some people question whether or not binary numbers should be part of a high-level curriculum, given the multiple layers of abstraction between, say, a webpage and the binary code that brings that page to life. I’d suggest that:
- Those multiple layers of abstraction / encapsulation are very much a part of computer science, and a perfect jumping off point for a conversation about binary numbers.
- Students should understand that binary numbers are at the heart of every computer. A great video for demonstrating how people used to have to program computers is this one, demonstrating the programming of an old 8080 microcomputer. Follow that up with a demo of high-level / assembly / binary version of a program, described here.
- Learning how to decipher a binary number is not that difficult, and provides students with a manageable gateway activity to the field of computer science.
Binary numbers can certainly be displayed on a computer monitor or projected in front of the class. An interactive Python session works just fine:
A more visible and physical demonstration of binary numbers can easily be constructed using an outlet power strip, socket adapters, and low-wattage aquarium light bulbs (see parts list below).
This device can be easily manipulated at the front of the room, with individual bulbs easily turned on or off simply by screwing them in tightly (on), or unscrewing them slightly (off). Students can be asked to identify the decimal equivalent of a binary number, or asked to manipulate the bulbs themselves to produce the binary equivalent of a decimal number.
This inexpensive and physical, practical demonstration device can be used in the classroom, with parents, during open house events, etc. It has become a mainstay of every CS course I teach.