Skip to content
ARC
ScienceAda LovelaceLondon, 18439 min read

Note G: Writing the First Program

The last and longest of Lovelace's notes contains a step-by-step method for a machine to compute a sequence of numbers on its own. It is, by most reckonings, the first published computer program.

Lovelace's tabular diagram for computing Bernoulli numbers on the Analytical Engine
Diagram for the computation of Bernoulli numbers, from Note G, 1843 (public domain).

Most of Lovelace's notes explain what the Analytical Engine could be. The last one shows it working. Note G sets out, operation by operation, how the machine would compute the Bernoulli numbers — and in doing so it reads, unmistakably, like code.

The Bernoulli numbers are a sequence that turns up all over mathematics: in sums of powers, in the expansion of certain functions, in number theory. What made them the right choice for a demonstration is how they are generated. They are not given by a single tidy formula you can evaluate once. Each new number is defined in terms of the ones before it — a recurrence. To produce them, a machine cannot simply run down a fixed list of sums. It has to hold intermediate results, feed them back in, and repeat a block of operations again and again, each pass building on the last.

That requirement — repetition with memory — is exactly what separates a computer from a calculator, and it is why Lovelace picked this problem to close the notes.

The table as a program

Lovelace laid the method out as a table. Each row is a single operation the engine would perform. The columns record which quantities are multiplied, subtracted, or stored, which locations they are drawn from, and where each result is put back. Read top to bottom, the table is a sequence of instructions — twenty-five of them. Read as a whole, it describes a process that cycles: a group of operations set up to run repeatedly, grinding out term after term of the sequence.

The diagram from Note G. Each numbered line is an operation; the working columns show values moving between the engine's store and its mill. It is a flowchart and a program listing at once.

Several ideas we still use every day are already here in embryo. Quantities are held in numbered locations and referred to by those names, not by their values — the germ of the variable. A block of operations is marked to run more than once — the germ of the loop. Results are carried forward from one pass to the next — the germ of state. And the whole thing is planned in advance, on paper, entirely independently of any machine that could run it — the germ of programming itself.

The limit she drew on purpose

Having shown what the engine could do, Lovelace was careful — pointedly careful — to say what it could not. The machine, she wrote, "has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform." It could follow instructions with perfect fidelity; it could not exceed them, could not surprise its programmer with an idea of its own.

The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform.

— Note G, 1843

That sentence — later nicknamed "Lady Lovelace's objection" — became one of the oldest live questions in computer science. In 1950 Alan Turing quoted it directly in Computing Machinery and Intelligence, set it out as a serious challenge, and spent several pages answering it. A claim made about a machine that was never built was still worth refuting a century later.

Afterlife

Lovelace died in 1852, aged thirty-six, and the notes fell into obscurity for the better part of a hundred years. They were recovered from the 1950s onward, as the people building the first real computers went looking for their own prehistory and found her already there. In 1980 the United States Department of Defense named a new programming language Ada in her honour; its military standard was numbered MIL-STD-1815, after the year of her birth. It is a fitting memorial: the first programmer, remembered in the name of a language written for machines she had described but never seen run.

Sources
1
Menabrea, L. F.; Lovelace, Ada (trans., notes). Sketch of the Analytical Engine Invented by Charles Babbage (Note G). Taylor's Scientific Memoirs, Vol. 3, 1843.
2
Turing, Alan M.. Computing Machinery and Intelligence. Mind, Vol. 59, 1950.
3
Toole, Betty Alexandra. Ada, the Enchantress of Numbers. Strawberry Press, 1992.
5
Ada Lovelace. Diagram for the computation of Bernoulli numbers. Wikimedia Commons (public domain).commons.wikimedia.org/wiki/File:Diagram_for_the_computation_of_Bernoulli_numbers.jpg
Archive of Recorded CareersEst. MMXXVI · EN
ARC

A reference archive of public life — the people who shape culture, design, and ideas.

© 2026 ARC · Text under CC BY 4.0 unless noted

Set in Inter · Built with the Avemo framework