Lesson 1 of 81821–18436 min

Babbage's engines and Note G

In the early nineteenth century, navigation, banking and engineering ran on printed tables of numbers, and every one of them had been worked out by hand. People made mistakes, and the mistakes were printed. In 1821 Charles Babbage, checking such tables, wished out loud that the calculations could be done by steam.

He spent the next twenty years trying to build machines that would do exactly that. None of them was finished in his lifetime. One of them, on paper, was a computer.

A machine for tables

Babbage's first design, the Difference Engine, mechanised one technique: the method of finite differences, which reduces a polynomial to a long chain of additions. In 1822 he received government money and hired the toolmaker Joseph Clement to build it. The design called for nearly 25,000 parts. A small demonstration section worked in 1832, but the project stalled, and in 1842 the government stopped paying after more than £17,000, about ten times the original estimate. Babbage later drew an improved Difference Engine No. 2 (1847–1849). The Science Museum in London finally built it from his drawings and completed it in 1991, the bicentenary of his birth. It works.

The Analytical Engine: a store and a mill

From 1834 Babbage worked on something far more ambitious. A difference engine could only do one kind of job. The Analytical Engine was meant to do any calculation it was told to do, and the instructions would arrive on punched cards, borrowed from the Jacquard looms that wove patterns in silk. One deck of cards held the operations, another held the starting values. The machine had two main parts, and their split is the one every computer still has:

  • The store held numbers waiting to be used, a hundred of them with 50 digits each in the main design. Today we call it memory.
  • The mill did the arithmetic on numbers brought from the store. Today we call it the processor.
  • The operation cards told the mill what to do and in what order: the program.
  • The variable cards supplied the starting values: the input data. Results went back to the store or out to a printer: the output.

Note G

Babbage described the engine at a meeting of scientists in Turin in 1840. An Italian engineer in the audience, Luigi Menabrea, published an account in French in October 1842. Ada Lovelace, a mathematician who had known Babbage since 1833, translated it into English and, at Babbage's suggestion, added her own notes. The result appeared in 1843 in Taylor's Scientific Memoirs, signed only “A.A.L.”: 66 pages, 41 of them hers. The last appendix, Note G, works through how the engine would calculate the Bernoulli numbers, a sequence where each value depends on the earlier ones. Her table lists every operation, which variables it reads and where each result goes. It is usually called the first published computer program; computer scientists would call it an execution trace. She also saw further than the arithmetic: if relations between musical notes could be expressed in numbers, she wrote, the engine might compose music.

Key terms

Algorithm
A finite, ordered set of steps that solves a problem. Note G is the first published one written for a machine.
Store
Babbage's name for the part of the Analytical Engine that held numbers: memory.
Mill
Babbage's name for the part that did the arithmetic: the processor.
Punched card
A card whose pattern of holes encodes instructions or data; Babbage took the idea from the Jacquard loom.
Input–processing–output–storage
The four functions every computer performs, already separate in the Analytical Engine.

Check what you learned

  1. 1.In the Analytical Engine, which part corresponds to a modern CPU?

  2. 2.What did Ada Lovelace's Note G set out to calculate?

  3. 3.Why was the Analytical Engine a bigger idea than the Difference Engine?

Practise it for the exam

Sources