History of AI

What was Babbage's Analytical Engine?

· By Robert Scales · 5 min read

Short answer

The Analytical Engine was a general-purpose mechanical computer that Charles Babbage designed from the mid-1830s and first described in 1837. It had a memory (the "Store"), a calculating unit (the "Mill") and instructions fed in on punched cards, the same basic plan that electronic computers follow today.

Charles Babbage's first machine, the Difference Engine, could do one job: produce tables by repeated addition. While that project stalled in the early 1830s, Babbage began to wonder whether a machine could be told what to calculate, instead of having one method built into its gears. The answer was the Analytical Engine, a design for a machine that could carry out any sequence of arithmetic it was given.

It was never completed. Even so, historians treat it as the first design for what we would call a general-purpose computer, and its layout looks remarkably familiar to anyone who has opened a modern one.

When the idea took shape

Dates for the Analytical Engine come in layers, because Babbage kept refining it for the rest of his life. Design work began around 1833 or 1834, while the Difference Engine was stuck. The first description of the new machine dates from 1837, which is why that year is usually given for the event. Between 1837 and 1840 Babbage also wrote about two dozen sample programs for it, covering problems such as polynomials and Bernoulli numbers.

He worked from his home in London, where he converted his coach-house into a forge and foundry and his stables into a workshop, and paid skilled draftsmen to turn his ideas into drawings. To keep track of thousands of moving parts he used a system of symbols he called the Mechanical Notation, which he had first published in 1826.

In 1840 Babbage traveled to Turin, in Italy, and explained the engine to a group of scientists there. A young engineer in the audience, Luigi Menabrea, wrote up the discussions in French in 1842. Ada Lovelace translated that article into English in 1843 and added long notes of her own, which became the best-known account of the machine.

How it was meant to work

Babbage divided the engine into two main parts. The first he called the Store, where all the numbers waiting to be used were kept, along with results from earlier steps. The second was the Mill, where the actual arithmetic happened. Numbers were brought from the Store to the Mill, worked on, and sent back.

Instructions came on punched cards, an idea Babbage borrowed from the Jacquard loom. In those looms, a chain of pasteboard cards with holes in them controlled which threads were lifted, so the same set of cards always wove the same pattern. Babbage pointed out that a weaver could change the colors of the thread and the pattern would stay identical. In the engine, the cards fixed the method, and the numbers were the colors.

There were separate kinds of cards:

  • Operation cards said what to do: add, subtract, multiply or divide.
  • Variable cards said which columns in the Store to take numbers from, and where to put the answer.
  • Number cards supplied constants the calculation needed.

Babbage expected the engine to handle numbers fifty digits long. He estimated it could finish about sixty additions or subtractions a minute, or multiply two fifty-digit numbers in about a minute. Descriptions of his design give the Store room for about 1,000 numbers, and the machine could print results, punch new cards, draw graphs and even ring a bell. Crucially, it could also go back and repeat a set of cards, or skip ahead depending on a result. Those two abilities, looping and branching, are what let a short program solve a long problem.

A worked example: a two-card program

Suppose you want the engine to compute (a + b) × c. Babbage explained that each operation card needs three variable cards: two to name the inputs and one to name where the result goes. With a in column V1, b in V2 and c in V3, the program looks like this:

StepOperation cardInputsResult goes to
1AddV1, V2V4
2MultiplyV4, V3V5

To compute a different formula, you change the cards. To run the same formula with new numbers, you keep the cards and set new values on the wheels. Babbage noticed that this meant every finished set of cards could be reused forever, so the engine would build up what he called "a library of its own."

Try it: Using the same table format, write a three-step card program for (a + b) × (a − b). Which columns will hold the intermediate results, and how many columns do you need in total?

Why it matters

The Computer History Museum points out that the engine's logical plan is, in essence, the plan most electronic computers have used: a memory kept separate from a central processor, instructions read one after another, and ways to get data in and out. Modern names for its features, such as conditional branching and loops, did not exist in Babbage's day, but the ideas are there in his drawings.

That separation between a general machine and the program it runs is the reason one device can do many jobs. The phone in your pocket in 2019 does not have a separate machine for maps, music and its voice assistant; it has one processor and many programs. AI systems are programs too. A speech recognizer or a game-playing system like AlphaGo is, at bottom, a very long set of instructions running on a general-purpose computer, the kind of machine Babbage first described.

Was the Analytical Engine ever built?

No, not as a whole. Babbage never found the funding, and after the troubled Difference Engine project the British government was unwilling to pay for something even larger. He produced more than thirty sets of drawings and kept trying to design a simpler version late in life. A small experimental piece was under construction when he died in 1871.

His son, Henry Prevost Babbage, carried on intermittently between 1880 and 1910 and built part of the Mill and a printing unit. In 1910 it calculated a list of multiples of pi, though the list contained errors. Visitors can see that piece in London's Science Museum. Earlier, in 1878, the British Association, a leading scientific society, had asked a committee to review it; the committee called the design "a marvel of mechanical ingenuity" while advising against building it, partly because no one could estimate the cost.

The question is still open. In 2010 the programmer John Graham-Cumming launched a campaign called Plan 28 to study Babbage's drawings in detail, with the aim of eventually building the engine. Experts have found that the drawings do not yet add up to a single consistent design, so for now the Analytical Engine exists as paper, a few fragments and a set of ideas that every computer has followed since.

Sources

  1. Of the Analytical Engine (chapter VIII of Passages from the Life of a Philosopher) — Charles Babbage, 1864 (transcription by Fourmilab), January 1, 1864
  2. The Engines (The Babbage Engine) — Computer History Museum
  3. Analytical engine — Wikipedia, April 20, 2019

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement