Why did Babbage design the Difference Engine?
In the 1800s, sailors, scientists, and engineers used printed number tables to help with calculations. People worked out the numbers by hand, copied them, and prepared them for printing. Errors could enter the tables at any stage.
Babbage wanted to reduce those errors. He designed the Difference Engine to calculate tables and prepare the results for printing. The machine would reduce the need for people to copy numbers.
How the wheels calculated
Each numbered wheel held one digit, from 0 to 9. A column of wheels held a complete number. An operator set the starting values and turned the crank. The mechanism then added numbers from the columns in a fixed order.
The engine took its name from the differences, or gaps, between numbers. In this example, we started with square numbers, such as 3 × 3 = 9. The gaps increased by two each time.
| Number | Its square | Gap from the previous square |
|---|---|---|
| 1 | 1 | — |
| 2 | 4 | 3 |
| 3 | 9 | 5 |
| 4 | 16 | 7 |
| 5 | 25 | 9 |
In the last row, 25 is the square of 5, and 9 is the gap between 16 and 25. Each gap is 2 larger than the one before it, so the next gap is 9 + 2 = 11. Add that gap to 25 to get the next square: 25 + 11 = 36. The engine repeated these additions, using more columns to produce more complex sequences.
From a calculator to a programmable machine
Babbage’s earlier Difference Engine design automated calculation, but followed one method. He began designing the Analytical Engine in the 1830s to handle different tasks. Punched cards would carry its instructions. Changing the cards would change its program.
The design separated two jobs. A “store” would hold numbers, while a “mill” would do the arithmetic. Later computers used memory and processors for these roles. Babbage also planned ways for the engine to repeat instructions or choose its next action based on a result.
Babbage revised the design many times without completing a final plan. Lessons from this work helped him simplify Difference Engine No. 2.
What Ada Lovelace contributed
In 1843, Ada Lovelace published a translation of an article about the Analytical Engine. She added her own notes, including a program to calculate a sequence called Bernoulli numbers. She organized the calculation into steps the engine could follow. Her work led many people to consider her the first computer programmer.
Lovelace also recognized that numbers could represent musical notes rather than amounts. If people expressed musical patterns as rules, she reasoned, the engine might compose music.
Why these designs mattered
Babbage never completed either full engine. In 1991, the Science Museum in London built the calculating section of Difference Engine No. 2 and demonstrated that it worked. Engineers later added a printer that made moulds for printing plates.
His Analytical Engine plans combined storage, calculation, and programs before electronic computers existed. They marked an early attempt to design a general-purpose computer. Many later computer builders developed similar ideas independently, without knowing about his work.
References
- Computer History Museum: The Babbage Engine — history and biographies of Charles Babbage and Ada Lovelace
- Science Museum in London: Babbage’s Difference Engine No. 2 — collection record
- Doron Swade, Science Museum in London: Difference Engine No. 2: Technical Description (PDF)
- Tim Robinson, Computer History Museum: The Analytical Engine: 28 Plans and Counting
