Babbage, Lovelace and the Engine
In the 1830s Charles Babbage designed a general-purpose computer made of brass and steam. Ada Lovelace saw further than anyone what such a machine could do — and set out the first famous objection to machine intelligence. Meanwhile George Boole turned logic into algebra.
In 1843 a 27-year-old Englishwoman published a translation of an Italian engineer’s article about a machine that did not exist. Her own notes ran to roughly three times the length of the original. In them she described how the machine could be instructed, step by step, to calculate a difficult sequence of numbers; imagined it composing music; and warned that it could never “originate” anything. More than a century later, Alan Turing devoted a section of his most famous paper to answering her. The woman was Ada Lovelace, and the machine was Charles Babbage’s Analytical Engine.
Babbage’s engines
Charles Babbage (1791–1871) was a Cambridge mathematician with a grievance: the printed tables of logarithms and astronomical values that navigators, engineers and bankers relied on were full of errors, because they were calculated and copied by hand. In 1822 he proposed a machine to compute and print such tables automatically. Over the next decades he designed two very different engines.
A special-purpose calculator (from 1822). The Difference Engine used the “method of finite differences”, a trick that lets you produce a table of polynomial values using nothing but repeated addition. Addition is easy to do with gear wheels, so the whole machine could be built from columns of geared digits.
The British government put about £17,000 into the project — a huge sum at the time — but after disputes with his chief engineer, Joseph Clement, work stopped in 1833, and the government formally abandoned it in 1842. Only a demonstration section was assembled. Babbage later designed an improved Difference Engine No. 2; London’s Science Museum built its calculating section from his drawings in 1991, and it worked.
A general-purpose computer (from 1834). Babbage’s second design was far more ambitious. It had a store to hold numbers (what we call memory) and a mill to do arithmetic on them (a processor). Instructions and data were fed in on punched cards, an idea borrowed from the Jacquard loom, which used cards to weave complex patterns in silk.
Crucially, the Engine could take different actions depending on its results so far, and repeat sequences of operations. That makes it, in principle, a general-purpose machine: it could carry out any calculation you could describe in its card language. It was never built; Babbage kept refining the design until his death.
The leap from calculator to computer. The difference between the two engines is the difference between a pocket calculator and a computer. A calculator does one fixed job. A computer follows a program — an algorithm supplied from outside — and so the same hardware can do endless different jobs.
The Analytical Engine’s design anticipated the basic layout of electronic computers a century later, though the builders of the first electronic machines in the 1940s mostly arrived at their designs independently.
Lovelace’s Notes (1843)
Augusta Ada King, Countess of Lovelace (1815–1852), was the only legitimate child of the poet Lord Byron, whose marriage to her mother broke up when she was a baby. Her mother, determined to steer her away from her father’s temperament, had her schooled in mathematics; later she studied with the logician Augustus De Morgan. She met Babbage in 1833, at seventeen, saw a demonstration piece of the Difference Engine, and began a long friendship and correspondence with him.
In 1840 Babbage described the Analytical Engine to scientists in Turin. A young Italian engineer, Luigi Menabrea (later prime minister of Italy), wrote up the lectures in French in 1842. Lovelace translated his article into English and, encouraged by Babbage, added seven notes labelled A to G. They were published in 1843 in Richard Taylor’s Scientific Memoirs, signed only with her initials, “A.A.L.”
The final note, Note G, set out in detail how the Engine could calculate the Bernoulli numbers, a sequence important in mathematics, as a table of operations: which variables to use, which operation to perform, and where to store each result, including a repeated loop. Consensus It is widely described as the first computer program published in print — though, as we shall see, whether it was the first program written, and whose program it was, is another matter.
What made the Notes remarkable was not only the program but the vision. Lovelace grasped that the Engine manipulated symbols, not just numbers. If the relationships between musical notes could be expressed in its notation, she wrote, the Engine “might compose elaborate and scientific pieces of music of any degree of complexity or extent.” She put the comparison with the loom memorably:
That leap — from a calculating machine to a general symbol-manipulating machine — is exactly the leap that would later make AI possible.
“Lady Lovelace’s objection”
Lovelace was equally careful to say what the Engine could not do. In Note G she warned against overrating it:
In his 1950 paper “Computing Machinery and Intelligence”, Alan Turing listed this as one of the main objections to the idea of thinking machines and called it “Lady Lovelace’s Objection”. He answered it in two ways. First, he said, machines surprise him constantly, because he cannot foresee every consequence of the instructions he gives. Second — and more importantly — a machine that learns from experience could end up doing things its programmer never directly ordered. Turing also noted, fairly, that Lovelace was writing about the Engine she knew, and that her statement was not a claim about all possible machines.
The objection is still alive. When a large language model writes a poem, is it originating anything, or recombining patterns from its training data in ways its makers set up? The modern form of Lovelace’s question is one of the most interesting debates in AI.
How much credit does she deserve?
Debated Lovelace has become an icon: “the first computer programmer”, with a programming language (Ada, 1980) and an international day named after her. Historians disagree sharply about how far the title is earned. Explore both cases.
Was Ada Lovelace the first computer programmer?
Choose one to hear its case.
The case
The Note G program is the first published, fully worked account of a non-trivial algorithm for a general-purpose machine, and the Notes as a whole show a deep, independent grasp of what such a machine was. Her insight that it could manipulate any symbols — music, algebra — goes beyond anything Babbage published. Babbage himself praised the Notes, and recent studies of her mathematical correspondence (Hollings, Martin and Rice, 2018) show a capable, serious mathematician, not a figurehead.
The weak point
“First programmer” is a slippery title. Babbage had sketched short programs for his Engine some years earlier in unpublished notes, and by his own account he worked on the algebra of the Bernoulli example. Publication first is not the same as invention first.
The case
Historians such as Allan Bromley, who studied Babbage’s papers, found programs for the Analytical Engine in Babbage’s notebooks from around 1837–40, years before the Notes. In his 1864 memoir Babbage recalled suggesting several of the illustrations and offering to do the algebra for the Bernoulli example himself — though he also credited her with spotting a serious error in his working and said the rest of the algebra was hers. The biographer Dorothy Stein (1985) argued that Lovelace’s mathematics was shakier than her legend suggests.
The weak point
This view can slide into dismissing her entirely, which the evidence does not support. Even sceptics generally agree the Notes are an outstanding piece of explanation, and their wider vision of the Engine was distinctively hers.
- Pioneer of programming: Lovelace wrote the first published program and saw the general nature of computing; the title fits.
- Interpreter, not originator: Babbage invented both the machine and its earliest programs; Lovelace was a gifted explainer whose role has been inflated by later mythmaking.
- Visionary rather than “programmer”: a middle view held by many historians — the program matters less than her conceptual leap to a general symbol-processing machine, and it is that, not a title, for which she deserves credit.
Boole’s laws of thought
While Babbage worked on engines, a self-taught schoolmaster from Lincoln was mechanising logic on paper. George Boole (1815–1864), later professor of mathematics at Queen’s College, Cork, in Ireland, argued that the laws of reasoning could be written as algebra. In The Mathematical Analysis of Logic (1847) and then An Investigation of the Laws of Thought (1854), he treated statements as quantities that could only be 1 (true) or 0 (false), and combined them with operations we now call AND, OR and NOT.
Boole did not build a machine, but his algebra became the language of every digital circuit. In 1937 a young student named Claude Shannon showed in his master’s thesis that Boolean algebra could describe — and design — networks of electrical switches. Every chip in your phone performs Boolean logic billions of times a second. And Boole’s ambition, to capture the “laws of thought” in symbols, became the founding ambition of symbolic AI.
What made the Analytical Engine general-purpose, unlike the Difference Engine?
The Difference Engine did one fixed job. The Analytical Engine could follow any program written in its card language.
In Note G, what did Lovelace say the Engine could not do?
She wrote that it could only do what “we know how to order it to perform”. Turing called this Lady Lovelace’s Objection.
Whose work turned logic into algebra with values 1 and 0?
Boole’s Laws of Thought (1854) built on his 1847 work; De Morgan was a fellow logician and Lovelace’s tutor.
// Pause and reflect
- Lovelace said the Engine can do only what we know how to order it to do. Does a system that learns from data escape her objection, or just move it one step back?
- Why do you think the story of “the first programmer” became so popular? What does the debate tell you about how history chooses its heroes?
- Babbage’s machines were never finished. What, if anything, does an unbuilt design contribute to the history of technology?
Your notes are saved privately in this browser.
What happened next
Babbage’s engines faded from view, and the idea of a general-purpose machine had to be rediscovered from scratch. In 1936 a young Cambridge mathematician defined, on paper, a machine so simple and so general that it captured the very idea of computation. Continue with Alan Turing.
Key terms on this page
Sources & further reading
- L. F. Menabrea, “Sketch of the Analytical Engine invented by Charles Babbage”, with Notes by the translator, Ada Lovelace, Scientific Memoirs 3 (1843).
- George Boole, An Investigation of the Laws of Thought (1854).
- Charles Babbage, Passages from the Life of a Philosopher (1864).
- A. M. Turing, “Computing Machinery and Intelligence”, Mind 59 (1950) — section on “Lady Lovelace’s Objection”.
- Christopher Hollings, Ursula Martin and Adrian Rice, Ada Lovelace: The Making of a Computer Scientist (2018).
- Doron Swade, The Difference Engine: Charles Babbage and the Quest to Build the First Computer (2001).
- Dorothy Stein, Ada: A Life and a Legacy (1985).