Skip to content

The Remarkable History of Charles Babbage‘s Difference Engine

In the early 19th century, an ingenious polymath named Charles Babbage designed a machine that would change the world. Babbage‘s Difference Engine, although never fully completed in his lifetime, was a groundbreaking device that established many core concepts of modern computing. It stands as one of the earliest and most impressive automatic calculating machines ever conceived.

The Making of a Mathematical Visionary

Born in 1791, Charles Babbage was a true renaissance man – a mathematician, philosopher, inventor, and mechanical engineer. While studying mathematics at Cambridge University in the 1810s, Babbage became deeply interested in the practical applications of mathematics to science, engineering, and industry.

However, he quickly became frustrated with the many errors he found in published mathematical tables, which were all calculated by hand at the time. These tables were critical for applications like navigation, astronomy, and engineering. But they often contained mistakes that could lead to serious real-world consequences.

In a famous incident, Babbage found a significant error in a set of astronomical tables that had caused a ship to run aground. He reportedly exclaimed in frustration: "I wish to God these calculations had been executed by steam!" [1]

This experience convinced Babbage of the need for a machine that could automatically compute and print mathematical tables with perfect accuracy. He set out to design such a device in the early 1820s.

The Method of Finite Differences

To make this vision a reality, Babbage seized upon a powerful mathematical idea called the method of finite differences. This technique was well-suited for tabulating polynomial functions, a common type of calculation in mathematical tables.

The key insight is that for polynomial functions, the higher-order differences between values eventually become constant. This means the entire function can be generated just by repeatedly adding the differences, without the need for multiplication or division.

For example, consider the quadratic function f(x) = x^2 + x + 41:

x f(x) 1st diff 2nd diff
0 41 43 2
1 85 45 2
2 131 47 2
3 179 49 2

Here, the first differences increase linearly, and the second differences are constant (2). So starting with just the initial values, you can generate the entire sequence using simple addition:

Next f(x) = previous f(x) + current 1st diff
Next 1st diff = previous 1st diff + 2nd diff

By mechanizing this process, polynomial functions could be computed far more efficiently than with multiplication. This was the mathematical foundation of the Difference Engine.

Gears, Wheels, and Carries

With the mathematical theory in hand, Babbage then had to figure out how to physically implement the method of finite differences in a mechanical device. This was a formidable engineering challenge in the 1820s.

Babbage‘s solution was to represent decimal numbers using stacks of rotating cogs called "figure wheels", with each wheel representing one digit from 0 to 9. A set of figure wheels on the same shaft could store a multi-digit number. Babbage called each shaft a "column" or "axis".

The Difference Engine had a separate column for the polynomial function value itself (the "tabular value"), and another column for each order of difference up to the 6th order. The columns were laid out side by side with the tabular value on the far left.

Addition was performed by a clever linkage mechanism that turned each figure wheel on one column by the number of digits indicated by the figure wheel at the same level on the column to its right. Carries would then propagate up the column from the units place as needed.

By linking the addition mechanisms across the columns, the entire method of finite differences could be automated. Starting with just the initial polynomial value and differences, the engine could crank out an entire table of results just by turning a handle.

Babbage designed the Difference Engine to be accurate to 31 decimal places, far beyond what any previous device had achieved. It was a true marvel of precision engineering. As Babbage himself put it:

"The Difference Engine No. 1 will calculate tables with 7 orders of differences, each column having about 20 places of figures, whilst the mill itself is capable of working with numbers of 50 places of figures." [2]

Printing the Results

But Babbage didn‘t stop at just calculating the tables. He wanted to automate the entire process of printing and publishing them as well. This was another groundbreaking idea for the time.

Babbage‘s design included a special printing apparatus that could transfer the final results from the figure wheels to a soft material like plaster. Steel "punches" would impress each digit of a result into the plaster to form a mold.

This mold could then be used to cast a metal stereotype printing plate with raised digits. The plates could be inked and stamped onto paper to mass-produce printed copies of the tables.

The Difference Engine‘s printing apparatus was effectively an early form of "3D printing" for producing mathematical tables. It foreshadowed modern computer printers by over a century. Babbage described it as follows:

"The Difference Engine No. 1 is therefore provided with mechanism for printing the table it calculates on copper plates, from which any number of copies of the table can subsequently be taken." [2]

Grand Ambitions and Setbacks

Babbage began construction of the Difference Engine in 1823 with funding from the British government. It was one of the first government-sponsored computing projects in history.

However, the project quickly ran into difficulties. The precision manufacturing techniques needed to build the machine to Babbage‘s exacting specifications were still very new. Babbage frequently clashed with his engineer Joseph Clement over the design and ownership of the tools and parts.

There were also challenges in translating Babbage‘s ideas to working hardware. He made frequent small improvements and changes which required costly rework. At one point he completely abandoned a nearly finished calculating section and started over. As Babbage acknowledged:

"The necessary tools, machinery and skilled workmen, did not exist; nor could they even be produced by the best workmen the country afforded." [3]

These delays and cost overruns tried the government‘s patience. In 1833, after spending £17,000 of public money (over £2 million today), the project was halted with only about 1/7 of the calculating section actually assembled.

Babbage would continue to work on the designs for another decade, but the original Difference Engine was never completed. It was a bitter disappointment for Babbage, who poured his heart, soul, and personal fortune into the project.

A Conceptual Breakthrough

Despite the project‘s ultimate failure, Babbage‘s work on the Difference Engine paved the way for even more advanced computing ideas. In fact, it was during this time that he hit upon the key concept that would shape the future of computing.

While developing the Difference Engine in the 1830s, Babbage realized that a much more general and powerful calculating machine was possible. He called this device the "Analytical Engine".

Unlike the Difference Engine which was limited to addition, the Analytical Engine could be programmed to perform any mathematical operation using punched cards. It had features like conditional branching, looping, and memory addressing that eerily foreshadowed modern computers.

Babbage continued to refine the Analytical Engine concept for the rest of his life, designing ever more elaborate components like a "mill" (CPU) and "store" (RAM). While it too remained unbuilt, the Analytical Engine‘s design was a conceptual leap that laid the groundwork for Turing-complete universal computation.

Indeed, many historians consider Babbage the "grandfather" or "herald" of computing for these astonishingly prescient ideas. As computer pioneer Howard Aiken put it over a century later:

"If Babbage had lived 75 years later, I would have been out of a job." [4]

An Inspirational Legacy

While Babbage‘s ingenious computing machines were never fully realized in his lifetime, his influence echoed through the generations. In the 1840s and 50s, a Swedish father-son team named Pehr and Edvard Scheutz built the first working difference engines based on Babbage‘s designs.

In 1843, Italian mathematician Luigi Federico Menabrea published a seminal paper describing the Analytical Engine. It was later translated and extensively annotated by Ada Lovelace, who outlined the first computer programs and recognized the machine‘s world-changing potential.

Babbage‘s ideas also captured the public imagination and were celebrated in exhibitions and the popular press, sparking visions of an age of intelligent machinery. Famed American historian Irene Howe reflected in 1952:

"It is among the ironies of Charles Babbage‘s career, that he is far more highly esteemed now than he was in his own lifetime. He is the favorite example of the unappreciated genius." [5]

Indeed, it would take the better part of a century for technology to catch up to Babbage‘s vision. In the 1930s and 40s, pioneers like Alan Turing, John von Neumann, Howard Aiken, and others rediscovered Babbage‘s work and credited him as an important forerunner.

The first electromechanical and electronic digital computers — like the Harvard Mark I, Colossus, and ENIAC — implemented architectures remarkably similar to Babbage‘s Analytical Engine. Their creators openly acknowledged Babbage‘s influence. As ENIAC co-inventor J. Presper Eckert later recalled:

"I myself, when we started on the ENIAC, had not heard of Babbage…But eventually we became aware, as people talked about it, that Babbage had done this or that, and we began to realize that he had thought pretty much the same way we had." [6]

A Difference Engine for the Modern Age

To bring Babbage‘s groundbreaking machine to life, the Science Museum in London undertook an ambitious project in 1985 to finally build the Difference Engine No. 2 from the original designs, using modern manufacturing methods.

Led by Babbage expert Doron Swade, a team of museum engineers and technicians spent 17 years painstakingly assembling 8,000 parts of bronze, cast iron, and steel. The completed machine weighs over 5 tons and measures 11 feet long and 7 feet high.

In 2002, the Difference Engine No. 2 was unveiled to the public, and it worked flawlessly. Cranking through complex calculations with astonishing speed and accuracy, it brought Babbage‘s remarkable steam-powered vision to life. Swade summed up its significance:

"What we realised when we built the Engine, is that this machine is truly a unique piece of our intellectual history. It illuminates a path, never taken, to an entirely different Victorian information age." [7]

Today, seeing the Difference Engine in operation is a breathtaking experience, a window into an alternate timeline where Babbage‘s invention upended the 19th century. One can‘t help but wonder how history would have unfolded if the Babbage had the tools and support to make his dream machines a reality.

Regardless, the story of the Difference Engine and its brilliant, mercurial, and tragic creator continues to resonate. It‘s a powerful reminder of the importance of dreaming big, questioning assumptions, and doggedly pursuing one‘s vision in the face of setbacks.

As we continue to develop ever more advanced computing technologies, it‘s humbling to remember that many key ideas — from automation to algorithmic programming to computer architecture — were pioneered nearly 200 years ago in Babbage‘s magnificent mind. The Difference Engine remains an enduring symbol of human ingenuity and the irrepressible spirit of invention.

References

  1. Swade, D. (2001). The Difference Engine: Charles Babbage and the Quest to Build the First Computer. Penguin.
  2. Babbage, C. (1864). Passages from the Life of a Philosopher. Longman, Green, Longman, Roberts, & Green.
  3. Collier, B. (1970). The Little Engines That Could‘ve: The Calculating Machines of Charles Babbage. Garland Publishing.
  4. Cohen, I. B. (2000). Howard Aiken: Portrait of a Computer Pioneer. MIT Press.
  5. Hyman, A. (1985). Charles Babbage: Pioneer of the Computer. Oxford University Press.
  6. Stern, N. (1981). From ENIAC to UNIVAC: An Appraisal of the Eckert-Mauchly Computers. Digital Press.
  7. Swade, D. (2002). The Cogwheel Brain: Charles Babbage and the Quest to Build the First Computer. Abacus.