Babbage's Analytical Engine
Charles Babbage's unbuilt 1837 design for a general-purpose, program-controlled mechanical computer — the first machine whose punched-card 'programs' included loops and conditional branching.
Created by Charles Babbage, with programming concepts developed by Ada Lovelace
Babbage’s Analytical Engine is where the idea of a general-purpose, program-controlled computer first appears in a complete, buildable design — over a century before one was switched on. Charles Babbage conceived it in the mid-1830s as the successor to his troubled Difference Engine, and by 1837 had worked out an architecture that split the machine into a “Store” for holding numbers and a “Mill” for operating on them, controlled by a sequence of punched cards borrowed directly from the Jacquard loom. No Analytical Engine was ever built in Babbage’s lifetime, and none has been built since, but the drawings, the surviving demonstration fragments, and Ada Lovelace’s notes on the design are detailed enough that its “programs” can be read, and in modern simulators run, today.
Origins: from a broken difference engine to a universal one
Babbage’s first calculating machine, the Difference Engine No. 1, was a special-purpose device: it could tabulate polynomial functions by the method of finite differences and nothing else. Construction stalled in 1833 after a falling-out with his chief engineer, Joseph Clement, and the project was never finished. Rather than resume it, Babbage began sketching something categorically different — a machine that could be directed, by an external sequence of instructions, to carry out any sequence of arithmetic operations on any set of numbers. By 1837 he had written up the core of that design in an unpublished manuscript, “On the Mathematical Powers of the Calculating Engine,” describing the separation of storage from computation and the use of punched cards, adapted from those that controlled pattern-weaving in a Jacquard loom, to sequence the machine’s operations.
Architecture: Store, Mill, and three kinds of cards
The design’s vocabulary is unmistakably that of a computer, even though Babbage had no such word to reach for:
- The Store held the machine’s working numbers on columns of decimal digit wheels. Babbage’s specification called for room for 1,000 numbers of 50 decimal digits each — a capacity later commentators have noted was not exceeded by any electronic computer until well into the twentieth century.
- The Mill was the arithmetic unit, comparable to a central processing unit in later machines. It carried out addition, subtraction, multiplication, and division on numbers drawn from the Store, with internal sequencing directed by rotating, pegged barrels — a mechanical analogue of what would later be called microcode.
- Operation cards specified which arithmetic operation the Mill should perform next.
- Variable cards specified which columns in the Store an operation should read from and write to.
- Number cards could load starting values into the Store.
Because the card sequence was independent of the specific numbers being processed, the same set of operation and variable cards could be reused with different inputs — the essential idea of a program as something distinct from the data it operates on. Babbage’s design also allowed cards to be run in a loop by physically forming a loop of card chain, and included provision for the Mill to alter which cards were read next based on the sign of a computed value, giving the design conditional branching as well as iteration.
Ada Lovelace and Note G
The most detailed surviving account of how the Analytical Engine was meant to be used comes not from Babbage but from Ada Lovelace. In 1840 Babbage lectured on the design in Turin; the Italian military engineer Luigi Menabrea wrote up an account of those lectures, published in French in 1842. Lovelace translated Menabrea’s paper into English the following year and appended a set of her own notes, labelled A through G, that ran to roughly three times the length of the original article. The last of these, Note G, works through in detail how the Engine would compute a sequence of Bernoulli numbers, laying out the operations, the variables they act on, and the looping structure needed to generate each term from the ones before it. Because it specifies an explicit, mechanical procedure for a machine to carry out rather than a human, Note G is widely cited as the first published computer program, and Lovelace as the first person to write one — even though the machine it was written for did not exist to run it.
Why it was never built
Babbage kept revising the design for the rest of his life, producing roughly thirty distinct sets of drawings rather than settling on one to build. The scale of the undertaking — thousands of precisely machined brass parts, at a level of mechanical tolerance that stretched Victorian workshop practice — combined with an exhausted relationship with the British government after the abandoned Difference Engine No. 1 to leave the Analytical Engine permanently unfunded. Babbage died in 1871 having built only small trial fragments of the Mill. His notebooks, correspondence, and drawings passed eventually to the Science Museum in London, which holds the primary archive used by researchers ever since.
Proof of buildability, a century and a half later
In 1985 the Science Museum, London, under curator Doron Swade, began building Difference Engine No. 2 — a later, refined Babbage design distinct from the Analytical Engine — using only drawings and tolerances Babbage himself specified. The calculating mechanism was completed in 1991 for the bicentennial of Babbage’s birth, and it worked; a printing unit was added and completed in 2002. The project demonstrated that Babbage’s mechanical designs from this period were not just theoretically sound but buildable with the manufacturing methods available in his own century.
That result is what prompted Plan 28, launched in 2010 by John Graham-Cumming (working with Doron Swade), which set out to digitize and reconcile Babbage’s surviving Analytical Engine drawings — which disagree with each other across design iterations — toward eventually specifying and building a working machine. As of its most recently published project reports, Plan 28 remains a research and design-analysis effort: technical papers, 3D-printed and wood trial constructions of individual mechanisms, and simulation work, rather than a completed physical engine.
Trying it today
No Analytical Engine has ever run, so there is no hardware and no Docker image to point to. The closest thing to “running” the machine is software simulation: John Walker’s Analytical Engine emulator, hosted at Fourmilab, models the Store, Mill, and card reader well enough to execute Babbage-style operation sequences, including a rendition of Lovelace’s Bernoulli-number algorithm from Note G. It is a simulation of a machine that was designed but never completed, not a reconstruction of one that ran.
Why it matters
The Analytical Engine is the point at which the idea of a computer — a single machine, directed by a changeable sequence of instructions, capable of any calculation rather than one fixed calculation — first exists as a complete engineering design rather than a metaphor. Its Store-and-Mill split anticipates the separation of memory from processing that every later computer architecture would rediscover; its card-driven control anticipates the stored program; and its loops and conditional branches anticipate control flow as programmers still write it. That none of this could be built in Babbage’s own century does not diminish the design — it is the reason the Analytical Engine is remembered as a plan for a computer, arrived at by working entirely from mechanical first principles, before there was any electronics to make one easy.
Timeline
Notable Uses & Legacy
Note G: the Bernoulli numbers algorithm
Ada Lovelace's worked example in her 1843 translation of Menabrea's paper, showing step by step how the Analytical Engine's cards and Store would compute a sequence of Bernoulli numbers. It is the machine's best-known 'program', though it ran only on paper — the Engine itself was never built.
Difference Engine No. 2 (Science Museum, London)
Not the Analytical Engine itself, but a physical demonstration that Babbage's contemporaneous mechanical engineering was buildable: the Science Museum constructed this separate, earlier Babbage design from his original drawings, completing the calculating mechanism in 1991 and its printer in 2002.
Plan 28
An ongoing research and engineering effort, founded by John Graham-Cumming and Doron Swade in 2010, to digitize and reconcile Babbage's surviving Analytical Engine drawings and specify a version of the machine that could eventually be built. As of its most recent published project reports, the work remains at the design-analysis and simulation stage.