A century before Alan Turing’s seminal work, Charles Babbage foreshadowed many features of modern computing.
Charles Babbage (1791-1871) was a man of many interests. He achieved notable results in cryptography, invented the cow-catcher for trains and engaged himself in public campaigns against nuisances, including the dangerous practice of boys running their iron hoops underneath horses. Today, he’s most famous for his pioneering efforts in computing. Like Alan Turing, Babbage invented the computer from scratch but never managed to build one. And also like Turing, his intellectual tour de force was only truly recognized after his death.
Over his lifetime, Babbage envisioned several mechanical calculating machines he called engines. The first one, the Difference Engine, was designed to solve polynomial equations using the mathematical technique of finite differences. This method reduces multiplication and division to addition, which is much easier to implement with the rods, gears, levers and linkages that were at the disposal of the Victorian-era gentleman-engineer. Two hundred years ago this week, Babbage presented his first paper on the Difference Engine to the Royal Astronomical Society, kicking off a visionary if troublesome pursuit that inspires awe even today.
The idea for the Difference Engine sprouted out of frustration. In Babbage’s time, mathematical or logarithmic tables were an indispensable tool for astronomy, navigation and science and engineering. They were tabulated by ‘human computers’ – a painstaking and tedious work, during which mistakes were known to occur. Infuriated by the many errors he discovered while checking tables, Babbage realized that a machine would not only eliminate errors but also speed up the process.
When Babbage produced the design for his first device in 1822, it swiftly garnered the interest of the British government, which provided him with a generous sum of money to build one. Powered by manually cranking a handle, the calculator part of the machine was designed to operate on 20-digit numbers and six orders of difference – more on how the method of finite difference and the Difference Engine work can be found here. The results would be imprinted in a soft material spread out on slates that subsequently could be used to make printing plates, thus eliminating the errors from copying the numbers as well.
It soon became clear, however, that the project was far more ambitious than Babbage had foreseen. His device was a beast, consisting of over 25,000 parts, all of which had to be handcrafted and had to work together at an unprecedented level of precision. With continued support from the British government, Babbage and his collaborator Joseph Clement, a reputed engineer and industrialist, eventually managed to assemble only about 1/7th of the original design by 1832. It was capable of running operations with 6-digit numbers and two orders of difference.
Mother of programming
That wasn’t good enough to produce the tables that His Majesty’s government had in mind, and the project’s principal financier started to waver. On top of that, Babbage and Clement fell out. Not at all dispirited by these setbacks, however, Babbage took on an even more ambitious project: a mechanical general-purpose computer. Unlike the Difference Engine, the Analytical Engine would be able to perform calculations of any type and complexity, so long as they were based on arithmetic operations.
It’s not hard to see why the Analytical Engine should be considered an ancestor of modern computers. Its four main components echo the four essential components of today’s PCs: the Reader (input device), the Mill (CPU), the Store (memory) and the Printer (output). Controlling the flow of information is certainly a key aspect of modern computing, and the Analytical Engine is programmable with instructions (along with the input data) fed to the device using punch cards. The machine is even Turing-complete. It took another century before the next one was built (the electromechanical German Zuse Z3, created in 1941).
A friend of Babbage, the mathematician Ada Lovelace, realized that the potential of programmable calculating machines exceeded “weaving algebraical patterns” – an apt analogy to the punch-card system used on looms. Lovelace, née Byron and daughter of the great poet, saw that numbers could represent entities other than quantity, such as letters or musical notes. Her idea of machines producing musical pieces touches on what we call artificial intelligence today, though she argued engines could never produce originality.
If Babbage is the father of the computer, Lovelace is the mother. She did much to disseminate the Analytical Engine to the scientific community, translating and vastly expanding a mathematical analysis of the machine published by an Italian scientist. The augmented manuscript included a little program to calculate a series of Bernoulli numbers. This is why Lovelace is often referred to as the “mother of programming,” although the honorary title is controversial since Babbage himself also produced several programs ahead of her. He just never published them.
Babbage’s nor Lovelace’s programs were ever put to the test because, like the Difference Engine, the Analytical Engine was never built. Lack of money was an issue – the British government, frustrated at the lack of results after twenty years of funding, backed out in 1842 – but so was Babbage’s lack of discipline. He kept revising his design and adding features, instead of focusing on actually constructing the thing. Ultimately, however, it’s doubtful whether the machine could have been built at all in the Victorian age. Even today it would be a daunting task.
Construction of the Difference Engine, on the other hand, proved to be within the realm of possibilities in the 19th century. Borrowing heavily from his English colleague, Swedish lawyer and inventor Per Georg Scheutz constructed several experimental models in the 1830s. His son Edward proceeded to build several full-scale machines during the 1850s, one of which – ironically – was purchased by the British government. It was used to produce actuary tables.
One of Babbage’s original designs was eventually constructed. After the Analytical Engine project petered out, Babbage resumed working on the Difference Engine, creating a less complex design of ‘only’ 8,000 parts and containing refinements borrowed from the Analytical Engine. Starting in 1985, a team at the Science Museum in London set out to build this Difference Engine No. 2 using materials that would have been available to Babbage. The calculating part was finished in 1991, just in time for the bicentenary of Babbage’s birth. The printer was ready in 2002.
Another Difference Engine was commissioned by former Microsoft CTO Nathan Myhrvold and exhibited at the Computer Science Museum in Mountain View, California. A charity called Plan 28, after Babbage’s most complete design, has been raising money for years to build the Analytical Engine.