Note G, playable
In 1843 Ada Lovelace translated a paper about Charles Babbage’s Analytical Engine, a machine that was never finished, and added her own notes. The last one, Note G, has a table: every step the Engine would take to work out a number called B7 (one of the Bernoulli numbers). It is often called the first published computer program.
Her table is a trace table, the same kind you fill in on the Paper Machine: each row says what the Engine does, which boxes (she called them variables, V1, V2, …) it reads, which box gets the answer, and what the answer should be. Step through it. Somewhere near the top, the printed table has a slip. When you reach it, the machine stops and asks you to find it.
About this table
- This is the run for n = 4, the one that makes B7. B1, B3 and B5 are already in V21–V23: earlier runs of the same table made them.
- Lovelace marked each variable with a small number counting how many times it had changed. We leave those out to keep the table readable.
- Nobody knows whether the slip at operation 4 was hers or the printer’s. Babbage wrote in 1864 that he had offered to work out the Bernoulli algebra for her, and that she sent it back having found, in his words, “a grave mistake which I had made.” Historians still argue about who did which part. What is not argued: the notes and the table were published under her name.
- Row 24 as printed adds V13 to V24, which gives B7 with the wrong sign; scholars call it a misplaced minus sign. The walk takes V13 away instead, and the table marks that row.
Sources: L. F. Menabrea, “Sketch of the Analytical Engine,” translated with notes by A. A. L. (Ada Lovelace), Scientific Memoirs 3 (1843), Note G · C. Babbage, Passages from the Life of a Philosopher (1864).