# What is the difference between Babbage's analytical and difference engine?

What is the difference between Babbage's analytical and difference engine? Can they even be compared?

• This is a history question, not a question about theoretical computer science. And the Wikipedia articles are pretty clear about the differences. Commented May 27, 2013 at 5:56
• history is on topic here & maybe there is some scientific analysis of the two that would fit here. or maybe migrate to cs.se? however in short, the analytical engine is Turing complete whereas the difference engine is not and has a more limited set of mathematical functions it can compute (question...precisely which set?). my understanding, something close to limited degree integer polynomials...
– vzn
Commented May 27, 2013 at 14:16

## 3 Answers

They would be different from each other in a very significant way. In the comments there is a link to the Wikipedia articles on both machines - which are quite informative - but I'll assume they weren't useful to you.

You can think of the Analytical Engine basically as a regular computer, which would have a program coded in punched cards, that were attached to each other forming a chain (there would actually be three kinds of cards, each with its own reader, check this out). The machine also had a control unit whose job was to decode the instructions of this program and perform them on the data that was stored in a memory capable of holding a thousand numbers.

The Difference Engine, on the other hand, would have been exactly a calculator, and one that could perform just one kind of operation, repeatedly, on a sequence of numbers. In the "Sketch of the Analytical Engine", authored by Luigi Menabrea, and famously translated by Ada Lovelace, the nature and general applicability of this operation is detailed:

The theorem on which is based the construction of the machine we have just been describing, is a particular case of the following more general theorem: that if in any polynomial whatever, the highest power of whose variable is m, this same variable be increased by equal degrees; the corresponding values of the polynomial then calculated, and the first, second, third, &c. differences of these be taken (as for the preceding series of squares); the mth differences will all be equal to each other. So that, in order to reproduce the series of values of the polynomial by means of a machine analogous to the one above described, it is sufficient that there be (m+1) dials, having the mutual relations we have indicated. As the differences may be either positive or negative, the machine will have a contrivance for either advancing or retrograding each needle, according as the number to be algebraically added may have the sign plus or minus. (emphasis added)

By calculating series of values of polynomial functions many useful calculations can be approximated, including those of trigonometric and logarithmic functions. This method has its limits, though, which are explained a bit further in the document. In doing that, the justification for the construction of the new machine is given:

We see that its use is confined to cases where the numbers required are such as can be obtained by means of simple additions or subtractions; that the machine is, so to speak, merely the expression of one particular theorem of analysis; and that, in short, its operations cannot be extended so as to embrace the solution of an infinity of other questions included within the domain of mathematical analysis. It was while contemplating the vast field which yet remained to be traversed, that Mr. Babbage, renouncing his original essays, conceived the plan of another system of mechanism whose operations should themselves possess all the generality of algebraical notation, and which, on this account, he denominates the Analytical Engine. (emphasis added)

According to Ada in her notes A:

"The analytical engine, on the contrary, is not merely adapted for tabulating the results of one particular function (which implies the difference machine is intended to tabulate the results of one particular function)but for developing and tabulating any function whatever.In fact the engine may be described as being the material expression of any indefinite function of any degree of generality and complexity, such as for instance,

                          F {x,y,z, log.r, sin (y), x^P, &c.)
which is, it will be observed, a function of all other possible functions of any other quantities.".

Let us take multiplication of two simple equation: (5x+4), (3x+7).

In Difference Engine (DE) one cannot give it directly. The intermediate steps needs to be performed manually and the coefficient of x square will be (5*3) = 15
the coefficient of x will be (5*7) + (3*4) = 35 + 12 = 47
and the constant term will be 28.
These coefficients will be placed in the columns (similiar to the concept of registers) of the DE and the list of x values also needs to be fed for which the polynomial equations will be directly evaluated by the principle of Method of Difference. But in Analytical Engine (AE) the intermediate steps are automatically computed way similar to the modern way of programming and computing whereas we cannot program DE and also we need to set specific initial state of the dials (components of DE) which is comparatively way inferior to AE.

The difference that arises between DE and AE is mainly due to the construction and the underlying principle. The design of AE contains mill and the storage which is equivalent to the concepts of CPU and memory respectively which are not present in DE . The basic arithmetic operations in AE are independent to each other but in DE other operations are realised by the addition operation.

Still DE is much faster than AE and also Difference Engines are constructed whereas Analytical Engine has not been constructed yet due to its mechanical complexities.

the main difference between those two engine is difference engine can only do one mathematical operation that is addition on the other hand analytical engine can do the four basic mathematical operation (addition,division,multiplication ... )...

• This is unsourced and directly contradicts the other answer. (And wouldn't it be weird to call something a difference engine if it could only do addition?) Commented Nov 10, 2016 at 21:05
• I encourage you to elaborate the answer and give some sources. The difference engine indeed performs only additions (and subtractions are via complement).
– Evil
Commented Nov 10, 2016 at 21:35