JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
Back to the library
Computer Science 1843

Sketch of the Analytical Engine, with the Translator's Notes

Ada Lovelace (notes) & L. F. Menabrea

The first published algorithm — and the first glimpse that a machine could do far more than arithmetic.

Choose your version
In depth · the introduction

In 1843, before any computer existed, a young woman wrote the first program — and guessed what computers might one day become.

The big idea

Charles Babbage had designed a vast mechanical computer, the Analytical Engine, that read its instructions from punched cards. He saw it as a powerful calculator. Ada Lovelace, translating a paper about it, added notes of her own — and saw something larger.

She realised the machine was general: by feeding it different cards, you could make it carry out any procedure you could spell out, not just one fixed sum. To prove it, she wrote out, step by step, how the engine would compute a tricky sequence of numbers — the first algorithm ever published for a machine. Then she went further still: if the machine could handle symbols, and if music or other things could be written as symbols, the engine might one day compose music. No one would take that idea seriously again for a hundred years.

How it came about

Ada was the daughter of the poet Lord Byron, raised on mathematics by a mother determined to keep poetry out of her. As a teenager she met Babbage and his calculating machines, and the two became long-time correspondents. When an Italian engineer, Menabrea, published a description of the Analytical Engine in French, Ada translated it into English.

Babbage suggested she add notes. The notes grew until they were three times longer than the paper itself, and they are where her ideas live. She labelled them A to G and signed them only 'A.A.L.' — her name did not appear. Note G contains the famous program for the Bernoulli numbers. She died at 36, long before any such machine was built, and her work was half-forgotten until the computer age rediscovered it.

Why it mattered

Lovelace saw the difference between a calculator and a computer a century before there was one to point at. A calculator does sums; a computer follows programs — and can be told to do anything you can describe precisely, with numbers or with symbols standing for other things. That single idea is what makes the device in your pocket able to show photos, play music, and write text, not just add. She is widely honoured as the first programmer, and a programming language, Ada, carries her name.

A way to picture it

Lovelace's own image is still the best. A Jacquard loom weaves a picture by reading a chain of punched cards — change the cards, change the picture, with no change to the loom. The Analytical Engine, she wrote, 'weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.' Swap the cards and the same machine computes something new. That is exactly what installing a different app does to your phone.

A row of operation cards that loops back on itself. Press Run and the same cards repeat, each pass computing the next number in a table — a hands-on version of the looping program Lovelace wrote in Note G.

Where it sits

This is the earliest signpost on the road this Library traces through computing. A century later Alan Turing (1936) defined, in pure mathematics, what a general machine can compute, and in 1950 he answered Lovelace by name — her claim that a machine 'cannot originate anything' became 'Lady Lovelace's Objection,' the opening move in the debate about machine intelligence. From there the line runs through von Neumann's stored-program design (1945) to every device that now runs software.

The original document
Original source text
L. F. Menabrea, trans. & notes by A. A. Lovelace · Scientific Memoirs 3 (1843): 666–731
The published work is Lovelace's English translation of Luigi Menabrea's French account of Babbage's unbuilt Analytical Engine, followed by seven Notes of her own, labelled A to G and signed only with her initials. The Notes run to nearly three times the length of the memoir they annotate, and it is in them — not in the translated paper — that the ideas the Library remembers appear.
Note A — a machine beyond mere number
Lovelace draws the crucial line between Babbage's earlier Difference Engine, which could only tabulate by repeated addition, and the Analytical Engine, a general-purpose machine that follows instructions punched on cards. She borrows the image of the Jacquard loom, whose punched cards weave any pattern a designer can specify.
We may say most aptly that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.
She then takes a step no one else did for a century: if other things besides numbers could be represented by the engine's symbols, it could operate on them too.
Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.
Note G — the first program, and a famous limit
Note G lays out, in a step-by-step table of operations and Variable columns, how the engine would compute the Bernoulli numbers — a sequence too laborious for hand calculation — by running a fixed group of operation cards over and over in a cycle. This table is regarded as the first algorithm published for a machine. The same Note sets a careful boundary on what the machine is.
The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform.
[ … ]
Signed A.A.L. · 1843