01

Tables full of errors

In the early nineteenth century, navigation, engineering, banking and astronomy depended on printed tables of logarithms, tides and other values. They were worked out by hand by human 'computers', copied and typeset, and errors crept in at every stage. A wrong figure in a navigation table could put a ship on the rocks. Charles Babbage, a Cambridge mathematician born in 1791, became convinced that machines could do the job perfectly. In 1822 he announced a small model of a calculating engine, and the British government granted him funds to build a full-sized one. It was the start of a lifelong effort that would never quite reach completion.

02

Adding its way through

Babbage's Difference Engine relied on a neat trick, the method of finite differences, which turns complicated calculations into repeated addition. Take the square numbers 1, 4, 9, 16 and 25. The gaps between them are 3, 5, 7 and 9, and the gaps between those gaps are always 2. Start with the right numbers and you can generate every following square just by adding, never multiplying. Gears and columns of numbered wheels could do that addition reliably, then print the results directly to avoid copying errors. But the precision engineering required was extreme for its time. After disputes with his engineer, Joseph Clement, and rising costs, work on the first engine stopped in 1833.

03

A machine for any calculation

By then Babbage had a grander idea. From 1834 he designed the Analytical Engine, a machine that could carry out any sequence of arithmetic operations. It had a 'store' to hold numbers and a 'mill' to process them, essentially memory and a central processor. Instructions and data were to be fed in on punched cards, borrowed from the Jacquard loom, which used cards to weave complex silk patterns. Crucially, the engine could make decisions, choosing what to do next depending on a result, and repeat steps in loops. That combination makes it, on paper, a general-purpose computer. It would have been steam-powered and the size of a small room, but it was never built.

04

Ada Lovelace's notes

Ada Lovelace, born in 1815 and the daughter of the poet Lord Byron, had a rigorous mathematical education and became a friend of Babbage. In 1843 she published a translation of an Italian engineer's article about the Analytical Engine, adding her own Notes, which were about three times longer than the original. Note G set out, step by step, how the engine could calculate Bernoulli numbers, a sequence used in mathematics, and is often called the first published computer program. Just as striking was her insight that the engine could manipulate any symbols, not only numbers, and might one day compose music. She wrote that it 'weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.'

05

Debates and recognition

Historians still argue over how to share the credit. Babbage had written sequences of operations for his engine before Lovelace, so some dispute calling her the first programmer. Others point out that her Notes give the clearest early explanation of what programming is and of computing's wider potential, ideas that Babbage himself never published so plainly. Lovelace died in 1852, aged 36, and Babbage in 1871, with his engines unfinished. Their work was largely forgotten until the electronic computer pioneers of the 1940s rediscovered it. Since then she has been widely honoured: a programming language created for the US defence department around 1980 was named Ada, and Ada Lovelace Day celebrates women in science.

06

Would it have worked?

For more than a century, people wondered whether Babbage's designs were simply too ambitious for Victorian engineering. To find out, London's Science Museum built his Difference Engine No. 2, a refined design from the late 1840s, using his drawings and tolerances achievable in his era. Completed in 1991, the bicentenary of his birth, it has around 8,000 parts and calculates to 31 digits. It worked, and the printing mechanism was finished in 2000. The Analytical Engine remains unbuilt, though enthusiasts have studied his thousands of pages of plans. The lesson is that Babbage's ideas were sound; what he lacked was money, political patience and a manufacturing industry ready to make them.

FOLLOW THE EVIDENCE

Sources & further reading

Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.