FREE HISTORICAL FIGURES OF COMPUTING PROFILE

Charles Babbage

1791–1871 · Inventor & mathematician

Charles Babbage

Difference engines and the Analytical Engine · 1791–1871 · England

Babbage developed two importantly different approaches to mechanized computation. Difference engines generated numerical tables by a fixed arithmetic method. His Analytical Engine designs aimed at much more flexible, card-controlled calculation. Understanding the distinction is more useful than treating every engine as an early version of the same modern computer.

Designs, assemblies, and later construction

Babbage's difference-engine project began in the 1820s. A substantial demonstration portion of Difference Engine No. 1 was assembled in 1832, but the complete machine was not built. The Analytical Engine developed through several designs from the 1830s onward. Its proposed mill performed arithmetic, its store held numbers, and cards controlled operations and the use of variables. It was decimal and digital: a valid digit occupied one of ten discrete positions. "Digital" does not mean "binary." Computer History Museum, The Engines

Printed numerical tables were important infrastructure. Calculation, copying, and typesetting could introduce errors. Babbage sought to integrate calculation with output production, reducing opportunities for transcription mistakes. That aim was not a proof that an automated machine could never produce an incorrect result. Computer History Museum, historical context

The Science Museum's later construction of Difference Engine No. 2 is specific evidence about that design. Its calculating section was completed in 1991 and its printing and stereotyping apparatus in 2002. Modern manufacturing methods were used while keeping precision within what Babbage's period could achieve. The drawings required additional manufacturing detail. This was not a flawless first attempt using only nineteenth-century production methods, and it did not validate every Analytical Engine design. Computer History Museum, A Modern Sequel

Worked mechanism: a cubic table using addition

Define the forward difference Δf(n)=f(n+1)-f(n). For f(n)=n³, the values and differences begin:

nf(n)Δf(n)Δ²f(n)Δ³f(n)
00166
117126
2819186
32737246
46461306

Store the row as (v,d1,d2,d3). Advance using the old values:

new_v  = v  + d1
new_d1 = d1 + d2
new_d2 = d2 + d3
new_d3 = d3

Starting from (0,1,6,6), the successive states are (1,7,12,6), (8,19,18,6), (27,37,24,6), and (64,61,30,6). After initialization, no multiplication is needed.

The reason is algebraic. Subtracting n^k from (n+1)^k cancels the leading term, leaving a polynomial of degree k-1. Repeating the difference operation reduces degree repeatedly; for a degree-k polynomial the kth difference is constant when arguments are equally spaced. The method is exact for the polynomial with exact arithmetic. It does not make a polynomial approximation to a nonpolynomial function exact. Museum explanation of finite differences

Update order and state invariants

In-place assignments must preserve the intended old values. Executing v=v+d1, then d1=d1+d2, then d2=d2+d3 is correct because each right-hand side still uses the needed old higher difference. Reversing that order is wrong: from (0,1,6,6), first updating d2 gives 12, then d1 gives 13, then v gives 13 instead of 1.

This is a data-dependency issue, not a limitation of addition. A programmer can also use temporary variables or simultaneous assignment. A mechanical design needs its own timing arrangement to respect the same mathematical dependency. The abstract algorithm does not specify that timing automatically.

An invariant after n steps is v=n³, d1=3n²+3n+1, d2=6n+6, and d3=6. Substituting these expressions into the update proves the next state. That gives a mathematical correctness argument for all nonnegative n, subject to adequate storage. A fixed-width physical register can overflow even when the proof over unbounded integers is correct.

What generality adds

A difference engine has a specialized update rule. Changing initial differences changes the polynomial table but does not turn that fixed rule into arbitrary computation. The Analytical Engine's proposed control of operations and variables aimed at a broader class of tasks. Its instruction cards were external to its numerical store. That differs from the later stored-program convention in which machine instructions are represented in memory accessible as data.

Modern terms such as processor and memory can aid comparison, but they should not imply identical timing, addressing costs, instruction formats, or physical organization. Generality also requires resource assumptions: a machine with finite storage does not literally execute every possible computation to completion.

Exercises

  1. Initialize a difference table for f(n)=2n²+3n+1 at n=0 and generate values through n=5 using additions. Prove the update invariant.
  2. In the cubic example, an initialization error changes d2 from 6 to 7, while the other initial entries remain correct. Derive the error in v after n steps. Check n=1,2,3,4. Does a constant initial error remain constant in the output?
  3. A successful modern Difference Engine No. 2 demonstration is cited as proof that the complete Analytical Engine was already a finished, manufacturable design in 1834. Identify the two changes of subject and specify the evidence needed for the stronger conclusion.
Compare your reasoning with the worked solutions
  1. The initial state is (v,d1,d2)=(1,5,4). Additions produce values 1,6,15,28,45,66. At step n, v=2n²+3n+1, d1=4n+5, and d2=4. Adding d1 gives 2n²+7n+6=2(n+1)²+3(n+1)+1; adding 4 to d1 gives 4(n+1)+5. Thus the invariant advances correctly.
  2. Let errors be e0,e1,e2. Initially they are (0,0,1) and satisfy e0'=e0+e1, e1'=e1+1, e2'=1. Hence e1=n and e0=n(n-1)/2. The output errors at n=1,2,3,4 are 0,1,3,6. Repeated accumulation amplifies an error in a higher difference. Correct machinery cannot repair an incorrect initialization merely by executing it precisely.
  3. The argument switches from a difference engine to an analytical engine, and from a modern interpreted construction to a specific earlier design state. Establishing the stronger claim requires identifying the exact 1834 design, showing sufficient specifications for manufacture, and testing the relevant mechanisms and interactions. Later success is important evidence for one design and its achievable precision, but it cannot substitute for that separate investigation.