# Primary sources

Working list of sources we will check the simulation against. Discipline same as Jacquard: every mechanical claim should be traceable to a primary source, and the UI should mark "documented" vs "inferred" where reconstruction goes beyond what the source actually shows.

## Babbage's own writings

- **Charles Babbage.** *Passages from the Life of a Philosopher* (1864). Public domain. Babbage's own account of the Difference and Analytical Engines, their funding, and their failures.
- **Babbage's notebooks and design drawings** — held at the Science Museum, London; also at the British Library. The Plan 28 project has digitised many of these. Public domain.

## The Science Museum builds

- **Doron Swade.** *The Difference Engine: Charles Babbage and the Quest to Build the First Computer* (Viking, 2001). The history of the 1985–1991 build of Difference Engine No. 2's calculating section. Cited, not reproduced.
- **Doron Swade.** Various Science Museum technical reports on the 1991 and 2002 builds. The full machine with the printer was completed in 2002 and now sits in the Science Museum and the Computer History Museum (Mountain View).
- **Working machine video** — both museums have demonstration videos of the 2002 build operating. Reference for the actual rotational speeds, sound, and carry-propagation timing.

## Mechanical analyses

- **Allan Bromley.** *Charles Babbage's Difference Engine No. 2* (Annals of the History of Computing, 1990). The definitive technical analysis that enabled the Science Museum build. Cited.
- **Bromley, A. G.** *The Babbage Papers in the Science Museum Library: A Cross-Referenced List* (Science Museum, 1991).

## Modern context

- **James Essinger.** *Jacquard's Web* (2004) — chapters on Babbage's adoption of the Jacquard punched-card mechanism for the Analytical Engine. We already cite this in `jacquard/docs/sources.md`.
- **Plan 28** (plan28.org) — ongoing project to build the Analytical Engine. Their preparatory work cataloguing Babbage's notebooks is relevant to a future Analytical Engine sim (#4 on `docs/historic-mechanisms-ideas.md`).

## Mathematics of finite differences

The Difference Engine evaluates polynomials by repeated addition. For polynomial *p(x)* of degree *n*:
- D₀(x) = p(x)
- D₁(x) = p(x) − p(x−1)
- D₂(x) = D₁(x) − D₁(x−1)
- ...
- Dₙ is constant.

The engine stores Dₙ as a fixed value; on each cycle, Dₙ₋₁ adds Dₙ to itself, Dₙ₋₂ adds Dₙ₋₁ to itself, and so on down to D₀, which is the output.

Standard reference: any numerical analysis textbook; Knuth's *The Art of Computer Programming* vol. 2 §4.6.4 has a clean treatment.

## What we won't claim

- **Carry timing.** The actual mechanical carry propagation in DE No. 2 is staged in two phases per cycle ("addition" then "carry") with a specific gear ratio. Our v0.2 sim will visualise the carry but won't model the exact rotational kinematics. Mark inferred.
- **Number of digits.** DE No. 2 calculates to 31 decimal digits. v0.1 uses 8 for visual sanity; v0.2 may bump to 12. The full 31-digit version is deferred.
