Mechanical computing

Babbage’s Engines

Charles Babbage (1791–1871) was an English mathematician, inventor, and writer. His interests ranged from economics and secret codes to railway safety. He hosted gatherings of scientists, writers, and politicians at his London home, where he demonstrated a working section of his first Difference Engine. He also openly criticized Britain’s scientific institutions.

Babbage designed two types of calculating machine. His Difference Engine calculated number tables using a fixed method. His Analytical Engine design used programs to direct different calculations. Ada Lovelace studied that design and described how it might also process musical patterns.

Difference Engine No. 2

Babbage designed Difference Engine No. 2 between 1847 and 1849. His design combined numbered wheels, gears, shafts, and levers to calculate number tables.

Photograph-informed reconstruction of Difference Engine No. 2: numbered brass wheel columns in a black iron frame, a crank on the left, and an open printer projecting forward on the right.

Illustrative reconstruction; mechanisms are not engineering accurate.

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.

A simple example: building square numbers by addition
NumberIts squareGap from the previous square
11—
243
395
4167
5259

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.

The Analytical Engine’s proposed design, simplified.

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