Binary Number Game
I love binary numbers. I was first taught about different number systems in grade school and was fascinated with them immediately. I used to convert decimal numbers into different base numbers just for the fun of it. So I guess it is not surprising that I love computer projects that involve binary, hex, and octal numbers.
I recently found this binary teaching game on a Cisco web site. The music is annoying but that could be my age. If you use it you may want to make sure the students turn off the music or your lab will be really noisy.
But while playing games is fun I’m a “let me make my own game” sort of guy. So when I saw this program my first thought was how can I make that into a project. So while sitting through a conference call I started playing. I came up with the following (in Visual Basic .NET FWIW but I’m not sure language choice is a big deal here.):
The way it works is that by clicking on a button one toggles the zero and one values and changes the decimal value that is displayed. It’s a pretty simple program. One could add some complexity by allowing a user to enter a decimal value and have the buttons change to represent the binary equivalent. One could also modify this to handle other number bases. One could either have multiple clicks of a button increment (and wrap) the value displayed or one could use text boxes to allow a user to enter a value. There are pros and cons to either option.
The button option forces students to understand the counting in different number bases which is valuable. The text box option forces a student to do data validation and error checking. That’s a whole different but potentially more valuable lesson. It all depends on the goal of the project.
What do you think? Will these ideas work in the classroom? How would you change them?
Comments
Anonymous
September 10, 2008
You can even count in binary on your fingers ;) see for example http://www.lyzrdstomp.com/binary/Anonymous
September 11, 2008
Yes you can count in binary on your fingers. With some kids the 4 digit can be a little bit of a distraction though. :-)Anonymous
September 11, 2008
Related to teaching binary numbers and other topics in CS, I found it valuable to have my entire APCS class participate in the <a href="http://www.acsl.org">American Computer Science League</a> contests each year. Their contests focus on non-AP but good CS topics like number systems, digital circuit diagrams, pattern matching, boolean algebra, functional languages like LISP, etc. This is a good way to bring non-Java CS topics into the course, and the kids always enjoyed it. It also gives them a totally different perspective on arithmetic and algebra in a way that's surprisingly fun.Anonymous
September 11, 2008
Your blogger outsmarted me! :-) Hopefully this is a corrected link --> http://www.acsl.orgAnonymous
September 29, 2008
I wrote a little game for quickly decoding binary numbers. Program and source code are here: http://davebsoft.com/applications See "Binary LED Decoding Game."