Sunday, November 25, 2012

Babbage's Difference Engine in Action


I used the holiday season to visit the computer history museum in Mountain View. It was not the first time I had visited this wonderful museum (a must see if you ever visit the Silicon Valley), but it was the first time I saw their Babbage machine (Difference Engine #2, Serial 2) in action (it was in repair due to the shipping damage last time I visited the museum). When I saw the double helix pattern appearing when the machine turned to do a calculation, I was speechless. It's like seeing the birth of the modern computer!

I would not go into the details about the machine, for which I encourage you to visit the museum (or the Science Museum in London), but I found a few "design principles" Babbage applied to the machine quite interesting. For example, to "improve" the speed of the calculation, the machine was designed to do the calculation in parallel. Babbage also added a printing system, a design he borrowed from his "analytical machine" (which he never finished). This reusable module could even print different fonts! He also designed the wheels in such a way that if  some mechanical parts were out of sync (so they would generate wrong results) they would jam the whole machine so a properly functional machine would never generate incorrect calculations. It's fascinating to see those design ideas or safety mechanisms applicable even in the modern software or hardware design.

One interesting anecdote about the machine. The restoration project was sponsored by Microsoft's ex-CTO Nathan Myhrvold. He ordered a duplicate to be made so he could display it in his living room. It was on loan to the computer history museum when he was getting his home ready. Well, let's hope his home remodeling takes a bit longer so more people can see this wonderful machine in its full glory.

One of the two fully restored Babbage difference engines in the world.
Details of the difference engine You can read the results of the calculation here or have it printed.
The printing system. It supports multiple fonts.