Video
Unit video
The narrated video for Unit 2, about 8 minutes, is published with the first release.
Learning purpose: Lovelace, the Analytical Engine, Note G, and what it takes to specify a computation exactly.
Accessible text alternative: the transcript linked below, and this page, which covers the same material.
Transcript of the Unit 2 video
The narration is spoken by synthetic voices made for this course, each shown on screen as a drawn robot. No person is speaking.
Watch what changes
Reading time: about 10 minutes. Activity: about 12 minutes.
1. The document
In 1843 an English scientific journal published a translation of a French-language account of Charles Babbage's Analytical Engine. The account had been written by Luigi Menabrea, after Babbage presented the engine at meetings in Turin in 1840 [P1], [P3, pp. 129-130]; the translator was Ada Lovelace, who signed her work with her initials. She appended seven notes of her own, labelled A to G, and they run substantially longer than Menabrea's article they accompany [P2, pp. 666-731], [P3, p. 136].
The picture below is Babbage's general plan of the engine, Plan 25, dated 6 August 1840 [P4].

Babbage's general plan, Plan 25, 6 August 1840 [P4]. Photograph: ArnoldReinhold, Wikimedia Commons, CC BY 4.0.
Note G — the last of them — sets out how the engine could be made to compute a sequence called the Bernoulli numbers. Unit 6 explains what those numbers are and makes you work one out by hand. This unit is about the form of what Lovelace wrote, because that form is one half of the comparison the whole course rests on.
The full bibliographic citation for the memoir, the translation and the notes is held in References and source policy. This page cites it as (Lovelace 1843, Note G).
2. What Note G actually is
Note G is a prose note, and inside it is a table.
The table is the part this course works from, and what matters is that it is a table rather than a description of a method or an argument that a method would work in principle. It is laid out in order: one line per operation, running from the first thing the machine does to the last. Each line identifies the operation to be performed, the storage columns it takes its inputs from, and the column that receives the result (Lovelace 1843, Note G). Each line also gives its step number, which columns change, and what the result should be, as a formula. So every line can be checked on its own: read the inputs, do the operation, and compare with what the table says should come out.

The Note G diagram as printed, 1843 (facsimile [P2a]): a processed image of the printed plate, public domain, via Wikimedia Commons.
Babbage's design kept two functions physically separate: a store, holding numbers in columns, and a mill, performing arithmetic on numbers brought to it from the store [S1], [P3, pp. 117-118]. Memory in one place, operations in another, and a written procedure saying which values move between them and in what order.
The engine was never completed [S1], [S4], [S12]. Nothing in Note G was ever executed on the machine it was written for. That is worth sitting with: the procedure had to be exact with no chance to run it and catch mistakes, which is the opposite of how most of us write instructions.
3. Three properties worth naming
These three words come back in every later unit, so it is worth being precise about them now.
Determinism
Given the same starting values and the same sequence of operations, the procedure produces the same result. Every time. Not usually, not with high probability — every time.
This is a strong property and it is easy to underrate because it feels obvious. Its practical consequence is that a disagreement between two runs is not variation, it is a fault. Something is broken and can be found. That is a completely different world from one in which two runs are simply expected to differ, which is where Unit 3 takes you.
Explicit state
The state of the machine is the collection of values currently held in its storage columns. Every value in that state is either a stated starting value or was put there by an earlier line.
There is no quantity that is merely understood to be available. If a value is needed and was not stated at the start, you can point at the line that produced it. When you write a procedure by hand, this is the property that fails first: human instructions are full of objects and quantities that were never introduced, and we do not notice because we supply them ourselves as we read.
Control flow
The order of the lines is part of the meaning. Swap two of them and you have a different procedure, not the same procedure written differently.
The order is also not always a straight run from top to bottom. Note G's diagram marks a group of operations to be repeated, with the number of repetitions depending on which Bernoulli number is wanted (Lovelace 1843, Note G). The teaching point needed here is visible in the table itself: a procedure with a controlled repetition computes a whole family of answers, not one answer. That is the difference between a worked trace of one case and a general procedure with a stopping rule — and it is worth saying that a recipe is usually the second of those, not the first. A recipe that says "simmer until it thickens" has a stopping rule and works for any quantity. The contrast is not recipes against algorithms; it is one answer against a family of them.
4. "The first program"
You will have met the claim that Note G is the first computer program [S10, abstract], [S11, sec. 1] and that Ada Lovelace was the first programmer. The claim is useful — it points at something real, and it is why this course starts here. It is also more complicated than a slogan, and the course would be a poor advertisement for verification if it repeated a contested claim without saying so.
What is on firm ground. The notes were published in 1843 with the translation, signed with her initials. Note G contains an ordered table of operations for computing Bernoulli numbers [P2, pp. 722-731]. Those facts do not by themselves show that she was first.
What is genuinely contested.
- Babbage had written sequences of operations for the engine in his own unpublished notebooks before 1843, so whether Note G is "first" depends on whether publication is the criterion [S1], [S4].
- How the work on Note G was divided between Lovelace and Babbage is debated by historians, and the correspondence has been read in more than one way [S2], [S3], [S5], [S10, "Changing perceptions of Lovelace"], [S11, sec. 1].
- "Program" is a modern word for what Note G sets out, and whether Babbage's and Lovelace's sequences of operation cards amount to the concept depends on how the concept is defined. Applying the word backwards is a choice we make, and a defensible one, but it is our choice and not a fact about 1843.
One more established fact, handled carefully. The published table in Note G contains at least one printed error. One of them -- operation 4, an inverted division -- is established from a facsimile [P2a]; a self-published reconstruction [S7, sec. 5.2] lists further faults in operations 24 and 21. The lab runs the table in exact fractions: with every line as intended it gives the documented value, and with operation 4 as printed the result is different. Who made these errors is still disputed. And what the faulty table computes depends on which errors you fix and which starting values you give it. This course does not work through the detail here; Unit 16 treats the whole episode as its case study in historical honesty, including the mistake this course itself made with it. See Historical Notes for what the sources support.
If that feels unsatisfying, notice what it is modelling. "I know this much, this much is disputed, and here is where you can check" is a stronger position than a confident sentence, and it is exactly the position you will need to take about your own AI-assisted work in Unit 17.
5. The sentence that sets up the course
Writing about the limits of what the engine could do, Lovelace put it this way:
The Analytical Engine has no pretensions whatever to originate any thing.
— (Lovelace 1843, Note G)
Read in context, this is a claim about following orders: the machine can carry out a procedure, and carrying out a procedure is not the same as producing something new. Whether the sentence still applies to the systems we have now is a genuine question that Unit 17 returns to, with the comparison made carefully rather than rhetorically.
For now, notice what the sentence takes for granted. It assumes you can say precisely what the machine was ordered to do, and then check whether it did that. Note G is fully checkable in this sense: every line is written down, and any line can be found to be wrong. Somebody did find one. Because the procedure is written out in full, anyone can check it without trusting its author, and that is how the error was found; nobody knows when it was first noticed (Unit 16). Notice also where the error came from: people made it, and it was printed, in work by some of the most careful minds of the period. Human authorship never guaranteed correctness.
Unit 3 is about a system you cannot check line by line like this.
6. Why this course looks the way it does
This is background rather than argument, and nothing in the unit depends on it.
Ada Lovelace was the daughter of the poet Lord Byron, who left England in 1816, when she was a few months old, and never saw her again [S5], [G1, pp. 605-610, 1227] (the keys resolve in References and source policy). Byron, Percy Shelley, Mary Godwin — later Mary Shelley — Claire Clairmont and Byron's physician John Polidori spent part of that summer on Lake Geneva, at and near the Villa Diodati. The ghost-story challenge that produced Frankenstein; or, The Modern Prometheus (1818) and Polidori's The Vampyre (1819) is conventionally dated to that gathering [G2, pp. 125-126] [G3] [G4]. This course is about a machine that produces plausible speech, and about whether it originates anything. It inherits those themes from that tradition rather than borrowing them. That is why the course's visual design leans dark, with a single red accent, instead of the usual palette of an introductory course. What Lovelace herself made of any of that, and whether it touched her mathematical work at all, is not something this course claims. The connection is a visual motif, not a historical inference.
Summary
- Note G is an ordered table of operations for computing Bernoulli numbers, published in 1843 with Lovelace's translation of Menabrea's article.
- Each line is a state change: an operation, its inputs, and where the result goes.
- Ordered procedures are deterministic, hold explicit state, and depend on control flow — including controlled repetition.
- "The first program" is a useful claim with real historical nuance. State what is established, mark what is contested.
- The published table contains printed errors. The one in operation 4 is established from a facsimile; who introduced it is contested. Unit 16 deals with it.
Then answer cp02-ordered-steps at the foot of this page.
Timings: video 8 min, reading 10 min, activity 12 min.
Check yourself
This unit has one checkpoint, answered here. A wrong answer says which misunderstanding it matches. Nothing is uploaded.
Local progress is available in a supported browser.
Prefer a terminal?
The same questions, from The verification lab and self-check:
python3 selfcheck.py run --unit 2