Hex nostalgia

One area of study in my CS101 course (a broad overview of the field, mostly for non-majors) is why computers use binary representations, and how to represent numbers, text messages, pictures, and even music in binary. Computers are really only good at number-crunching, but they've become pervasive in other pursuits because, in the end, it's all just numbers.

So one little exercise I prepare for students is to convert icons to and from hexadecimal strings, just like I did in the 80s with graph paper and pencil, to program sprites (animated icons) on my TI-99/4A home computer.

This one here is an alien from the early arcade game Space Invaders. I dig up icons of Atari Pac-Man ghosts, and the little alligators from Pitfall. I'm sure they'd rather see high-resolution WoW avatars in 24-bit color, but nobody would want to encode one by hand. The point is, once you understand the basic process of binary encoding, anything you want to do is just a matter of scale and patience.

10 LET $ALIEN = "183C7EDBFF245AA5"
Hexadecimal is still amazingly useful in computer programming, so it's unfortunate that the novice's only exposure to it is in error messages, such as the BSoD. I brag about how one summer I could add and subtract very fluently in hex, when I was coding device drivers for serial communications. I'm not sure they're impressed…

©20022015 Christopher League