19
The failed attempt to construct Difference Engine No. 1 is perhaps the best known of the many recounted episodes in Charles Babbage’s life. Practical attempts to build the machine were abandoned in March 1833 when, after a decade of design and development, Joseph Clement, Babbage’s engineer, downed tools and fired several of his workers employed on Babbage’s project following a dispute over com- pensation. 1 While accounts of Difference Engine No. 1 and its fate have tended to dominate the literature, it is the Analytical Engine, conceived by 1834, to which Babbage largely owes his rep- utation as the “first computer pioneer.” 2 His later difference engine, Difference Engine No. 2, designed after the main work on the Analytical Engine was complete, usually gets no more than passing mention. The history of the three machines, however, is intimately connected. Origins of Difference Engine No. 2 During the dispute with Clement, Babbage was forcibly distanced from the nuts and bolts of mechanical construction. Deprived of his drawings and engine parts, he revisited some of his early ideas on calculating engines. Using the “beautiful fragment”—a small section of the engine assembled by Clement in 1832—as a physical aid and with drawings back in his possession in July 1834, Babbage made the essential transition from calculation to com- putation—from the mechanized arithmetic of the Difference Engine to programmable gener- al-purpose computation the principles of which he embodied in the designs for the Analytical Engine. 3 The designs for the Analytical Engine incor- porate most of the essential logical features commonly found in a present-day general-pur- pose digital computer. 4 These include program- mability (Babbage used punched cards), an internal repertoire of automatically executable arithmetical functions (direct multiplication, division, addition, and subtraction) and a range of system and circuit functions including micro- programming, pipelining, iteration or looping, conditional branching, and parallel processing. A further feature of the design is the engine’s internal architecture that separates the “mem- ory” he from the “processor.” Using descrip- tions borrowed from the textile industry, Babbage called the memory “the store,” and the processor “the mill.” The separation of store and mill foreshadowed von Neumann’s scheme that has dominated computer architectures in the electronic era. The designs do not feature facilities for internally storing programs: Instruction sequences as well as data were held externally on fanfold, pasteboard punched cards and input from mechanical card readers. It is important to note that Babbage nowhere used the terminology invoked here to describe logical features. The use of terms such as pro- gram, microprogram, pipelining, iterative loop- ing, conditional branching, and processing is a backward projection from the modern computer age and is fraught with the known historio- graphic hazards of anachronical interpretation— views of the past that do not take account of the alteration of perceptions with time. In 1846, with the major work on the Analytical Engine design done, Babbage began to design a new machine, Difference Engine No. 2 5 (see the sidebar, “Babbage’s Difference Engine No. 2: Overview,” for additional infor- mation). Though concerted work on the new engine dates from 1847, there is evidence that Babbage had been actively mindful of the The Construction of Charles Babbage’s Difference Engine No. 2 Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846 and 1848. Contemporary drawings illustrate a machine—never built during his lifetime—that calculates and tabulates polynomials, printing results in hard copy and producing stereotype molds for plates intended for use in conventional printing presses. This article describes construction of the first complete physical realization of a full Babbage engine design and outlines Babbage’s ambitions for this advanced engine. 70 IEEE Annals of the History of Computing Published by the IEEE Computer Society 1058-6180/05/$20.00 © 2005 IEEE

The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

The failed attempt to construct DifferenceEngine No. 1 is perhaps the best known of themany recounted episodes in Charles Babbage’slife. Practical attempts to build the machinewere abandoned in March 1833 when, after adecade of design and development, JosephClement, Babbage’s engineer, downed tools andfired several of his workers employed onBabbage’s project following a dispute over com-pensation.1 While accounts of Difference EngineNo. 1 and its fate have tended to dominate theliterature, it is the Analytical Engine, conceivedby 1834, to which Babbage largely owes his rep-utation as the “first computer pioneer.”2 His laterdifference engine, Difference Engine No. 2,designed after the main work on the AnalyticalEngine was complete, usually gets no more thanpassing mention. The history of the threemachines, however, is intimately connected.

Origins of Difference Engine No. 2During the dispute with Clement, Babbage

was forcibly distanced from the nuts and boltsof mechanical construction. Deprived of hisdrawings and engine parts, he revisited some ofhis early ideas on calculating engines. Usingthe “beautiful fragment”—a small section ofthe engine assembled by Clement in 1832—asa physical aid and with drawings back in hispossession in July 1834, Babbage made theessential transition from calculation to com-putation—from the mechanized arithmetic ofthe Difference Engine to programmable gener-al-purpose computation the principles ofwhich he embodied in the designs for theAnalytical Engine.3

The designs for the Analytical Engine incor-porate most of the essential logical featurescommonly found in a present-day general-pur-

pose digital computer.4 These include program-mability (Babbage used punched cards), aninternal repertoire of automatically executablearithmetical functions (direct multiplication,division, addition, and subtraction) and a rangeof system and circuit functions including micro-programming, pipelining, iteration or looping,conditional branching, and parallel processing.A further feature of the design is the engine’sinternal architecture that separates the “mem-ory” he from the “processor.” Using descrip-tions borrowed from the textile industry,Babbage called the memory “the store,” and theprocessor “the mill.” The separation of storeand mill foreshadowed von Neumann’s schemethat has dominated computer architectures inthe electronic era. The designs do not featurefacilities for internally storing programs:Instruction sequences as well as data were heldexternally on fanfold, pasteboard punchedcards and input from mechanical card readers.

It is important to note that Babbage nowhereused the terminology invoked here to describelogical features. The use of terms such as pro-gram, microprogram, pipelining, iterative loop-ing, conditional branching, and processing is abackward projection from the modern computerage and is fraught with the known historio-graphic hazards of anachronical interpretation—views of the past that do not take account of thealteration of perceptions with time.

In 1846, with the major work on theAnalytical Engine design done, Babbage beganto design a new machine, Difference EngineNo. 25 (see the sidebar, “Babbage’s DifferenceEngine No. 2: Overview,” for additional infor-mation). Though concerted work on the newengine dates from 1847, there is evidence thatBabbage had been actively mindful of the

The Construction of Charles Babbage’sDifference Engine No. 2Doron D. Swade

Charles Babbage designed Difference Engine No. 2 between 1846and 1848. Contemporary drawings illustrate a machine—never builtduring his lifetime—that calculates and tabulates polynomials,printing results in hard copy and producing stereotype molds forplates intended for use in conventional printing presses. This articledescribes construction of the first complete physical realization of afull Babbage engine design and outlines Babbage’s ambitions for thisadvanced engine.

70 IEEE Annals of the History of Computing Published by the IEEE Computer Society 1058-6180/05/$20.00 © 2005 IEEE

Page 2: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

Difference Engine during the design of theAnalytical Engine. A drawing dating from asearly as March 1842, for example, shows animproved version of the successive carriage

mechanism first used in Difference Engine No.1.6 The timing of Babbage’s preoccupation witha new difference engine is confirmed by hislater recollection:

July–September 2005 71

Difference Engine No. 2 was designed between 1846and 1848. The built machine weighs 5 metric tons andconsists of 8,000 parts equally divided between the print-ing and stereotyping apparatus, and the calculating sec-tion (see Figure 5 in the main text). The side view of themachine (Figure 4 in the main text) is one of the maindrawings in the original set of 20, and one that is mostevocative of its overall shape. The drawing shows amachine 11 feet long and 7 feet high with the depth vary-ing between 18 inches and 4 feet. The three main sectionsof the machine are the control mechanism alongside thecrank handle on the right, the calculating section consist-ing of eight vertical column assemblies located in the cen-tral rectangle, and the printing and stereotypingapparatus, on the left.

The engine is operated by turning the crank handle.The handle drives, via bevel gears, a set of cams arrangedin a vertical stack. There are 14 pairs of conjugate cams—that is, each of 14 cams has a companion cam the profileof which is a geometric inversion of its mate. This pairedarrangement provides positive bidirectional drive: Shaftsand columns are lifted and positively driven downwardrather than relying on gravity. The 28 cams control the lift-ing, turning, and sliding motions required to execute therepeated additions for the method of finite differences. Thecrank handle also drives the printer and stereotype appa-ratus from a long shaft that runs the length of the under-side of the machine and which is driven by a large bevelgear on the underside of the cam stack.

Numbers are stored and operated on using figurewheels engraved with the decimal numbers zero throughnine (Figure A). Each digit value in a multidigit number isrepresented by a separate figure wheel. Negative valuesare represented by complements. Numbers are stored andoperated on in columns of figure wheels with units at thebottom, tens next above, hundreds next above, and so on.

The machine has eight columns, or axes, each with 31figure wheels, one column for each of seven differences,and a column for the tabular result. The tabular valueappears on the leftmost figure wheel column in Figure 4in the main text, the first difference column is next and soon. The seventh difference column is on the extreme right.

The engine automatically calculates and tabulates anyseventh-order polynomial to 31 decimal places using themethod of finite differences, prints the result to 30 placeson a paper roll, and impresses the same results on softmaterial to produce stereotype molds from which printingplates can be made. Initial values are set by hand from aprecalculated table by rotating the figure wheels after dis-abling the security mechanisms.

Typically, when finite differences are used as a manualtechnique, one adds the higher order difference to the nextlower order difference in a fixed series of separate additions.Mapped onto the engine, this requires adding the constantdifference on the seventh difference column to the sixthdifference column, the sixth difference to the fifth differ-ence, and so on. However, instead of stepwise repeatedserial addition of this kind, Babbage split the addition cycleinto two. During the first half-cycle, the values on the odddifference columns are added to the adjacent even differ-ence columns, and in the second half-cycle the even dif-ferences are added to the odd differences. Provided theinitial setup values are offset appropriately, this pipeliningarrangement has the same effect as adding differences in asequence of seven separate additions. The advantage of thehalf-cycle arrangement is a shortened calculating cycle,more efficient use of hardware, and a fixed cycle time thatis independent of the number of differences.1

For a seventh-order polynomial, the machine executesseven 31-digit decimal additions each calculating cycle toproduce each next value in the table. Each new tabularvalue is automatically transferred to the output apparatusfor printing and stereotyping. For polynomials of order lessthan seven, the higher-order difference columns are set tozero and play no part. The engine, eased through use, pro-duces one result every six seconds.

References and notes1. D. Swade, Charles Babbage’s Difference Engine No. 2:

Technical Description, Science Museum Papers in theHistory of Technology, Science Museum, 1996, pp. 66-67.

Babbage’s Difference Engine No. 2: Overview

Figure A. Figure wheel. One of 248 similar wheels. Theouter nibs warn the tens carriage mechanism. If a figurewheel exceeds 9, a carry is required to the next decade. Asthe wheel passes from 9 through to 0, the outer niblatches a device that warns that a carry is still required.(Photo courtesy of the Science Museum, London.)

Page 3: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

About twenty years after I had commenced thefirst Difference Engine, and after the greater partof these drawings had been completed, I foundthat almost every contrivance in it had beensuperseded by new and more simple mechanism,which the construction of the Analytical Enginehad rendered necessary.7

Babbage was consistent in his portrayal ofthe Analytical Engine’s influence on animproved difference engine design. In 1864 heagain recalled:

… in labouring to perfect this AnalyticalMachine of greater power and wider range ofcomputation, I have discovered the means ofsimplifying and expediting the mechanicalprocess of the first Difference Engine.8

As a design challenge, the functions of theAnalytical Engine were vastly more demandingthan those for the earlier machine. The mech-anisms for direct multiplication and division,for example, required intricacy and complexi-ty well beyond those for the repeated additionsin the Difference Engine.

Babbage’s near obsession with minimizingthe execution time of all arithmetical functionsled him to devise more-efficient techniques forsimple addition, not least to make room in thetiming cycle for multiplication and division thatwere irreducibly more time-consuming, relyingas they did on sequences of repeated operations.The anticipating carriage mechanism, for exam-ple—which was devised as a time-savingimprovement to the mechanism used in the ear-lier Difference Engine—he extravagantly rankedas “the most important part of the AnalyticalEngine.”9 The technique allowed all the tens car-ries in a number to be executed at the sametime, rather than serially as in his earlier design.The anticipating carriage mechanism is oneexample of many in which the demands of theAnalytical Engine raised Babbage’s design capa-bilities to new levels of sophistication, economy,and elegance. Though he did not use the antic-ipating carriage technique in Difference EngineNo. 2, Babbage is explicit about the influence onits design of his work on the Analytical Engine.He wrote that, for his new difference engine, he“proposed to take advantage of all the improve-ments and simplifications which years ofunwearied study had produced for theAnalytical Engine.”10 This was no false claim.Difference Engine No. 2 uses roughly three timesfewer parts (8,000 compared to 25,000) for asimilar calculating capacity.

There is a further direct and intimate con-

nection between Difference Engine No. 2 andthe Analytical Engine: The two machines sharethe same plans for the stereotyping apparatus.11

The designs for Difference Engine No. 2were offered to the government in 1852 in aletter to the prime minister, Lord Derby. Inoffering an improved machine, it seems thatBabbage was concerned to discharge someresidual discomfort at the failure to completeDifference Engine No. 1. Babbage wrote:

I feel, in laying this representation before yourLordship, and in making the offer I now make,that I have discharged to the utmost limit everyimplied obligation I originally contracted withthe country.12

The offer to the government was rebuffed,and Babbage retreated yet again into a series ofbitter grievances. No attempt was made to con-struct the machine in Babbage’s lifetime. Theplans remained on the drawing board for 140years—until metal was first cut for an experi-mental trial piece in December 1986.13

Sources and interpretationThe set of drawings for Difference Engine No.

2 consists of 20 main views, several derivativetracings, and technical descriptions expressed inBabbage’s Mechanical Notation—an elaborateidiosyncratic system of signs and symbols thatserved as an abstract descriptive language hedeveloped as a design aid.14 The drawings andnotations make no concessions to anyone seek-ing to understand the machine from scratch.Apart from the drawings and notations there ispractically no introductory material, guidingexplanation, textual description, or clues to thelogic or rationale for the designs. The materialcited represents a free-standing source fromwhich his intentions had to be decoded.

The drawings for Difference Engine No. 2are the most complete set that Babbage pro-duced. There is no evidence that any are miss-ing, and since no attempt was made toconstruct the machine, the set of drawings wasnever split up for the execution of separatetasks or exposed to the hazards of dirt and dam-age in a workshop environment. They werealso spared the revisions and improvements towhich Babbage subjected most of his otherdesigns, often leaving the machines imperfect-ly specified or in transitional states of incom-pleteness. It seems that, for once, Babbage wascontent to leave well enough alone.

The original drawings and notations representthe principal contemporary data source for theconstruction of the machine. However, the small

72 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Page 4: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

team at the Science Museum was fortunate not tohave to start from scratch in its attempts tounderstand the functions of the mechanisms.Bromley, Australian computer scientist and his-torian, had, as Visiting Research Fellow, studiedthe technical archive of Babbage’s drawings heldin the Science Museum Library, London, duringa series of short sabbaticals from the University ofSydney starting in 1979. As part of a larger analy-sis of Babbage’s calculating engines, Bromley haddecoded the drawings for Difference Engine No.2, arrived at an understanding of the overalldesign, general layout and operation of themachine’s basic elements, and produced a shortdraft summary for an unpublished book chapterthat described the machine’s essential features.15

At that time, Bromley’s paper was the only writ-ten description of the engine.16 It was the author-ity of Bromley’s detailed work on this and otherof Babbage’s engine designs, and his convictionthat the drawings represented the design of aviable working machine, that gave credibility tothe undertaking to construct it.

The original sources are sufficiently detailedto describe the shape and nominal size of indi-vidual parts, their physical interrelationship,and, through interpretation, their intendedfunction. However, for all their richness, thedrawings are not sufficiently detailed to serveas a specification for manufacture: No infor-mation is provided as to choice of materials,methods of manufacture, order of assembly,lubrication, precision, or finish.

The drawings are deficient in other respects.There are dimensioning inconsistencies wherethe same parts are shown differently sized in dif-ferent views; layout errors; and there are incom-pletenesses in the design (omitting any detail fordriving the inking rollers, or for advancing thestereotype trays, for example).17 As well asinstances of omitted mechanisms, there areredundant assemblies. For example, a completecarriage axis is shown for the highest differencecolumn (the seventh difference), which, beingthe last, performs no function at all: Once setwith an initial value, none of the associated fig-ure wheels can exceed 10 in ordinary operation.The drawings contain other errors, one of which(in the mechanism for the carriage of tens) isfatal to the correct operation of the engine.

Although this litany of deficiencies soundsdamning, none of them compromises thevalidity of the basic logic, design principles, orintended function of the machine. Babbagemade no attempt to construct the engine, andthe deficiencies in the specification for themost part represent the gap between anadvanced design—arrested in an incomplete

state of engineering development—and a work-ing machine. The gap, in short, is one of engi-neering completeness rather than of logical oroperational principle.

The trial pieceThe proposal to construct Difference Engine

No. 2 was made by Bromley in May 1985 dur-ing one of his sabbatical visits from Sydney. Ihad recently been appointed curator of com-puting at the Science Museum, and Bromleyappeared on my doorstep to introduce himselfto the new incumbent.

The timing of Bromley’s arrival was uncan-ny. Part of my curatorial responsibilities includ-ed care of the defining set of survivingmechanical assemblies of Babbage’s machines.I was aware that almost every publishedaccount of Babbage’s efforts attributed his fail-ure to the limitations of 19th-century mechan-ical engineering. I was both perplexed andincredulous that, with advances in manufac-turing, no one had attempted to realize any ofhis designs once the supposed limitations of histime had been removed. Nagging historicalquestions had troubled Babbage scholars—didthe complex circumstances of Babbage’s fail-ures mask the technical or logical impossibili-ty of his machines? Had the machine beenbuilt, would it have worked? Was Babbage animpractical dreamer or a designer of the high-est caliber? Here was Bromley, with an ambi-tious scheme that might advance the debate.Part of the motivational landscape was a seri-ous historical agenda.

Bromley explained in a covering letter toDame Margaret Weston, director of the ScienceMuseum, that he was convinced from his stud-ies that the drawings represented a viabledesign for a working machine, and that build-ing a working engine would have historicalvalue beyond simply proving the viability ofthis particular design. He wrote that

Construction of the Difference Engine No. 2would not only confirm the soundness ofBabbage’s logical and mechanical design princi-ples in this case but would also lend convictionto the entire range of his designs for automaticcomputing engines.18

The proposal concluded with the suggestionthat the complete engine would memorializeBabbage as the first pioneer of the computer.He wrote

The completed Difference Engine No. 2 wouldstand as a tribute to the forefather of the modern

July–September 2005 73

Page 5: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

computer and one of the most ingenious mech-anicians of the nineteenth century. It should befinished in time for the 200th anniversary ofBabbage’s birth on 26 December 1991.18

The proposal made no mention of funding,management, or manufacturing capacity.

The upshot of the proposal was approval toconstruct a small section of the engine as a testpiece. The trial piece was a critical staging postin the construction of the engine.19 It wouldallow verification of the basic arithmeticalmechanism and exploration of a variety oftechnical concerns. I was also aware of thestrategic value of a working trial piece to pro-mote the project and as a fund-raising aid.

The trial piece added a two-digit number toa three-digit number with the result correct tothree digits. The full engine is automatic in thatthe lifting and turning motions necessary forthe repeated additions are executed automati-cally by an internal control system driven byturning the crank handle. The trial piece didnot have the benefit of this complex drivemechanism. Instead, it was operated manual-ly: The dozen or so separate operationsinvolved in the nondestructive addition of twonumbers were executed by manually liftingand turning knobs, catches, and sliders in theprescribed sequence to add, restore, and carry,and also to perform the locking operations thatsecured the mechanism from derangement atdifferent points in the cycle (see Figure 1).

The original timetable allowed for one yearto complete the trial piece. Ultimately, for

cumulatively mundane reasons, it took four.The trial piece had a false start. The designs pre-pared hastily during a short visit from Bromleyin January 1986 were incomplete at the time ofhis return to Sydney to meet university com-mitments. Though Bromley had spotted thedesign error in the original drawings, in therushed circumstances of January 1986 he hadnot attempted a solution.

In July 1987, the project was joined parttime by Peter Turvey, a member of the curator-ial staff in the museum’s engineering depart-ment, and a weekend marine engineeringhobbyist. His brief was to coordinate the pro-duction of the trial piece.

After a desultory attempt by the ScienceMuseum’s workshops to use the incompletedrawings, this first attempt was scrapped inOctober 1987. For the second attempt, I con-tracted out the design drawings to RhodenPartners Ltd., a small UK engineering designcompany that had, in the 1950s, been com-missioned to produce replicas of Babbage’sengines for IBM, and now specialized in design-ing and building one-off prototypes for themanufacturing industry. Rhoden was conve-niently situated in Acton, West London, a fewmiles away from the Science Museum. The firstmeeting with Rhoden took place in January1988. We were starting from scratch two yearsafter the start of the first attempt.

Reg Crick was the Rhoden engineer assignedto the project. Crick, close to 60 at the time, wasa seasoned mechanical design engineer. He hadphilosophically survived the professional inse-curities of life in engineering design—thesudden scrapping of projects, the financial vicis-situdes of companies in engineering develop-ment, and the roughhouse of commercialimperatives. He was modest and methodical,with an inventive flair more often associatedwith more overtly volatile temperaments. Crickplayed a critically important role in the con-struction project. The team I now had consistedof Crick, Turvey (part time), and, when needed,occasional remote consultation by telex toBromley, 11,000 miles away in Australia.

As mentioned, there is a flaw in the carriagemechanism as depicted by Babbage. Figure 2shows the layout of the cluster of axes aroundeach figure wheel column. The layout is right-handed and is the same for both the odd andeven difference columns as is clearly indicatedin several plan views. As drawn, there is a con-flict between two functions: If the figure wheelsrotate in the correct direction to add, then theassociated warning mechanism for the carriageof tens fouls and jams. The principle of the

74 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Figure 1. Trial piece, 1989. Adds a two-digit decimal number to a three-digit number and takes account of the tens carriage. (Photo courtesyof the Science Museum, London.)

Page 6: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

mechanism is valid, but the layout as depictedin the drawings is unworkable. Bromley hadspotted the problem in his original analysis andhad offered several solutions.15

The solution we chose as the one most likelyto have been adopted by Babbage was to make amirror image of the carriage mechanism foralternate axes. Crick found that using opposite-handed parts had unforeseen consequences:The new arrangement involved small but criti-cal alterations to the angular positioning of endstops and locks, and this adjustment wouldhave to be carried through the whole specifica-tion for each of the eight axes. The new arrange-ment also involved a reversal of the direction ofrotation for certain circular motions.

New fully specified drawings for the trialpiece were available in March 1988; the mir-rored configuration used in the trial piece, andadopted in the full engine, is shown in Figure3. Testing the mirror configuration became themain purpose of the trial piece. Issues of clear-ances, tolerances, wear and tear, gear tooth pro-file, choice of materials, and torque that had sopreoccupied us took a back seat.

The trial piece was built in the ScienceMuseum workshops and completed in February1989, three years behind schedule. Exquisitelymade, bright, shiny, and elegantly complex, itwas an immediate hit (see Figure 1). It attract-ed media coverage and, as we hoped, impressedtrustees and sponsors. The trial piece provedconclusively that the modifications to imple-ment the mirror-imaged solution to the designflaw worked and wouldserve as a sound techniqueon which to base the fullconstruction. It also servedas a pedagogic aid todemonstrate the essentialarithmetical function.What was unexpected wasthe role it played in visual-izing the working of themachine during the designand the preparation of fulldrawings.

AuthenticityThe flaw in the layout

of the carriage mechanismwas the most significantand potentially damagingof the errors we identified.Modifying the design inany way at all presented abasic curatorial dilemmaand raised the fundamen-

tal question of authenticity. If the engine wasbuilt as drawn, then we had no expectation thatit would work. The final object, if achieved,would be an intriguing piece of Victorian sculp-ture but one that would prove nothing aboutthe essential viability of Babbage’s schemes. If,on the other hand, the original designs weremodified, in what sense could a working engine

July–September 2005 75

Figure 2. Design drawing. Addition and carriage mechanism(Science Museum Library Babbage Papers, drawing BAB [A]171 part, “Difference Engine No. 2. Addition Carriage andmode of Driving the Axes,” undated). This original layout byBabbage has a design flaw. (Drawing courtesy of the ScienceMuseum, London.)

Figure 3. Design drawing. Addition and carriage mechanism with mirror-imaged solution tothe design flaw, 1991. (Drawing courtesy of the Science Museum, London.)

Page 7: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

claim to be a vindication of Babbage’s work?The way out of the impasse was the realiza-

tion that it was a mistake to view Babbage’sdesign as sacrosanct and unimpeachably per-fect. Building the engine was not the slavishphysical implementation of an abstract idealwith doom attending even the smallest devia-tion from the master’s instructions. The projectwas more in the nature of a resumption of apractical engineering project that had beenarrested in 1848. Had Babbage proceeded fromdesign to manufacture, the deficiencies in thedrawings would have become evident. Therewould have been no way of avoiding them,and he would have sought solutions. We weresimply picking up where he left off, and thetask for us was to find solutions with conscien-tious regard for contemporary practice whileusing the best knowledge available of Babbage’sstyle of working. We approached each newneed with the question, What would Babbagehave done? and proceeded to seek historicallysensitive solutions.

The issue of authenticity was a central con-cern. I was determined that nothing would com-promise the value of the construction in drawinghistorically meaningful conclusions aboutBabbage’s world. We would need to be able torobustly resist the charge that “Yes, you built theengine, but Babbage could not have.” Credibledefense against this charge provided the rulingprinciple for all issues of authenticity. For eachdesign modification, we first sought solutionsthat Babbage had used elsewhere in his designs;we only resorted to fresh thinking once thisquest was exhausted. A second principle was thatof reversibility, that is, to incorporate the facilityfor demounting any added assembly or modifi-cation so as to restore the machine to the statedepicted by Babbage in the original drawings.

The manufacture of parts for the fullmachine was beyond the capacity of theScience Museum’s in-house workshops and wascontracted out. Further, the manufacturing andbuild costs were beyond anything the ScienceMuseum could reasonably fund from its ever-diminishing Grant-in-Aid from the govern-ment. Sponsorship was the only solution. Weneeded fully detailed piece part drawings forfixed-price quotes to fix the sponsorship target.In November 1988, the Science Museumapproved funds for the Rhoden engineeringdesigners to estimate the cost and timescale forproducing fully detailed drawings, tooling, andmaterials for a complete machine. At this stagewe downscaled our expectations and aban-doned the prospect of building the printingand stereotyping apparatus for the bicentenni-

al deadline. I judged that the cost of buildingthe printer would put the sponsorship targetout of reach, and we were already several yearsbehind schedule.

Producing detailed specifications raised pro-duction issues—choice of materials, methodsof manufacture, precision, finish, typographyfor engraving, and lubrication—all issues thatwent well beyond those addressed in the man-ufacture of the small trial piece. To help resolvehistorical issues of this kind, the project hadthe benefit of Michael Wright, the ScienceMuseum’s curator of mechanical engineering.Wright’s knowledge of 19th-century workshoppractice is encyclopedic. The history of toolsand workshops is his profession, his vocation,and his private passion. Stepping into his pri-vate workshop with its period treadle lathes,oil-stained wooden benches, leather drive belts,and work in progress is to step into the worldof Babbage and Clement.

Tolerancing and the interchangeability ofparts were critical issues. One of the features ofthe engine designs is the repetition of nearidentical parts. Babbage did not have availableto him production techniques that offeredinherent repeatability—stamping and pressuredie-casting, for example—and parts were madeone at a time by a combination of machiningand hand fitting. The understanding betweenthe designer and the machinist, whether spec-ified explicitly on a drawing or not, was that apart would be made to fit—that is, trimmedand tweaked by hand at the discretion of themachinist until it functioned correctly.

Babbage designed the engine at a time whenmanufacturing was in transition between craftand mass production techniques and methodsfor manufacturing repeated parts were stillincipient. Until the 1850s there was practicallyno standardization in manufacturing. Eachworkshop had its own lathes, often custombuilt, and the master screw from which screwthreads were cut usually differed from lathe tolathe even in the same workshop. The notionof a tolerance, the interval within which thedimension of a part will fall, is an anachro-nism—a backward projection from a later age.

With 4,000 parts to make, we abandonedany wistful notions of recreating a period work-shop and building the engine using contempo-rary 19th-century tools and practices. There wassimply no time. We unashamedly used moderntechniques including computer-controlledmanufacture. But no part was made more pre-cisely than was achievable by Babbage himself,although possibly by other means. Wright andBromley, friends and colleagues before the

76 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Page 8: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

engine project began, had taken measurementsfrom parts of Difference Engine No. 1 and estab-lished that Clement was able to make repeatedparts within a tolerance of two-thousandths ofan inch. This became the taboo threshold: Anabsolute condition was that repeated partswould be made to tolerances no finer than this.

The choice of materials for the constructionwas resolved through expert advice and inspec-tion of the relics of Babbage’s partial assemblies.These studies indicated that the use of gun-metal, cast iron, and steel was consistent withthe period. Gunmetal, a form of bronze, was incommon use in Babbage’s day. What we didnot know was whether Babbage would havetweaked the mix of copper, tin, and zinc by theaddition of other elements such as lead andphosphorous to achieve particular properties ofdurability, workability, brittleness, and slidingfriction. No one on hand seemed to knowmuch about the state of metallurgical knowl-edge in the 1840s. To resolve the issue we pre-vailed on the Department of Materials,Imperial College, to analyze the compositionof loose parts left over from Babbage’s earlierworks that were in the Museum’s collection. X-ray microanalysis showed that the mix waswithin an acceptable and recognizable stan-dard, and a close modern match was found.20

Although we now had clear ideas on whatmaterials Babbage would have used, the origi-nal drawings left us in the dark about whatmaterials would be used for which part.

In January 1990, I assembled an advisoryteam and convened a series of blockbustermeetings. Bromley happened to be in Londonen route to Greece to work on the Antikytheramechanism, the oldest known geared instru-ment, and was able to join the group. Theposse of curators, historians, and engineersconsisted of Crick, Bromley, Wright, Turvey,and me. The five of us met for four full days ofmarathon consultations sustained only by tea,coffee, and an occasional gobbled sandwich.The work was grueling and painstaking, andthe level of detail oppressive. We went throughthe drawings for the 4,000 parts and, for each,debated the material, method of manufacture,visual and functional authenticity, finish, anddid a final check on precision. By the end of thelast meeting, on 17 January 1990, Crick hadenough information to complete the drawings.

Run-up to the buildWith historical issues of specification

resolved, Crick translated Babbage’s 20 mainviews into 100 new working drawings that fullydetailed each of the 4,000 parts of the calculat-

ing section of the engine drawn to conform tomodern manufacturing conventions. By nowCrick had the most detailed understanding ofthe workings, engineering design, and manu-facturing issues of Babbage’s engine. Hedesigned and drew up the omitted mecha-nisms, and each went through a curatorialapproval system. For the few instances inwhich we were unable to resolve technicalissues from the original drawings, I turned, asa last resort, to the notations. Traditional draw-ing boards and drafting pencils were used: Theproduction of the new drawings was unaidedby CAD technology.

Barrie Holloway, a Rhoden engineer, man-aged the independent three-party tenderprocess required by government procurementpolicy. Each of three companies quoted for all4,000 parts, and Holloway undertook the com-plex process of splitting the order to mix andmatch the most economic combinations ofsupply. The permutations were nightmarish.The final figures were available in May 1990.The cost had gone up from an estimated£201,000 to £246,000. No one was surprised.

With drawings complete, funding secure,fixed price quotations in hand, 18 monthsuntil the deadline, and Rhoden Partners on tap,it looked as though we were in with a chance.But without warning, Rhoden went bust. Thesituation was rescued by prevailing on theScience Museum to hire Crick and Hollowayimmediately. My own role until then had beenthat of project director, project and contractsmanager, curator with responsibilities for tech-nical interpretation and authenticity, technicaladjudicator of design options, fundraiser, andpublicist. I would now also have direct linemanagement for Crick and Holloway anddirectly manage the build through to comple-tion including the subcontracted manufactureof parts to companies specializing in variousprocesses—milling, pattern making, casting,gear cutting, spring winding, case hardening,and so on. Crick and Holloway showed up forwork at the Science Museum on a fixed-termcontract on Friday, 8 June 1990, three days afterthey had been fired.

The buildThe engine was assembled in full public

view on a prime site on the ground floor of theScience Museum. An enclosure was builtaround the machine (known as the pen) inwhich Crick and Holloway, white-coated, slow-ly assembled the machine. The pen includedtwo workbenches with engineer’s vises andbasic hand tools for filing, drilling, reaming, fit-

July–September 2005 77

Page 9: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

ting, and finishing. These processes wereundertaken in open view. Parts requiringmachining were taken to engineering work-shops in the museum’s basement or returnedto the suppliers for modification.

The 4,000 parts were made in six months bya total of 46 separate specialist subcontractors.The first deliveries arrived from the contractorsin September 1990, and the 4,000 parts weresupplied in batches over the next six months.

The strategy for the build was not to assemblethe machine in its entirety and then test it in onedramatic episode.21 This may have been theatri-cal but ran against proven engineering practice.The machine was, after all, a prototype. Therewere too many unknowns. Instead, the enginewas assembled in small stages, and each stagetested before we proceeded to the next. Initially,progress was tentative and exploratory. Theheavy framing pieces that define the engine’soutline were assembled first, and then, at thecrank handle end, the 28 cams that generate andorchestrate the sliding, lifting, and turningmotions required for repeated addition werestacked. The drive trains for lifting and turningthe columns followed next. These trains, locatedbelow the eight sets of vertical axes, consist ofsets of racks and pinions for the circular motions,and of bell cranks driven by long links for thevertical motions (see Figure 4). Finally, the eightfigure-wheel columns, the sector wheel columns,and carriage axes were progressively installedstarting from the crank handle through to thetabular value at the opposite end (the sidebar,

“Babbage’s Difference Engine No. 2: Overview,”explains the relationship between the columnsand the differences).

In January 1991, with the cam stack andsome of the cam followers assembled, the firstattempt was made to turn the handle. As a pre-caution against unyielding loads, a four-to-onereduction gear had been inserted into the man-ual drive to ease the operator’s task. Despitethis, after a small rotation, the crank handlewould not budge. Analysis showed that the riseon the cams that controlled the locking actionwas too steep to allow rotation, and the camfollower, which is intended to follow the pro-file of the cam, could not mount what present-ed itself as a triangular obstruction and a shockload that could not be overcome.22 The timingcycle was too crowded to allow us to ease theangle to provide a gentler ramp.

Elsewhere in the engine, Babbage had solvedthe problem of excessive loads by the use ofcounterbalancing springs. The heaviest load isthat presented by the columns of figure wheels,sector wheels, and their vertical shafts that needto be lifted and lowered during each calculatingcycle. Babbage provided strong springs at thetop of each vertical shaft. The springs, which arein compression, support the columns in theirresting position. A single example of this, withimplied duplication, is shown at the top of theengine on the first difference column (the sec-ond column from the left) in Figure 4. Insteadof having to lift, via the drive mechanism, thefull weight of the columns, all that is required

78 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Figure 4. Design drawing. Main elevation showing crank handle (right), calculating section (center),and output apparatus (left). Science Museum Library Babbage Papers, drawing BAB [A] 163, “Elevationfor Difference Engine No. 2.” (Drawing courtesy of the Science Museum, London.)

Page 10: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

is a nudge up or down from the equilibriumposition. The forces for these deflections aresmall compared to the forces required to lift andlower the full weight of the assemblies, and theexertions of the operator are correspondinglyrelieved. Using this technique as a model, Crickdevised a mechanism using a strong counter-balancing spring to relieve the load. The mech-anism was fixed under the lowest framing piece,out of sight for normal viewing (see Figure 5).

The phasing of internal actions is critical.The calculating cycle is crowded with littlemargin for deviation from strict synchrony. Ifa part moves fractionally late or early, themechanism is likely to seize or break as it foulsa mating part. When parts were first positionedon the machine, they were rarely in their cor-rect orientation. Each had to be adjusted andthen fixed permanently. The drawings simplyshow all gears and rotating parts permanentlypinned to their shafts already in their correctand final positions. There is no indication ofhow the correct positions are to be determinedbefore pinning. Hundreds of parts were fittedone at a time by trial and error using grub-screws for incremental adjustment for eachtrial. Until all the parts were correctly phased,the machine would jam incessantly. Breakages,especially of the brittle bronze carry levers,which are the most fragile part of the carriage

mechanism, were not uncommon, especially asthe reduction gear in the drive reduced sensi-tivity to obstructions.

Jamming is an intended feature of error detec-tion built in by Babbage. The engine is a decimaldigital machine. It uses the familiar Arabic num-ber system, and it is digital in the sense that onlydiscrete integers are legitimate representations ofdigit values. So the value represented by atoothed figure wheel at rest in an intermediateposition between two digit-values is indetermi-nate, and the occurrence of this state signals thatthe integrity of the calculation has been com-promised.

What makes Babbage’s designs digital is notany inherent discreteness in the motions of thebasic logical element (a gear wheel) but the lock-ing and control mechanisms. The most com-mon method used for “digitizing” the motionsoccurs in the form of a wedge that is drivenbetween teeth of the gears at various points inthe cycle. The wedge has three functions:

• Locking. When inserted between two teeth,the wedge locks the wheel and preventsderangement except during specific prede-termined windows in the timing cycle. Thewedges, which run like sword blades up thecolumns and act on all 31 figure wheels atthe same time, are called locks (see Figure 2).

July–September 2005 79

Figure 5. Difference Engine No. 2, on display at the Science Museum, 2005. Eleven feet long and 7 feethigh, the engine weighs 5 metric tons and has 8,000 parts. Main crank handle is at the right; thecalculating section is in the center; and the output apparatus (printer and stereotype mechanisms) areat the left. (Photo courtesy of the author.)

Page 11: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

• Self-correction. Because of its angled profile,the insertion of the wedge has a self-cor-recting action: Small deviations from exact-ly discrete increments are corrected by thecentering action of the wedge. This action isanalogous to electronic pulse shaping.23

• Error detection. The wedge acts as an errordetector: If a toothed figure wheel hasderanged by more than half the gapbetween teeth (2-1/4 degrees), then thetooth blocks the entry of the lock and caus-es a jam.24 The crank handle seizes, and theoperator is alerted that the calculation hasbeen compromised.

The locking mechanisms, unique toBabbage’s designs, are intended to ensure thecalculation’s absolute integrity. Babbage used avariety of security mechanisms, one of whichis a device of extraordinary subtlety, the func-tion of which was not fully understood until itwas assembled and operated. The device inquestion involved horn-like attachments in thecarriage mechanism (see Figure 2). In accor-dance with Babbage’s intentions, these werecarried through to the new drawings, althoughtheir function was not fully evident at the time.In live operation, it became clear that the hornsare a security measure that prevents the figurewheels from deranging while waiting for a pos-sible carry from below. The device prevents thewheel from incrementing unless driven fromthe legitimate source at a particular point in thecycle. Babbage went to great lengths to makegood his assertion that his machines break,jam, or operate as intended, that is to say, theywould never deceive.25

One of the greatest difficulties in the com-missioning stages of the engine resulted fromthe absence of any provision for debugging.When the machine jammed, there was no pro-vision for easily isolating one section fromanother to help localize the fault. The wholemachine, including the printing and stereotypeapparatus, is one monolithic “hard wired” unit.Drive gears and levers are pinned to theirshafts. Drive rods and links are shown in theoriginal drawings as pinned or riveted andtherefore difficult to dismantle once assembled.In the event of a jam, all one could do was pokearound with a screwdriver, or in extreme casesa crow bar, prying here and there for some giveor play that would indicate that the jamoccurred earlier in the machine. The hunt-and-peck technique was repeated until a movingpart was found with no play, and the firstoccurrence of this was inspected as the possiblesource of the jam. During assembly and com-

missioning, the machine jammed countlesstimes each day. When the machine was lockedsolidly, the starting point for fault detectionwas haphazard and demoralizing.

Our first attempt to set up the machine toperform its first calculation took place on 23June 1991, four days before the exhibitionopening. In anticipation, I had calculated theinitial setting up values for a table of powers ofseven, the first test calculation we would try,using a CP/M version of a Microsoft spread-sheet, package, Multiplan, running on a NorthStar Horizon computer I had bought back inthe US in 1979. I also produced a printout ofthe first 80 values of the function y = x7 the firsttest calculation we would try. In the first trialwe found that the setup procedure described byBabbage was self-corrupting. The odd and evenaxes are set up at different parts of the cycle,and advancing the machine to the secondsetup point deranged the settings alreadymade. The solution was simple enough: to pro-vide temporary locks (vertical metal strips withslotted fixing holes) that could be slid in andout and fixed in the engaged or unengagedposition using knurled nuts. The self-corrupt-ing sequence is an illustration of the earlierassertion that although the deficiencies in theoriginal design were many and varied, nonewere issues of basic logic that compromisedBabbage’s original intentions—that is, modifi-cations were issues of engineering implemen-tation rather than of principle.

Fitting and assembly started in September1990, and the calculating section was fullyassembled by late June 1991. At the time themachine went on exhibition on 27 June 1991,it was still plagued by jams. At the gala open-ing, the engine was demonstrated to interna-tional media with all figure wheels set to zero.This prevented jams and allowed the visuallyarresting spectacle of the rotating helices of thecarriage mechanism to be shown. The sight ofthe rippling helices distracted the press fromthe historically inconclusive state of progress,and media coverage was uniformly positive.

Commissioning and debugging continuedin the intervals between twice-daily publicdemonstrations but without the protection ofour enclosed pen. The sources of the jams wereprogressively eliminated, and, with use, the ini-tial stiffness began to ease. The path to reliableworking was a gradual process of eliminatingmore refined forms of minor fault.

The final adjustments were to some of thecarriage mechanisms. Babbage had insisted onthe highest precision achievable at the time asa uniform standard. Michael Lindgren, for one,

80 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Page 12: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

has argued that the lessons of the Scheutz dif-ference engines, the first of which was finishedin 1843, are that such precision was not onlyunnecessary but that the consequent costs anddelays contributed to Babbage’s failure.26 Wehad thought that by using computer-controlledmanufacture, repeated parts, would be suffi-ciently similar to be interchangeable. Thisproved not to be the case. The most delicateparts are the bronze carry levers which, becauseof their intricacy, were made in two parts sol-dered together in a jig. We found that some 10percent of the 210 carry levers required finaladjustment by hand (through trial and error)using a specially made tool to bend the arms.

The engine performed its first full automat-ic error-free tabulation of the function y = x7 on29 November 1991, 27 days before Babbage’s200th birthday. Though the final adjustmentswere finicky, the machine, once pinned andadjusted, has been, from the time of its first cor-rect calculation, robustly and persistently reli-able. Almost without exception, calculationerrors have been traced to an earlier humansetup or operational error.

Each new tabular result requires seven 31-digit decimal additions. At first the engine cal-culated at a rate of one result (seven 31-digitadditions) every 10 seconds. As the machineeased with use, the rate speeded up to oneresult every 6 seconds.

Output apparatus—Funding andpreparation

The automatic production of a machine-replicable record of results is an integral part ofthe conception of the engine. The output appa-ratus that prints and stereotypes results isdescribed in the original set of drawings to thesame level of detail as the calculating section.The operation of this compound output appa-ratus is described in the sidebar, “DifferenceEngine No. 2: Printing and Stereotyping.”

The unique circumstances of the bicente-nary provided a hard deadline as well as lever-age to raise sponsorship through the benefit byassociation with a high-profile project. This hadnow passed. There was now no deadline andno public event on the back of which to attractcorporate support.

The funding breakthrough came, indirectly,through Bill Gates. The European press launchof his book The Road Ahead was held in theScience Museum on 3 December 1995, and thephoto opportunity was to be the spectacle ofGates turning the engine’s handle. When hearrived at the museum, I gave Gates prelimi-nary guidance on the turning technique while

a rabid pack of some 40 paparazzi, corralledinto a small area behind the engine, shoutedhis name to pop a shot as Gates turned in reflexto the caller. The atmosphere was aggressiveand threatening, and Gates appeared discom-fited by the assault. The confusion and noise ofthe situation prevented me from making apitch, but a member of Gates’s party, JonathanLazarus, trailed behind and was interested in asource of Enigma machines. I took his card andwe exchanged emails, in one of which I askedwhat Gates had thought of the machine.Lazarus relayed to me that Gates had thoughtthat the “machine was ‘very cool’ and that hehad been pleased to see it.”

I sought Lazarus’s advice about any poten-tial interest Gates or Microsoft might have insponsoring the printer construction andemailed a project description. He referred meto Nathan Myhrvold, group vice president ofapplications and content, at Microsoft. Whatfollowed was a year-long email courtship withMyhrvold, aided by a visit and a demonstra-tion, on 13 March 1997, of the completed sec-tion of the machine. He followed up shortlyafter with a proposal to personally fund theconstruction of two printers and anotherengine. The first printer would complete theScience Museum’s existing machine; the sec-ond printer–engine pair would be a replica ofthe whole engine for display, and occasionaluse, in Myhrvold’s house in Seattle. When Itold Reg Crick, the now-retired engineer whohad played a key role in constructing the cal-culating section, all he said, with what I hopewas an audible smile, was “What took you solong?”

Orders for parts were dispatched in October1998. Crick came out of retirement and assem-bly work in the gallery started late in 1999.Assembling Babbage’s machines is a two-persontask, and Holloway had long since left. I had ayoung, well-qualified in-house conservator–machinist and engineering workshop enthusiast,Richard Horton, assigned to Crick for the build.He was to be Crick’s “apprentice” and was beinggroomed for the future.

Building the printing and stereotypeapparatus

The output apparatus was built in publicview directly onto the already completed cal-culating section of the engine. Building theapparatus was substantially more difficult,troublesome, and frustrating than building thecalculating section. We originally estimatedthat it would take a year to assemble. It tookwell over double this time. The single biggest

July–September 2005 81

Page 13: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

difference between the two sections of themachine is that, although there is a large num-ber of repeated parts and assemblies in the cal-culating section, there is very little repetitionin the output apparatus. The learning curvethroughout the fitting and assembly stayed rel-atively flat.

Like the calculating section, Babbage drewthe output apparatus as a single monolithic“hard wired” assembly with no provision for

adjustments. Unlike the calculating section, theoutput apparatus is dense and deep with pooraccess to its internal workings. Any small adjust-ment or fitting required lifting out the whole 2.5metric ton assembly to enable access. Each trial-and-error adjustment meant countless separatecycles of removal and refixing. A large overheadgantry was mounted permanently to lift out theapparatus, sometimes several times a day.

Inevitably, there were modifications to the

82 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

A central feature of Babbage’s calculating enginedesigns is the automatic capture of machine-replicableoutput. Difference Engine No. 2 features an output appa-ratus that automatically typesets, prints, and stereotypesresults. The apparatus is shown on the left-hand side ofFigure 4 in the main text. The upper section contains theprint wheels, inking apparatus, and paper roll for hard-copy, as well as the stereotype wheel punches. The lowersection is a movable platform that positions the stereotyp-ing trays under the stereotype punches for each newresult. The whole apparatus, which is bolted to the mainframing, consists of some 4,000 parts and weighs and esti-mated 2.5 metric tons. As an ensemble, the two units pro-duce one-off inked hardcopy results to 30 digits on a printroll as well as a stereotype mold for the production of

printing plates for use in a conventional printing press.Figure B shows a plan view.

The printing and stereotyping apparatus is directly cou-pled to the calculating section, and each new 30-digit tab-ular value is transferred automatically from the resultscolumn, via a system of racks, pinions, and spindles, to theprint wheels. The tabular result is transferred at the sametime to two sets of punches for stereotyping (see Figures Cand D). Typesetting is automatic, and each result is printedand stereotyped during the calculating cycle in which it isgenerated: There is no buffering or storage of the result andthere is no time overhead to print—that is, printing andstereotyping is accommodated in the calculating cycle andtakes no additional time. Each cycle leaves an inked impres-sion of a 30-digit result on the paper print roll that advances

automatically to providefresh paper for each line(see Figure 7 in the maintext and Figure E). Thishardcopy printout isintended as a record andchecking copy only; theoperator cannot alter theline spacing and format.The production of multiplecopies for distribution isachieved through stereo-typing.

There are two sets ofstereotype punches, onewith a larger, and one witha smaller font. Each setconsists of 30 wheels, onefor each digit of the result,with hardened steel num-ber punches fixed at thecircumference (see FigureD). The wheels making upthe punches have 2degrees of freedom only:rotational (to register eachdigit of the result), and ver-

Difference Engine No. 2: Printing and Stereotyping

Figure B. Plan of output apparatus. Science Museum Library Babbage Papers, drawingBAB [A] 173, “Plan of Inking Printing & Stereotype Apparatus,” undated. (Drawingcourtesy of the Science Museum, London.)

Page 14: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

designs. Some were precautionary. Others werein response to problems that arose during com-missioning. Precautionary measures includedthe provision of counterbalancing weights torelieve the deadweight of the 30 vertical racksforming part of the drive train that transfers thetabular value from the last column to the printwheels. Another precaution was the provisionof robust support brackets and legs to relievethe load on the bolts that fix the whole appa-

ratus to the engine frame. Such measures werereversible and unproblematic.

Some modifications were introduced inresponse to operational difficulties during com-missioning. There is, for example, no way ofuncoupling the drive to the output apparatusfrom the calculating section: The drive is pro-vided by a single unbroken shaft that runs thefull length of the underside of the engine andis directly driven by a large bevel gear under the

July–September 2005 83

tical (lowering to impress the result, and raising to return toreceive the next result). The wheel punches are assembledon the same shaft and are lowered and raised together as aset. Below each set of punches is a bronze tray to take thesoft material to receive the impression (see Figure C).

During each calculating cycle, the punches are drivendownward into the trays below, and the material isimpressed with all 30 digits at the same time in one action.After each impression, the tray advances automatically andrepositions itself to receive the next result on a new line orcolumn and the distance between the impressions (the lineheight) is determined by the incremental advance of the tray.The smaller tray advances by a proportionately smalleramount to give a reduced line height in keeping with thesmaller font size. The platform or carriage supporting thestereotype trays has 2 horizontal degrees of freedom, whichallow the trays to advance down the page (line to line) oracross the page (column to column). The carriage is drivenby falling weights that are rewound automatically at the endof a column or page. The layout of results can be pro-grammed by the operator by selecting from a menu of pat-tern wheels, which control the incremental behavior of themoving platform. Programmable formatting features includeline height, number of columns, margin widths, number oflines on a page, blank lines between groups of lines, and the

ability to have results progress line to line with automatic col-umn wrap, or column to column with automatic line wrap.

A feedback mechanism from the output apparatus tothe calculating section automatically halts the machine atthe end of a stereotyped page to prevent an overrun. Thisensures that the first new result on the fresh tray is the nextresult in the sequence and that no results are lost in thechangeover.

Figure C. Output apparatus (computer simulation)showing figure wheels (top right), printing apparatus(left), and stereotyping punches and trays (bottom).(Photo courtesy of the Science Museum, London.)

Figure D. Stereotyping wheel punches for large font.(Photo courtesy of the Science Museum, London.)

Figure E. Printing mechanism showing inking rollers andink bath (top), and paper drums in raised position takingan inked impression from the print wheels. (Photocourtesy of the Science Museum, London.)

Page 15: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

cam stack (see Figure 4). So to run the printer,you need to run the engine. This is not practi-cal either during commissioning and testing, orwhen using the machine for tabulation. Withno provision for uncoupling, working on theoutput apparatus required two people, one atthe crank handle, the other at the output end11 feet away. This, too, was impractical:Countless adjustments, visual inspections, andtests requiring incremental operation would beinconvenient or impossible to perform withtwo operators, one unsighted, stranded at thecrank end. There was also the frequent need towork on the two units separately, and debug-ging was easier if the units could be uncoupled.

A more serious problem would arise whenusing the machine for tabulation. In some situ-ations, the output apparatus needs to be cycledwithout disturbing the engine. Priming the ink-ing rollers by cycling the printing system is onesuch need. Advancing the stereotype trays sothat they can be removed, refilled, or replaced isanother. Both these operations may be requiredduring a calculation run. However, without thefacility for uncoupling, the only way to cycle theoutput apparatus was to cycle the engine, anddoing so alters its internal state and destroys the

continuity of the calculation run.The solution was to sever the main drive

shaft to the output apparatus and insert aclutch that could couple or break the drive asneeded. Crick designed the clutch with man-ual interlocks so that the drive can be recou-pled if and only if the output apparatus andthe calculating section are correctly phased.A crank handle, a duplicate of the handlespecified by Babbage, was provided at theprinter end so that the output apparatuscould be driven directly without affecting thecalculation section. (See the left-hand side ofFigures 5 and 6).

One intriguing additional device was a“bounce catcher.” An inking roller swingsdownward each calculating cycle to ink theprinting wheels immediately before an impres-sion is taken. At the end of the return swing, itwas found to rebound from its end stop andfoul the paper roller, which was in the upwardswing of its trajectory. With the timing cycletoo tight to separate the actions, Crick designeda mechanism to trap the roller in its home posi-tion on the return swing. In preventingunwanted oscillations the action of the mech-anism is not unlike that—by way of electronicanalogy—of a Schmidt trigger, which latchesthe output in a fixed state when a noisy inputsignal passes through a reference threshold.

The biggest single difficulty that bedeviledgetting the output apparatus operational wasfriction in the drive trains that transfer theresults from the calculating section and theoutput apparatus. The main source of this wassliding friction between 30 vertical racks. Theracks slide against each other, and we foundthat surface tension using any form of oil cre-ated surprisingly high resistance to sliding. Wetried various forms of wet and dry lubricationwithout success. A combination of relieving thecontact surfaces by milling selected shapes inthe faces of the racks, skimming down theoverall width, and using dry graphite lubrica-tion ultimately solved the problem. The stiff-ness in the train hampered progress almostuntil the end and masked several other faultsin the process.

One fundamental design issue threatened toundermine Babbage’s ambitions for the outputapparatus. The output apparatus automaticallytypesets the printed and stereotyped results. Indoing so, the mechanism aligns the appropri-ate digits on the printing wheels and stereotypewheel punches for each result. As described ear-lier, in the calculating section Babbage usedwedge-shaped locks, which have a centeringaction that helps to ensure fully digital opera-

84 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Figure 6. Difference Engine No. 2, 2002. Foreground: Printing andstereotyping apparatus. Rear: Calculating section and drive. (Photocourtesy of the Science Museum, London.

Page 16: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

tion. The same locking mechanism is used inseveral places in the output apparatus. Thequestion that remained unanswered until lastwas whether the action of the wedge-shapedlocks would be sufficient to align the stereo-typing punches accurately enough—that is, tothe analog standards of exactness for a typo-graphically acceptable result.

The first clue that the wedge-shaped lockingsystem might not be adequate was the imper-fect alignment of the experimental inkedpaper-roll hardcopy output (see Figure 7).Examination revealed that the forces withwhich the locks operated were not sufficient toalign the stereotype punches, and this hadbeen masked by the stiffness in the verticalracks. Crick devised a collapsed link mecha-nism that drove one of the existing locks homewith sufficient force to align the punches to anacceptable standard.

The various intended features of the outputapparatus were exercised for the first time inMarch 2002. Although refinements to the ink-ing apparatus were made subsequently, thisdate marks the completion of the machine, asoriginally designed.

The project to construct the engine startedwith Bromley’s proposal in May 1985. It took justunder 17 years to realize an operational machine.

LessonsIt is legitimate to ask what was learned from

this project, and what was learned that couldnot otherwise be learned. The machine wasbuilt to tolerances achievable by Babbage, usingmaterials available to him, and introducingreversible modifications to the design usingsolutions used by Babbage elsewhere. Despitemany modifications, no flaws were found thatcompromised the design’s essential logic orprinciples. Given that the machine works, andwas built with conscientious attention to issuesof authenticity, the project provided definitiveanswers to some of the earlier historical ques-tions about Babbage’s standing. It is fair to con-clude that had Babbage built the machine, itwould have worked. Second, the fact of itsworking vindicates Babbage as a designer ofextraordinary practical inventiveness, this inaddition to the already recognized intellectualaccomplishments of his designs for computingengines. So we can demonstrably say thatBabbage was not an impractical dreamer but adesigner of the highest caliber. These assertionscould not be made with the same convictionwithout the empirical confirmation of a work-ing machine.

There were lessons learned that in principle

could have been learned without the construc-tion, but were not. The subtle device for lockingthe figure wheels during the carriage cycle wasnot fully understood until built and operated.Another contingent finding was the maximumspeed of operation and the limiting factor deter-mining this. We found, after the mechanismshad eased with use, that the maximum speed ofthe machine as designed was 10 results perminute.27 Also, the limiting consideration wasa gear that gets thrown out of mesh, and this isprobably remediable by a stronger spring.

In principle, one could have analyzed,inferred, and foreseen these and other features.But nobody did. Like playing chess, there is alimit to the number of moves one can foresee,and the explosion of uncertainties from morethan a few counterfactual conditionals in thetrain of reasoning soon sabotages confidence inany conclusions one might draw. In someinstances, there is no substitute for practice.

Having a physical machine to operatefocused attention on issues of operational pro-cedure, and gave us insights into the implica-tions for contemporary table making. Oneinsight was into the possibility of suppressingleading zeros. The construction of the print-wheels and stereotype wheel punches indicatesthat suppressing leading zeros in the printedhardcopy was clearly not intended. Replacingwheel punches with blank spacers is possiblebut not practical, and it is likely that leadingzeros would have been cut or machined off theprinting plate after it was cast.

July–September 2005 85

Figure 7. Experimental printout of a seventh-order polynomial. Theargument is the left-hand three columns. (Photo courtesy of theScience Museum, London.)

Page 17: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

Close contact with the practical proceduresfor stereotyping gave suggestive insights intoissues that had remained puzzling. One suchwas the question of why Babbage’s designsshowed engines working to so many digits ofprecision.28 Faced with the practical task ofstereotyping a run of calculations raised thequestion of how the argument would be tabu-lated. If the full 30 digits are used in the print-ed result, then generating the argumentrequires a separate run using only one differ-ence to increment each next value. The tabu-lated argument would then later have to bematched to the separately tabulated results atthe stage of making the printing plates.

A feature of the machine is that the calcu-lating section can be split horizontally to iso-late upper and lower sections. This is done bydisabling the carriage of tens at any digit posi-tion on each of the eight columns of figurewheels. The manual adjustment to do this issimple and takes only a moment. Separate cal-culations can then be carried out in each of theisolated sections with the 30 digits apportionedbetween the two sections at will. So one sectionof the machine can perform the tabulation ofa polynomial function of up to the seventhorder, and a separate section can tabulate theargument using only one difference to pro-gressively increment the argument. The argu-ment and result both occupy the last columnof the engine and are automatically printedand stereotyped on the same line alongsideeach other (see Figures 7 and 8).

Generating the argument and the result inthe same calculation run, by distributing the

machine’s full digit capacity between the argu-ment and result, contributes to the debateabout the apparently extravagant digit preci-sion of Babbage’s designs: The full digit capaci-ty may not have been intended only for theresults.

ConclusionThe successful construction of the engine

was instructive in furthering historical under-standing of Babbage’s capabilities and achieve-ments. Constructing the machine revealedfeatures and subtleties that had not been fullyappreciated through analysis of archivalsources. Moreover, the fact that the machineworks without material modification to theoriginal drawings vindicates Babbage as adesigner of the highest caliber. The meaningand value of the machine, both historical andtechnical, are far from exhausted: the existenceof a complete and working Babbage tabulatingengine offers an opportunity to further exploreautomatic tabulation as practiced in the 19thcentury and to acquire operational know-howinaccessible by nonempirical means.

The physical artifact—large, intricate, andimposing—serves to memorialize Babbage asthe great ancestral figure in the history of com-puting, and in this it achieves the purpose of itsconstruction as articulated by Allan Bromley in1985. The engine rounds off a historical narra-tive. The successful construction of themachine closes an anguished chapter in com-puter pre-history: The Science Museum is agovernment institution funded from theTreasury, and the original deal between thegovernment and Babbage to fund his machineto completion has finally been fulfilled.

The sumptuous spectacle of the machine inoperation is an arresting sight. The act of wit-nessing the startling choreography of its mov-ing parts and the clanking synchrony of itsmotion prompt us to experience the promise ofa future already past.29 Objects are interpretedand reinterpreted by successive generations.Others will find other meanings.

AcknowledgmentsI would like to acknowledge the Science

Museum for providing the context and envi-ronment for undertaking the project to con-struct Babbage’s calculating engine. Specialthanks to two Science Museum directors inwhose tenures this project fell: MargaretWeston, who encouraged and financially sup-ported the late Allan Bromley’s pioneering workon Babbage’s engine designs, and Neil Cossons,who spiritedly backed the project to construct

86 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2

Figure 8. Experimental stereotype mold in plaster of paris. Detail.(Photo courtesy of the Science Museum, London.)

Page 18: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

the engine at critical points in its eventful tra-jectory, despite the risks. Generous financialsupport was provided by ICL, Unisys, Hewlett-Packard, Rank Xerox, and Siemens Nixdorf forthe construction of the calculating section com-pleted in 1991. Tom Bales, director of SymbiosisFoundation, funded the preparation of thedrawings for the printing and stereotypingapparatus. Special thanks to Nathan Myhrvoldfor generously funding the construction of theprinting and stereotype apparatus completed in2002, as well as a complete replica engine, andfor his good-humored patience awaiting theoutcome. Most of the illustrations were pho-tographed by David Exton.

References and notes1. A. Hyman, Charles Babbage: Pioneer of the Com-

puter, Oxford Univ. Press, 1982, pp. 124-131; D.Swade, The Cogwheel Brain: Charles Babbage andthe Quest to Build the First Computer, 2000, Little,Brown (published in the US as The DifferenceEngine: Charles Babbage and the Quest to Build theFirst Computer, Viking, 2001, pp. 65-71).

2. A.G. Bromley, “The Evolution of Babbage’s Calcu-lating Engines,” Annals of the History of Comput-ing, vol. 9, no. 2, 1987, pp. 113-136.

3. The quoted phrase is Henry Prevost’s. See H.P.Babbage, ed., Babbage’s Calculating Engines: A Col-lection of Papers by Henry Prevost Babbage, E. andF.N. Spon, 1889, preface. (Reprinted in TheCharles Babbage Institute Reprint Series for the Histo-ry of Computing. vol. 2, Tomash Publishers, 1982.For historical evolution of Babbage’s ideas, see B.Collier, The Little Engines that Could’ve: The Calcu-lating Engines of Charles Babbage, Garland, 1990.

4. For a detailed technical description of the Analyti-cal Engine, see A.G. Bromley, “Charles Babbage’sAnalytical Engine, 1838,” Annals of the History ofComputing, vol. 4, no. 3, 1982, pp. 196-217(reprinted in 1998, vol. 20, no. 4, pp. 29-45).Also see A.G. Bromley, “Babbage’s AnalyticalEngine Plans 28 and 28a—The Programmer’sInterface,” IEEE Annals of the History of Computing,vol. 22, no. 4, 2000, pp. 4-19.

5. Collier, The Little Engines that Could’ve, p. 211;also see A.G. Bromley, The Babbage Papers in theScience Museum: A Cross-Referenced List, ScienceMuseum, London, 1991, p. 11.

6. Science Museum Library Babbage Papers , draw-ing BAB [A] 99, “Rough sketch of an element of aDifference Engine and method of Carrying Con-secutively,” 1 March 1842.

7. C. Babbage, The Exposition of 1851 or Views onthe Industry, the Science, and the Government ofEngland, 2nd ed., 1851; M. Campbell-Kelly, ed.,The Works of Charles Babbage, vol. 10, WilliamPickering, 1989, p. 108.

8. C. Babbage to Lord Derby, 8 June 1852, quotedin C. Babbage, Passages from the Life of a Philoso-pher, Longman, Green, Longman, Roberts &Green, 1864, p. 104.

9. For quoted phrase see Babbage, Passages fromthe Life, p. 114. For a technical description of theanticipating carriage mechanism, see A.G. Brom-ley, “Charles Babbage’s Analytical Engine, 1838,”Annals of the History of Computing, vol. 4, no. 3,1982, p. 202 and the following.

10. Babbage, Passages, p. 97.11. Science Museum Library Babbage Papers , draw-

ing BAB [A] 166, “Apparatus for moving Stereo-type frames for Analytical & Difference Engines,”undated.

12. Babbage, Passages, p. 107. See also p. 106 forreference to “imagined obligation.”

13. Science Museum Registered File, ScM 2004/46/5pt. 1, “Babbage Difference Engine No. 2: ProjectCorrespondence.” File Note recording firstaction, 7 Nov. 1986.

14. For the listing, see Bromley, The Babbage Papers,1991, pp. A-13 to B-3.

15. There are two drafts. The first is dated 13 June1985. The second is a slightly expanded versiondated 27 March 1987; Science MuseumRegistered File, ScM 2004/46/19, “Babbage Dif-ference Engine Project: Correspondence with Dr.A. Bromley.”

16. For a comprehensive description, see D. Swade,Charles Babbage’s Difference Engine No. 2: Techni-cal Description, Science Museum Papers in theHistory of Technology, Science Museum, London,1996.

17. Science Museum Library Babbage Papers, draw-ing BAB [A] 172, “End View of Inking PrintingPaper and Stereotype Apparatus,” undated.

18. A. Bromley to M. Weston, 20 May 1985, ScienceMuseum Registered File, ScM 2004/46/19.

19. For a fuller narrative account of the trial piece,see Swade, Cogwheel Brain, chapter 13.

20. For details of composition analysis see ScienceMuseum Registered File, ScM 2004/46/29, “Bab-bage DE2: Technical Notes.”

21. For a fuller narrative account of the build (exclud-ing the output apparatus), see Swade, CogwheelBrain, Part III, pp. 221-318.

22. For cam profile details, see the Science MuseumLibrary Babbage Papers, drawing BAB [A] 169,“Plan of Cams for Odd Difference Figure Wheelsand for Vertical motion of Even Differencewarning.”

23. I am indebted to Eiiti Wada for this analogy. Per-sonal communication, Tokyo, 24 July 1998.

24. See Swade, Charles Babbage’s Difference EngineNo. 2, 1996, pp. 70-71.

25. C. Babbage, On the Mathematical Powers of theCalculating Engine, 1837; M. Campbell-Kelly, ed.,

July–September 2005 87

Page 19: The Construction of Charles Babbage’s Difference Engine No. 2ed-thelen.org/bab/DoronSwadeIEEE.pdf · Doron D. Swade Charles Babbage designed Difference Engine No. 2 between 1846

The Works of Charles Babbage, vol. 3, WilliamPickering, 1989, p. 39.

26. M. Lindgren, Glory and Failure: The DifferenceEngines of Johann Muller, Charles Babbage, andGeorg and Edvard Scheutz, 2nd ed., MIT Press,1990.

27. Based on the earlier Analytical Engine designs,Bromley first estimated the speed of calculationfor Difference Engine No. 2 at one result every7 seconds. He later amended this to 3.5seconds. See Ref. 15.

28. For discussion of digit precision in the context ofcontemporary table-making, see D. Swade, Calcu-lation and Tabulation in the 19th Century: Airy ver-sus Babbage, doctoral dissertation, 2003, Univ.College London. For a summary account and useof Difference Engine No. 2, see D. Swade, “The‘Unerring Certainty of Mechanical Agency’”:Machines and Table Making in the NineteenthCentury,” The History of Mathematical Tables: FromSumer to Spreadsheets, M. Campbell-Kelly et al.,ed., Oxford Univ. Press, 2003, pp. 143-174.

29. F. Spufford, “The Difference Engine and The Dif-ference Engine,” Cultural Babbage: Technology,Time and Invention, F. Spufford and J. Uglow,eds., Faber and Faber, 1996.

Doron D. Swade is VisitingProfessor (Interaction Design)at the Royal College of Art,London. Until 2002 he wasassistant director and head ofcollections at the ScienceMuseum, London. From 1985to 1999, he was the Science

Museum’s senior curator of computing. Previously,he designed electronics and computer-based hard-ware for museum exhibits and consulted for themicrocomputer industry in the UK and US. He has aBSc in electronics engineering and physics, an MScin control engineering, and a PhD in the history of19th-century calculating machines. His most recentbook is The Difference Engine: Charles Babbage and theQuest to Build the First Computer (Viking, 2001).

Readers may contact Swade about this article [email protected].

For further information on this or any other com-puting topic, please visit our Digital Library athttp://www.computer.org/publications/dlib.

88 IEEE Annals of the History of Computing

Charles Babbage’s Difference Engine No. 2