Automatic Computation: Charles Babbage and Computational Method

Doron D. Swade


The start of automatic computation is routinely traced to the 19th century and Charles Babbage’s ambitious designs for his vast but unrealised mechanical calculating engines. Received perceptions and almost all historical accounts portray the initial stimulus for the Engines as the wish to eliminate the risk of error in the production of printed mathematical tables, the essential processes for which were performed by humans. The genesis episode is captured in the well-known vignette of Babbage and his friend John Herschel who, in 1821, were checking astronomical tables commissioned by the newly formed Astronomical Society.1 The results had been calculated manually by two separate human computers. In the course of checking the independently computed results Babbage, dismayed by the discrepancies in the two sets of calculations proclaimed, ‘I wish to god these calculations had been executed by steam’.2 If there was a point in time that marked the start of automatic computation, this was surely it. The historian and novelist Peter Ackroyd, describes this as ‘one of the most wonderful sentences of the 19th century’.3

 ‘Steam’ has been routinely taken as a metaphor for the infallibility of machinery. Not only would the machines calculate without error but mechanical infallibly would extend to automatic typesetting, printing and inked copy, and the automatic production of stereotype moulds from which printing plates could be made. With typesetting and stereotyping integral to the mechanisms, the Engines would eliminate the risk of human error to which each of the manual processes was prone—calculation, typesetting in loose type, printing, and verification by proof-checking.4 Babbage did not assume that his engines would be inherently infallible in virtue of being mechanical but that mechanism could be made to be so by using security devices that would ensure the integrity of results.

‘Steam’ can also be seen as a metaphor for production, that is to say, a solution to the problem of supply. In the idiom of production, the Engines would be a ‘manufactory of numbers’ and in Babbage’s invocation of ‘steam’ we have the essential extension of the industrial metaphor from goods to information, from the physical to the mental, from thing to thought.5 The episode with Herschel in 1821 was Babbage’s mechanical epiphany. He started immediately on the design of his first Difference Engine and spent the better part of the rest of his life in pursuit of the ideal of mechanised calculation, in the course of which he was led from the mechanisation of arithmetic to fully fledged general-purpose computation.

The purpose and ‘utility’ of Babbage’s Engines

The received perception is that both the initial purpose and the enduring motive for Babbage’s Engines was the elimination of the risk of error from the production of mathematical tables. Most historical accounts of Babbage and his Engines feature the central role of errors in the motivational landscape for the Engines.

There are two main sources that inform this view. There is the vignette of Babbage and Herschel already mentioned in which Babbage invokes ‘steam’ as the remedial agency for errorless production. That tabular errors provided the jumping-off point is well supported: Babbage documented the episode at least three times with his own role more fulsomely credited with each retelling. He may well have dramatised the episode and aggrandised his role with the passage of time, but that the episode happened and was the starting point of his efforts to build automatic calculating engines is credibly evidenced in published accounts and was nowhere challenged by Herschel who was present at the time. Historians, endlessly charmed by the episode, appear to have translated the initial stimulus of tabular errors into an enduring motive. That Babbage, who was frustratingly reticent about his intentions, continued to work intermittently on the design of his machines for the rest of his life does little to discourage us from the notion that his motives throughout remained unchanged.

The second source that gives tabular errors a central role is the most substantial contemporary description of Babbage’s Difference Engine No. 1—a lengthy article published by Dionysius Lardner in 1834.6 Lardner argues, with hallmark grandiloquence, that printed mathematical tables were generically flawed. He cites the results of a survey of 40 volumes of tables randomly selected from a substantial collection in which he compiled the number of published errata, that is, entries acknowledged by the publishers to be in error.7 He announced with evident glee that there were in excess of known 3,700 errors and argued that that each error found represented countless yet unfound errors and that tables were therefore effectively immune to improvement by correction. He appears to take no account of the progressive ‘purification’ of the host tables through use over decades and sometimes centuries. He laments the dangers of flawed tables for science and astronomical navigation and claims, with the full rigour of rhetoric, that it is only the ‘unerring certainty of mechanical agency’, that is, Babbage’s Engines, that could remedy the problem.8 Errors are the central feature of Lardner’s advocacy for Babbage’s Engines, and his case has had a defining influence on almost all historical accounts since.

For Lardner the motivational landscape was clear: errors are the problem, machines the solution—a classic problem-solution pairing not unlike the clear-cut story of Harrison’s clocks and the problem of longitude the century before. Because Babbage collaborated with Lardner on the article and provided most of the technical material, and because the article extravagantly championed the Engines, it has been easy to assume that Lardner was Babbage’s mouthpiece—that is that the views expressed by Lardner were Babbage’s. It is Lardner’s article more than anything else that so explicitly identified tabular errors as the ‘problem’ and the Engines as the ‘solution’ and from which we have inherited the primacy of errors in our account of Babbage’s efforts.

The timing and circumstances of Lardner’s article are revealing. The article was published in the July issue of Edinburgh Review in 1834, thirteen years after Babbage’s first conception of the Difference Engine and a year after the collapse of the construction project when his engineer, Joseph Clement, downed tools and fired his workmen following an unresolved dispute with Babbage over compensation. To uncouple the historical conflation of Lardner’s views and Babbage’s we need to revisit Babbage’s earliest writings on the Engines before Lardner came on the scene and framed utility the way he did.

In the six months between June and December 1822, shortly after he had performed the first trials on a prototype model of the Difference Engine, Babbage wrote five papers in which he articulates the capabilities of the machine, and his aspirations for it, this before he entertained any serious ambitions to build a full size machine. The audience was the scientific community including mathematicians and astronomers, many of whom were Babbage’s colleagues and friends. Four of the five papers explore the mathematical promise of the Engines. The exception was an open letter to Sir Humphrey Davy, then President of the Royal Society, which has a promotional agenda that goes beyond the workings and capabilities of the machines. It is here that we find the strongest case for errors as justification. The open letter was clearly written with wider consumption in mind as part of an incipient campaign for a full-scale machine. In his representations to Davy errors feature as a device of persuasion in which benefits were framed in utilitarian terms in support of a prospective construction project.

It becomes clear from these papers that while the elimination of errors in tables does feature, sometimes only incidentally, it does so alongside several other benefits and justifications, central amongst which is the mathematical potential of the machines, which emerges as Babbage’s pre-eminent preoccupation and the focus of his earliest interests. For Babbage the Engines represented a new technology of mathematics and it is this that intrigued and excited him. Errors in human computation were important but, in contrast, mundane. It is the mathematical and computational dimensions that have been obscured by Lardner’s advocacy and this has tended to mislead historians ever since.

Given the prominence of mathematics in Babbage’s aspirations for his Engines, it is curious that in Lardner’s enthusiastic championing of Babbage’s Engines there is little mention of the mathematical prospects for the machines. The circumstances are telling. Lardner made a lucrative living from writing and lecturing and developed a series of lectures on Babbage’s Engines for his speaking tour of the northern industrial cities of England during the first quarter of 1834. However, the institutes and societies that hosted his lectures opposed the topic ‘as being too hard and too scientific’ for a popular audience.9 Lardner dumbed down the lectures underplaying the mathematical aspirations of the engines, and made much of the scandal of tabular errors as a dramatic device to make the material accessible. The lectures were a resounding success. The published article that has so influenced subsequent perceptions was a write-up of the lectures. The false emphasis given to errors has its roots in showmanship and was used as a simplifying device in response to the need to appeal to non-specialists. The formula was one tried and tested in the lecture halls of the industrial north, and the tendentious reframing that foregrounded the problem of errors migrated from the podium to the published account.

In casting Babbage’s grand venture as a problem-solution pairing, Lardner underplayed the richer aspirations for the Engines. In doing so he did Babbage’s interests fatal damage. The utility of the Engines as a solution to table making was resoundingly rejected by experts in England and on the Continent: by George Biddell Airy in England, by Nils Selander in Sweden, and by Joseph Leverrier in France. By identifying the value of the Engines as the practical utility of eliminating errors in the production of tables, Lardner forced the Engine advocates to defend the machine from a position of weakness. This perhaps explains why Babbage, who while capable of incontinently savagery in his public criticisms of those he disagreed with, is oddly silent in defence of the practical utility of his machines to table making. His early writings support the thesis that his views of their worth went well beyond these important but mundane benefits.10

Contemporary arguments for the utility of the engines are difficult to navigate. Babbage does not refer in any consistent or systematic way to the benefits of his machines. His written papers do not present a unified or structured advocacy, nor do the arguments build on each other is a progressive way. The papers tend to feature his current preoccupations and it is often difficult to unbundle compound statements of multiple benefits, or to establish relative importance in his arguments.

As part of a larger study of I offer the following map as a navigation aid to Babbage’s arguments for utility and those of other contemporary advocates including Lardner, Herschel, Francis Bacon, and Georg and Edvard Scheutz. The map helps to locate Lardner’s arguments in a broader landscape that includes the mathematical utility of the Engines and the origins of computational process.

The terms in which Babbage and the Engine advocates framed utility can be seen to fall into two categories: remedies for known deficiencies in tables; and new practical and theoretical implications of automatic computation—how better or differently to do what was already being done on the one hand, and the promise of doing what had not yet been done on the other.

The supposed infallibility of machines would ensure the integrity of the generic processes involved in the manual production of tables: calculation, transcription, verification, typesetting, proofreading and printing. Infallibility ensured quality. The speed of the machine, and the generality of the method of differences (polynomial approximation within given domains using Taylor’s expansion of well-behaved mathematical functions) ensured production, and supply on demand. The metaphor of industrial production as a solution to the problem of supply was echoed by Lardner, who refers to the ‘mechanical fabrication of tables’, and also by Babbage’s son, Benjamin Herschel, when he described the Difference Engine as ‘emphatically a machine for manufacturing tables’.11 So the elimination of errors is only part of the remedial benefits for the deficiencies of existing practice, and then only part of a yet larger picture of utility that extends beyond the mechanisation of manual processes.

It is Babbage’s mathematical expectations for his engines (the right hand side of the table) that are of particular interest here, as it these new theoretical explorations that contain the seeds of computational method and several key features that reappear in what later became computer science.

Computation as systematic method

Babbage’s ideas on computation as systematic method feature clearly in his earliest writing on the prospects for automated calculation. In his letter to Humphrey Davy Babbage wrote:  

Another and very remarkable point in the structure of this machine is, that it will calculate tables governed by laws which have not been hitherto shown to be explicitly determinable, or that it will solve equations for which analytical methods of solution have not yet been contrived’.12

There are two elements of his claim to Davy: the ability of the machine to calculate series for which there is no given analytical formula for the nth term; and the ability to solve equations with no known analytical solution.

The roots or solutions of an equation are the values of the independent variable at which the function passes through zero. The standard analytical technique for solving equations was to equate the expression to zero and to solve for the unknown. There was no systematic process for doing this and the success of the process depends on ingenuity, creativity, and often an ability to manipulate the problem into a recognisable form that has a known class of solution. Not only was there no guarantee of solution using such techniques, but there was no way of determining whether or not the equation in question was soluble in principle. If analytical methods failed, then trial and error substitution could be tried. This involves substituting trial values of the independent variable and repeating this process to see if a value of the argument can be found that reduces the function to zero. But the technique was hit and miss. It was regarded as ‘inelegant’ by mathematicians and did not guarantee success.

What was new in Babbage’s description of solving equations with machines was the use of computation as a systematic method of solution. As mentioned earlier, the solution to the equation is the value of the independent variable that reduces the value of the function to zero. Starting with an initial value of the independent variable, each cycle of the Engine generates each next tabular value, and the machine has found a ‘solution’ when the figure wheels giving the tabular result are all at zero. Finding a solution reduces to detecting the all-zero state, and the number of machine cycles taken to achieve this represents the value of the independent variable, which is the solution sought.

Rather than rely on visual detection of a particular tabular value, Babbage incorporated a bell in his second machine that rings to alert the operator to the occurrence of specific conditions in the column of tabular values.13 If the bell mechanism can be set to detect the all-zero condition, or a sign change, then ‘extracting the roots of equations’ involves the operator in setting the initial values, then cranking the handle to cycle the machine until the bell rings. He would then halt the machine and read off the number of cycles the machine had run from one of the registers acting as a cycle counter. This number is the first root of the equation. If there are multiple roots, as there would be in most cases, the operator keeps cranking, until the bell rings again. In the event that there are no roots, the machine continues ad infinitum without the zero state or sign change occurring.

There is no reason why detection of the all-zero state should not automatically halt the machine on the detection of a solution. Babbage left detailed designs for devices to automatically halt his engines: Difference Engine No. 2, for example, has a mechanism for automatically halting the Engine at the end of a printed page.14. In the context of the Analytical Engine, Luigi Menabrea, in his article based on Babbage’s Turin seminar, made specific reference to the zero-state halting the machine automatically.15

In the 1930s Alan Turing formalised the problem of ‘computability’ in terms of the halting criterion of a notional universal machine. His seminal notions of ‘definite method’ and ‘mechanical process’ are explicit in Babbage’s earliest speculations on computation as process.

In the context of solving equations using systematic computation as a method of solution, the machine represents a new technology of mathematics that renders practical methods that would otherwise be prohibitively labour intensive. The feature of the Engine that allows this is the fact of it being automatic, that is, it embodies mathematical or computational rule in mechanism, and has ability to repeat the computational operations by incurring physical rather than mental effort.

In the case of finding the roots, the general form of the equation is known but no analytical solution is forthcoming. In the letter to Davy, in Babbage’s first reference to computation as systematic method, the computational rule is known but with no general form of the expression for the nth term. In this case there is no way arriving at a distant term without ‘passing through all the previous ones’.16 Babbage suggests that automatic machine computation makes serial evaluation of such functions both systematic and practical.

The power and appeal of analytical formulation derives from its generality, that is, the ability to represent, in a single statement through symbols, any and all specific instances of the relations expressed. The unspoken values of analytical science elevate generality and universality above example and instantiation. A silent premise of contemporary mathematics and philosophy was that example is inferior to generalisation, induction inferior to deduction, empirical truths to analytical truths, and the synthetic to the analytic. Stretching the analogy to social class we can see parallels in Victorian class structure with the social inferiority of trades and manual activity compared with philosophical and intellectual occupations. Journeymen and gentleman, separated by social rank.

Calculation, which involves specific numerical example, was, in the prevailing culture, implicitly inferior to formal analysis. The existence of a series that could be produced by computational rule for which no formal law was known fell outside the comfort zone of analytical tradition. This was new territory, and Babbage was clearly intrigued by the general question of how to find analytical laws for series suggested, or produced, by the Engine. In his letter to David Brewster, Babbage tabulates the first set of values and differences of a new series suggested by the Engine and proceeds to derive a general expression for the nth term.17 The process is essentially one of induction and Babbage acknowledged that the process is at odds with the traditions of mainstream mathematics. He wrote in 1824 that the unusual route he took in arriving at a general form for a new series was ‘much more conducive to the progress of analysis, although not so much in unison with the taste which at present prevails in that science’.18 He was aware that computation as a systematic process was off-piste.

Babbage described several instances in which the Engine suggested new series and stimulated new avenues of mathematical analysis, and offers the heuristic role of the Engines as a new and intriguing benefit. One new series was prompted by physical the layout of the Engine.

In Babbage’s calculating engines numbers are represented by figure wheels engraved with the numbers ‘0’ through ‘9’, arranged in vertical stacks or columns, with one wheel for each digit of the number (see Illustration 2).19 The columns stand alongside one another and are coupled with internal gearing and control mechanisms that orchestrate the motion of the wheels to perform the repeated additions required for tabulation by method of differences. The broadside view of the Engine presents a rectangular matrix of figure wheels representing the value of the tabular value in one column, the first difference in the next column, second difference the next column, and so on. The matrix of wheels suggests that apart from the internal gearing for repeated addition, individual figure wheels can influence others by external connection. Specifically, by externally gearing wheels together, any given figure wheel (representing units, tens, hundreds etc of a given number) could add its value to a wheel in another column.

The technique allows feedback, feed-forward or cross-feeding of individual digits in a way that influences the step-wise generation of successive results. For example, only the tens wheel on the second difference column could be coupled to the hundreds wheel on the tabular value column, leaving intact the machine’s internal gear trains. Cycling the machine would produce a new series for which there was a clear computational rule by which to generate each next value, but for which there was no analytical formula necessarily known or available (see Illustration 3).20

There is no indication that Babbage physically implemented such cross-coupling on his first experimental model during 1822, and the early exploration appears to have been a pen-and-paper speculation. However, the portion of Difference Engine No. 1, assembled by Clement in 1832, clearly shows the additional axes and gears that allow such cross coupling that were added when Babbage returned to these ideas, after a decade of distraction constructing the larger machine.21

Babbage’s speculations on finding general analytical laws for empirically generated series are undeveloped. They were inconsequential to the development of mathematics and represent one of the topics outside mainstream analysis that he focused on, but did not pursue. However, in the history of the development of mathematical ideas, the line of enquiry represents the earliest realisations that there was a theoretical dimension to computational method that was important and unexplored, and that computation involved more than the contingent specifics of numerical example.

The prospect of calculating machines elevated computation to systematic method, and in these early papers Babbage appears to be struggling to communicate its new status. His writing is often unclear and suggestive, and tends to slide between specifics and generalities. However, he appears clearly to have sensed that there was something new and fundamental in step-wise mechanical process as a realisation of algorithmic procedure, and that the automatic calculating engines invited new forms of mathematical analysis.22

Numerical analysis

In a manuscript on the Analytical Engine, dated 26 December 1837, unpublished in his lifetime, Babbage predicted the importance of computational method and numerical analysis as new branches of analysis that would need to be developed to optimise the efficiency of machine computation. After manipulating a formula to show that one version required thirty-five multiplications and six additions to find its value, and a mathematically identical but alternative expression required only five multiplications and one addition, he wrote:

The consequences resulting from this circumstance are important and deserve the attention . . . Whenever engines of this kind exist in the capitals and universities of the world, it is obvious that all those enquirers who wish to put their theories to the test of number, will apply their efforts so to shape the analytical results at which they have arrived, that they shall be susceptible to calculation by machinery in the shortest possible time, and the whole course of their analysis, will be directed towards this object. Those who neglect the indication will find few who will avail themselves of formulae whose computation requires the expense and error attendant on human aid.23

Babbage also anticipates that machine computation would be critical to the progress of science:

I will yet venture to predict that a time will arrive, when the accumulating labour which arises from the arithmetical applications of mathematical formulae, acting as a constantly retarding force, shall ultimately impede the useful progress of the science, unless this or some equivalent method is devised for relieving it from the overwhelming incumbrance of numerical detail.24

Mechanical logic

Babbage’s first complete design was for Difference Engine No. 1, so called because of the mathematical principle on which it was based, the method of finite differences. Difference Engine No. 1 was conceived in 1821 and abandoned unfinished in 1833 after a decade of design and development and extravagant expense. All Babbage succeeded in completing was one-seventh of the calculating section, ‘the finished portion of the unfinished engine’ as a demonstration piece that survives and works impeccably to this day (see Illustration 3).25 This ‘beautiful fragment’ is the first successful physical realisation of automatic calculation in that mathematical rule was successfully embodied in mechanism for the first time.26 By exerting physical effort the operator could achieve results that up to that point were achievable only by mental effort. The fact of it being automatic elevates it into a category all its own in symbolising the start of the era of automatic computation.

The full machine represented a quantum leap in logical conception and physical size, consisting as it did of 25, 000 parts half of which had been made when the project was abandoned. The 1830 plan depicts a machine working to sixteen figures of accuracy with six differences (i.e. capable of tabulating any 6th order polynomial with 16-digit results (see Illustration 4)), as well as printing, typesetting and stereotyping tabular results. The later difference engine, Difference Engine No. 2, designed in the late 1840s, was designed to tabulate any 7th order polynomial to 31 decimal places (see Illustration 5). The Engine calls for 8,000 parts, weighs between 4 and 5 tonnes, and measures 11 feet long and 7 feet high.27

The designs for the Difference Engines embody in specific detail several logical functions and techniques for which there are recognisable modern-day electronic counterparts. Each of the terms listed is included in ‘apologetics’ – single quotation marks – as a reminder that that nowhere does Babbage use these terms and that their use here is anachronical in a backwards projection from the electronics age. Babbage, it seems, found the need for logical functions similar to those devised by the pioneers of electronic computing, but that he implemented in a mechanical medium. The following systems and logical features are recognisably evidenced in the Engines:28

For all its ingenuity, the Difference Engine was what we would now call a calculator in that it was not general-purpose or programmable but performed a specific set of functions to which its operation was absolutely limited—repeated addition from a set of precalculated initital values to produce, by finite difference integration, each next tabular value. For all the features of the Difference Engines it is the designs for the Analytical Engines that mark the essential transition from calculation to fully-fledged general-purpose computation (see Illustration 7 and Illustration 8). The transition was accomplished through a series of largely undocumented steps in a creatively intense period starting in 1834 and refinements preoccupied Babbage on and off for the rest of his life.29 His efforts on the Analytical Engines that were sustained for decades after he had given up on the prospects for building a machine specifically for tabulation, supports the earlier argument that the mathematical potential of calculating engines was an enduring preoccupuation.

The Analytical Engines embody another set of logical and architectural features in addition to many of those featured in the Difference Engines. These include:30

Babbage is explicit about the rationale for the separation of Store and Mill in the logical architecture of the Engine. In the interests of economy, expensive and complex processing apparatus should not be distributed through the system but centralised and information brought to it from memory and returned after processing, with intermediate results also stored as necessary. The separation of Store and Mill, serial operation involving a fetch-execute cycle, and input-output devices, all of which are featured in the Analytical Engine designs, are the essential features of classic Von Neumann architecture described in Von Neumann’s seminal paper published in 1945.31

Automatic multiplication was accomplished by accumulation of partial products. Division was achieved by tentative subtraction until a sign change was detected, the lost number restored by addition, followed by multiplication by 10 and repeated subtractions until a further sign change. Counting the number of subtractions between sign changes generated each digit of the quotient in turn. Division required conditional control, in this case detecting a sign change, and taking one or another course of action depending on the outcome.

A technique that Babbage regarded as amongst the most difficult challenges of the early designs was that of the ‘anticipating carriage’ and he ranked its accomplishment as a major breakthrough in both technique and self-confidence.32 In the Difference Engines the carriage of tens is handled digit by digit in a fixed sequence. He refers to the technique as ‘successive carriage’. Babbage was ruthless in his attempts to minimise execution time. In the successive carriage technique the serial polling of each digit was time-consuming. The anticipating carriage mechanism is not what we would now call ‘look ahead’ but it allows all tens carries in a multi-digit register to be performed in a single operation and is therefore more time-efficient. As with the successive carriage, anticipating carriage automatically caters for secondary carries, that is, carries that result from carries (see Illustration 9).

A major feature of the user interface of the Analytical Engine was programmability using punched cards of which there were at least four main kinds. Operation cards instructed the Mill what operation to perform and a string of fan-folded cards constituted a set of instructions to be executed in a fixed sequence that could be extended without practical limit. Variable cards specified the location in the Store from which a number was to be fetched and where the result was to be returned. Number cards held numerical constants and other data and these had a variety of uses. Finally, combinatorial cards controlled the looping function specifying the number of times a fixed set of operations was to be iterated. The matrix of hole positions on each card was distinctive and each type had its own dedicated card reader (see Illustration 10).

Many of the logical features mentioned have recognisable modern counterparts and it is instructive to look at how Babbage implemented these in a mechanical medium.

The Difference and Analytical Engines are decimal digital machines. He did consider other number bases (3, 5, 12, 16, 100) but preferred decimal for reasons of engineering efficiency as much as for the convenience of familiarity.33 The engines are decimal in the accepted sense that the mechanism recognises ten distinct states of each figure wheel. They are digital in the sense that only discrete angular positions of the figure wheels are valid representations of digit values. In electronic circuitry the integrity of digital operation is preserved by the use of flip-flops that is, the flipping from one state to another once a threshold has been exceeded. In flip-flop circuitry the intermediate states between two binary states are unstable and unalterably transitional. However, conventional gear wheels are inherently analog and in Babbage’s Engines, where number values are represented by the angular rotation of gear wheels, the intermediate positions between discrete digits values are stable and viable. What makes Babbage’s Engines digital is not that the basic elements (toothed wheels) are inherently digital but the discretising effect of the control mechanisms.

We can see hints of Babbage’s attempts to digitise the motions in the earliest designs for Difference Engine No. 1. Illustration 11 shows a sprung arm with the roller acting on the semi-circular segments. The action of the sprung arm biases the motion to favour discrete intervals defined by the pitch of the segments. The dwell angle at the apex is too large to cause a decisive flip so the switching threshold is not absolutely defined, but the intention and action is clearly recognisable as intended to exclude (or at least discourage) a range of intermediate positions and favour the discrete intervals associated with integral whole number values. Such was the thinking in the 1820s.

By 1847 the thinking had refined and in Difference Engine No. 2 a different technique was used. Here no attempt is made to exclude intermediate transitional positions of the figure wheel during normal rotation. Instead a wedge is driven between the teeth of each figure wheel at critical points in the cycle (see Illustration 12). The effect of the wedge (called a lock) is threefold: it ensures continuous minor correction; it locks the wheel to freeze its value; and performs error detection. The entry of the lock between teeth corrects small derangements of the geared wheels that might arise from vibration, episodic external disturbance or wear, and the act of entry provides a self-correcting feature designed to prevent cumulative derangement from integral digit values. An electronic analogy can be found in electronic pulse-shaping where leading and trailing edges of are ‘squared up’, as it were, to prevent progressive degradation. In the case of more extreme derangement the wedge performs error detection. When the derangement exceeds 2¼ degrees the figure wheel is in a position intermediate between digit values and is invalid.  The entry of the wedge will strike the tooth edge on and the Engine will jam as it designed to do. Jamming of the locks is a form of error detection and signals that a wheel is in an indeterminate and therefore undefined position and the digital integrity of the process has been compromised. At various points in the cycle locks are fully inserted between the gear teeth to lock the wheels immovably in their current position. Wedge-shaped locks of this kind are used throughout Difference Engine No. 2 in both the calculating section as well as the printing and stereotyping apparatus to ensure digital integrity. Such was Babbage’s confidence in his security mechanisms that he boasts that the Engine cannot be deranged even by deliberate intervention, even when running—that it ‘will calculate rightly or not at all’,34 and ‘what it would do it would do truly’ (see Illustration 13 and Illustration 14).35

The mechanical notation

Babbage’s ideas about the promise of machine calculation went beyond abstract speculation. The mechanisms described in the largely unbuilt designs for his machines embody the logical principles of automatic computation as well as the specifics of their execution. Beyond the nuts and bolts of the mechanisms, his Mechanical Notation, a language of signs and symbols of his own devising, provides a formal symbolic description of the operational detail.           

The Mechanical Notation is what we would now perhaps call a hardware description language, in this case an original and idiosyncratic language of signs and symbols used to describe and the operation and logic of the complex mechanisms of the Engines as well as optimise the designs by eliminating redundancy. He regarded this symbolic design aid as ‘one of the most important additions . . . to human knowledge’.36 The Notation was a response to the unprecedented complexity and size of the mechanical systems. He wrote in 1865 that the machines were so intricate and the chain of events so elaborate, that keeping track would have ‘baffled the most tenacious memory’.37

Babbage regarded the Notation as a universal descriptive language of interaction not confined to science or engineering. In the context of the origins of computing, the Notation represents a serious attempt at formal symbolic representation of computational logic. The Notation is not a calculus but a symbolic description that exactly records how parts are interconnected and the way they are intended to interact. The Notation has three main forms. One form is that of a timing diagram which describes how motions of parts are phased and orchestrated in relation to each other (see Illustration 15). Another has the form of a flow diagram. The example in Illustration 17 traces each drive train for printing and stereotyping apparatus between 1847 and 1849 for both the Analytical Engine and Difference Engine No. 2. The apparatus, which consists of 4,000 separate parts, automatically typesets the results of the calculation, prints hardcopy results to thirty decimal places, and impresses the results in two font sizes into stereotype moulds for making printing plates (see Illustration 16). The format of the output is programmable, with variable line height, margin widths, number of columns, whether the results are line-to-line with automatic line wrap, or column-to-column with automatic column wrap, and an optional blank line every n-lines for ease of reading. (The output apparatus described was completed in 2002 built to the original designs and is shown in Illustration 18).38 The diagram clearly distinguishes control inputs and data inputs. The data inputs are the outputs from the calculating section. The final form of the Notation is a tabular form usually included on the same design drawings alongside the mechanisms it describes (see Illustration 19).

There is little in the way of detailed explanation of the Notation in Babbage’s writing but he did record the principles and general guidelines, and left prolific examples of its use. In the tabular form individual parts are identified with a capital in one of at least three alphabetic forms, Roman, Etruscan (sans-serif), and a form of copperplate script. Upright letters identify framing pieces, inclined letters identify moveable parts. The subscripts and superscripts on each letter record the part's identity, form, relationship to other parts, and motion. The tabular form is at component level. The flow diagrams and timing diagrams can be seen as system-level descriptions.

Despite his pride in the system, and the undoubted use to which he put it, the Notation has enjoyed spectacular obscurity ever since.

Charles Babbage is widely recognised as the great ancestral figure in the history of computing. His work embodies the earliest original exploration of the principles of general-purpose computation. He designed the first successful automatic computing machines, explored computational method, the mathematical potential of computing engines, and formalised the logic of his designs in a generalised symbolic language. The scale and scope of his work provide convincing evidence that calling him the first computer pioneer is a well-founded tribute.


1 For the political background to the role of the Astronomical Society in commissioning new tables see Ashworth, William J. ‘The Calculating Eye: Baily, Herschel, Babbage and the Business of Astronomy.’ British Journal for the History of Science 27 (1994): 409-41. Also Swade, Doron. ‘Calculation and Tabulation in the 19th Century: George Biddell Airy Versus Charles Babbage.’ PhD. University College London, 2003, pp. 125-6.

2 There are three known accounts of this episode written by Babbage: 1822, 1834 and 1839. See Collier, Bruce. The Little Engines That Could've: The Calculating Engines of Charles Babbage. 2 ed. New York: Garland, 1990, pp. 14-18 (Harvard PhD thesis, 1970). The quotation cited is taken from the third account which appears in the Buxton memoir written between 1872 and 1880 but not published until 1988, see Hyman, Anthony, ed. Memoir of the Life and Labours of the Late Charles Babbage Esq. F.R.S. By H. W. Buxton. Vol. 13. Cambridge, Massachusetts: Tomash, 1988, p. 46. The first account leaves it open as to whether it was Babbage or Herschel that made the suggestion. In the second and third accounts Babbage claims ownership for himself. All three accounts contain the appeal to steam. The third account is the most dramatised and is the only one to include direct speech.

3 Ackroyd, Peter. Dan Leno and the Limehouse Golem. London: Minerva, 1994, p. 116.

4 See Swade, Doron. ‘The 'Unerring Certainty of Mechanical Agency': Machines and Table Making in the Nineteenth Century.’  The History of Mathematical Tables: From Sumer to Spreadsheets. Eds. Martin Campbell-Kelly, et al. Oxford: Oxford University Press, 2003. 143-74.

5 See Schaffer, Simon. ‘Babbage's Intelligence: Calculating Engines and the Factory System.’ Critical Enquiry 21 (1994): 203-27.

6 Lardner, Dionysus. ‘Babbage's Calculating Engine.’ Edinburgh Review 59 (1834): 263-327. Reprinted in Campbell-Kelly, Martin, ed. The Works of Charles Babbage. (Henceforth Works) 11 Vols. London: William Pickering, 1989, Vol. 2, 263-327.

7 The substantial collection was quite possibly Babbage’s. For additional background see Campbell-Kelly, Martin. ‘Charles Babbage's Table of Logarithms.’ Annals of the History of Computing 10.3 (1988): 159-69.

8   The phrase is Lardner’s (1834). See Works, Vol. 2, p. 169.

9   Lardner to Babbage, 3 January 1834, British Library, Add Ms 37188, f. 140.

10 For more detailed treatment of Lardner and Babbage see Swade, Doron. ‘Calculation and Tabulation in the 19th Century: George Biddell Airy Versus Charles Babbage.’ PhD. University College London, 2003, 159-172..

11 Lardner (1834), Works, Vol. 2, p. 138; B. H. Babbage (1872). Works, Vol. 2, p. 226.

12 A letter to Sir Humphrey Davy, Bart., President of the Royal Society, ‘on the application of machinery to the purpose of calculating and printing mathematical tables.’ London: Cradock and Joy, 1822. Reprinted in Works, Vol. 2, pp. 5-14. See p. 7.

13 For reference to the use of warning bells, see for example, Lardner (1834), Works, Vol. 2, p. 169.

14 See Swade, Doron. Charles Babbage's Difference Engine No.2: Technical Description: Science Museum Papers in the History of Technology, pp. 44-5.

15 Menabrea, Luigi Frederico. ‘Notions Sur La Machine Analytique De M. Charles Babbage.’ Bibliotèque universelle de Genève 41 (1842): 352-76. Reprinted in Works, Vol.3, pp. 62-68. See p. 109.

16Babbage to David Brewster, 6 November 1822, published as ‘On the Theoretical Principles of the Machinery for Calculating Tables.’ Edinburgh Philosophical Journal 8 (1823): 122-28. Reprinted in Works, Vol. 2, 38-43. See p. 39.

17 Ibid.

18 Babbage, Charles. ‘On the Determination of the General Term of a New Class of Infinite Series.’ Transactions of the Cambridge Philosophical Society 2 (1826): 217-25. Reprinted in Works, Vol. 2, pp. 61-8. See p. 62.

19 The physical organisation of the experimental machine appears to have been similar to that of the version of Difference Engine No. 1 a portion of which was constructed and for which plans survive.

20 These ideas are considered by Collier in the context of the genesis of the Analytical Engine and the notion of the Engine ‘eating its own tail’. The reflexivity of the process is seminal to the transition from calculator to general-purpose computation. See Collier (1990), pp. 107-116.

21 For details of the mechanical additions see Roberts, C J D. ‘Babbage's Difference Engine No. 1 and the Production of Sine Tables.’ Annals of the History of Computing 9.2 (1987): 210-12. Also Collier (1990), p. 112.

22 Babbage wrote that the Engine’s stimulus for his enquiries was ‘singular in the history of mathematical science’. See Babbage (1826), Works, Vol. 2, p. 61. For a thematic treatment of Babbage as an algorithmic thinker see Grattan-Guinness, Ivor. ‘Charles Babbage as an Algorithmic Thinker.’ IEEE Annals of the History of Computing 14.3 (1992): 34-48.

23 Babbage, Charles. On the Mathematical Powers of the Calculating Engine. Buxton MSS collection, Oxford (1837). Reprinted in Works, Vol. 3, 15-61. See pp. 60-1.

24 Babbage to David Brewster, 6 November 1822. Reprinted in Works, Vol. 2, 38-43. See p. 43.

25 The quoted phrase is Babbage’s. See Babbage, Charles. Passages from the Life of a Philosopher. London: Longman, Green, Longman, Roberts & Green, 1864, p. 150.

26 The quoted phrase Babbage’s son’s, Henry Prevost. See Babbage, Henry Prevost, ed. Babbage's Calculating Engines: A Collection of Papers by Henry Prevost Babbage. London: Spon, 1889. Reprinted in facsimile: The Charles Babbage Institute Reprint Series for the History of Computing. Vol. 2. Los Angeles: Tomash, 1982. See Preface, p. I.

27 Difference Engine No. 2 was completed at the Science Museum in 2002, the culmination of a 17-year project. For an account of the construction see Swade, Doron. ‘The Construction of Charles Babbage's Difference Engine No. 2.’ IEEE Annals of the History of Computing 27.3 (2005): 70-88. For an account of Babbage’s efforts to construct his engines and the construction of DE2 up to 1991, see Swade, Doron. The Cogwheel Brain: Charles Babbage and the Quest to Build the First Computer. London: Little, Brown, 2000. (Published in the United States The Difference Engine: Charles Babbage and the Quest to Build the First Computer. New York: Viking, 2001).

28 For mechanical details of Babbage’s Difference Engine No. 2 see Swade, Doron. Charles Babbage's Difference Engine No.2: Technical Description: Science Museum Papers in the History of Technology, 1996.

29 See Collier (1990), p. 119.

30 For technical details and analysis of Babbage’s engine designs see Bromley, Allan G. ‘Babbage's Analytical Engine Plans 28 and 28a - the Programmer's Interface.’ IEEE Annals of the History of Computing 22.4 (2000): 4-19. ‘Charles Babbage's Analytical Engine, 1838.’ Annals of the History of Computing 4.3 (1982): 196-217. ‘Difference and Analytical Engines.’  Computing before Computers. Ed. William Aspray. Ames: Iowa State University Press, 1990. ‘The Evolution of Babbage's Calculating Engines.’ Annals of the History of Computing 9.2 (1987): 113-36.

31 von Neumann, John. First Draft of a Report on the Edvac: Moore School of Electrical Engineering, University of Pennsylvania, 1945. Reprinted in Randell, Brian, ed. The Origins of Digital Computers: Selected Papers. Berlin: Springer-Verlag, 1982, pp. 375-382.

32 See Babbage (1864), pp. 114-6.

33 See Collier (1990), p. 164; Hyman, Anthony. Charles Babbage: Pioneer of the Computer. Oxford: Oxford University Press, 1982, p. 167; Wilkes, Maurice V. Babbage as a Computer Pioneer: British Computer Society and the Royal Statistical Society, 1971, p. 4.

34 Lardner (1834). See Works, Vol. 2, p. 159.

35 Ibid. p. 183.

36 Babbage (1864), p. 452.

37 Babbage (1864), p. 113.

38 For an account of the construction see Swade (2005).

Illustration credits

Difference Engine No. 2 Output Apparatus and the author.1

Illustration 1: Charles Babbage (1791–1871) aged 68. Last known portrait, taken in London, 1860.2

Illustration 2: Columns of figure wheels, Difference Engine No. 2, 2008.3

Illustration 3: Difference Engine No. 1, 1832, demonstration piece. One-seventh of the calculating section of the whole machine.4

Illustration 4: Design Drawing, Difference Engine No. 1, 1830.5

Illustration 5: Difference Engine No. 2, 2005, broadside view. The Engine consists of 8,000 parts, weighs between four and five tonnes, and measures eleven feet long and seven feet high.6

Illustration 6: Cam stack for Difference Engine No. 2. The 14 pairs of conjugate cams orchestrate and control the internal motions of the Engine. Their action is analogous to a ‘microprogram’.7

Illustration 7: Design drawing, Analytical Engine, 1840.8

Illustration 8: Analytical Engine experimental piece, 1871.9

Illustration 9: Successive carriage mechanism, part, Difference Engine No. 2.10

Illustration 10: Punched cards for Analytical Engine. The small cards are Operation Cards. The large cards are Variable Cards.11

Illustration 11: Calculating wheels for Difference Engine No. 1, with sprung roller. The action of the arm and roller ‘digitises’ the circular motion of the wheel.12

Illustration 12: Plan of addition mechanism for Difference Engine No. 2, c. 1847. Two wedge locks are shown at ‘9-oclock’ inserted in the teeth of the two full figure wheels.13

Illustration 13: Example of lock.14

Illustration 14: Example of lock.15

Illustration 15: Mechanical Notation, Timing Diagram (part) for Difference Engine No. 2, 1848.16

Illustration 16: Experimental Stereotype Mould in Plaster of Paris from Difference Engine No. 2, 2002. The incremental argument can be seen as the last three digits in the 30-digit impression.17

Illustration 17: Mechanical Notation, ‘Flow Chart’ Diagram for printing and stereotyping apparatus for Analytical Engine and Difference Engine No. 2. Data and control inputs are clearly separated.18

Illustration 18: DE2 Output Apparatus.19

Illustration 19: Mechanical Notation, Tabular form, for addition and carriage mechanism.20