has described the difference engines of Charles Babbage as âmainframesâ in comparison to the machinery being developed by his contemporaries (Johann ...
Charles Babbage’s Mini-Computer - Difference Engine No. 0 NICHOLAS K. TAYLOR, AFIMA Written in the bicentenary of Babbage’s birth (1991) First appeared in IMA Bulletin, 28 (6), pp. 112-114 (1992) Transcribed by the author as not available online (2013)
1. Introduction Doron Swade1 has described the difference engines of Charles Babbage as “mainframes” in comparison to the machinery being developed by his contemporaries (Johann Mueller, Alfred Deacon, Martin Wiberg and Georg and Edvard Scheutz). This is amply demonstrated by the large assemblies which constitute mere portions of the Difference Engine No. 1 and the Analytical Engine and the complete Difference Engine No. 2 recently constructed by Swade’s team at the Science Museum to mark the bicentenary of Babbage’s birth. Babbage did not start out by designing mainframes however. Prior to embarking on his succession of mainframe designs, none of which was completely constructed until this year, Babbage designed and built a smaller difference engine. Since Babbage himself dubbed his second design “Difference Engine No. 1” it would seem appropriate to refer to the earlier engine as “Difference Engine No. 0”.
2. Babbage’s First Difference Engine Difference Engine No. 0 was designed and built between 1820 and 1822. It worked with 2 orders of differences and could cope with numbers which contained up to 8 digits. In a letter to Sir Humphry Davy2, Babbage indicated that Difference Engine No. 0 could tabulate x2 + x + 41
0 ≤ x ≤ 29
in just 2 minutes and 30 seconds and in a further trial was able to surpass even this. We might scoff at such times these days but we should recall that compared to human computers (and the word computer did indeed describe a human occupation in Babbage’s day) the engine represented a considerable improvement. Babbage himself gives us two different accounts of how and when his Difference Engines were first conceived. In a manuscript dated November 1822 but almost certainly written in 1821, Babbage states that, in a conversation with John Herschel, “one of us” suggested “that it would be extremely convenient if a steam-engine could be contrived to execute calculations for us”3. However, in his autobiography4, Babbage informs us that “the idea of computing tables by machinery” first came to him whilst he was at Cambridge in 1812 or 1813. It resurfaced in about 1819 and this time was married to the method of differences. The autobiographical account then launches straight into the design of Difference Engine No. 1 as
if this also took place at Cambridge - which it did not - and Difference Engine No. 0 receives only a passing mention. Fortunately the earlier account provides considerable detail regarding the design of Difference Engine No. 0. Amongst other things it indicates that Babbage considered the possibility of using sliding rods instead of rotating wheels as the basic mechanism upon which to found his machine. Needless to say he rejected this approach and thereafter employed the maxim “Always to prefer a circular motion to any other when its immediate object relates to number” since the transition from 9 to 10 (or 0) is really no different to that from 3 to 4 apart from the requirement to pass on a carry digit. There was nothing new in this observation, of course, but it says much about Babbage's method that he did not just blindly accept an idea which had prevailed for the 200 years since Blaise Pascal first conceived of the Pascaline. Having settled on a rotational motion Babbage next had to face the problem that, in calculating tables using differences, it was not possible to determine in advance which particular additions were going to be required in a calculation. Each addition would be dependent on the results of previous additions. In practice this meant that the amount of rotation which had to be applied to a wheel had to be determined during the course of the calculation. In order to force some consistency on the addition process Babbage adopted the principle “That whenever an axis carrying a wheel, on which was set a figure to be added, commenced its motion, it should always make a complete revolution; and that the addition of the given number should be accomplished by putting the wheel attached to it out of gear after a certain number of divisions had passed a given point”. Babbage thus found himself investigating various possibilities for the design of gear assemblies. The design he eventually settled on was overly complex by today's standards. It required a total of six wheels in order to permit the motion of one wheel to be transmitted to a second wheel. However, modern designs require a complicated manufacturing process whereas Babbage’s could be constructed quite easily. The important point was that a train of such gears had to be amenable to being hand-driven - the idea of driving the engine by steam power wasn't resurrected until the Analytical Engine. Babbage’s design did not fall foul of friction in the gear train and was therefore perfectly adequate. It should be noted that Babbage was particularly concerned with minimising the force required to drive the engine and consequently the gear trains were kept short and, wherever possible, power was transmitted directly from the main drive. When a wheel is put out of gear it is quite possible for it to freely rotate to a position which would yield an incorrect result. Two of the extra four wheels in Babbage’s design were included to ensure that the calculating wheels moved in a stepping motion which prevented them from taking up a position which lay in between two divisions and which also ensured that they could not rotate at all unless some small force was applied to them. In this way Babbage assured the accuracy of his machine by developing a system which is still in common use today. The initial invention of a mechanism was only the first of three stages in Babbage’s design method. The second stage involved analysing the machine and simplifying its design. This simplification took the form of examining each axle in order to determine whether it could be combined with another axle. By eliminating redundant axles the overall design could be considerably simplified. The same simplification process was then applied to the wheels,
levers and so forth. In the case of the calculating unit of Difference Engine No. 0, 24 axles were reduced to 3 and 96 wheels reduced to 18 as a result of the rationalisation process. In the printing unit, 10 dies were found to suffice where previously 120 had been needed. Babbage’s third stage was standardisation in which the various means employed to achieve the same end were standardised throughout the design. This stage required considerable skill in mechanics. Babbage claims to have applied this invention - simplification -standardisation approach to the design of all of his engines. The account which Babbage has left us of the design of Difference Engine No. 0 is much more detailed than the accounts of the later engines. It gives us a unique insight into his method. Wherever possible Babbage developed and adhered to general principles and maxims. His work on the mechanical notation which he developed to describe the action of complex machinery5 is a further example of the sound design methodology which he applied. A methodology which would certainly not seem foreign to modern-day design engineers and which they might well regard as seminal.
3. The First ‘Test’ Instruction It is fundamental to the concept of the modern computer that, amongst the basic functions with which it should be equipped, there should be some form of ‘test’ facility. This is a function which permits certain actions of the machine to be conditional on the current state of the machine - often, more specifically, the state of its memory. In 1822, as a direct result of speculating on a number of variations which could be derived from Difference Engine No. 0, Babbage came upon a variant which would calculate tables, the underlying analytical laws of which were unknown6. Babbage didn't actually make the modification but he verified with pen and paper that the variant engine would be able to produce the series 2, 2, 4, 10, 16, 28, 48, 76, ... for which he knew of no method to obtain an expression for the general nth term. The series is formed by the recurrence relation ∆2un = the unit’s digit of un+1 Following this up with further series Babbage eventually hit on a series based on cube numbers which has great significance for the ‘test’ instruction. The series was created by taking the cube of the natural numbers sequentially but, when the digit 2 appeared in the tens’ place, adding 10 to that and all succeeding cubes. Babbage makes a point of explaining that this somewhat abstract and remote enquiry in mathematics has a practical application to the knight’s move in a game of chess. With hindsight, we can now see that this “remote enquiry” was a forerunner of the all-important ‘test’ facility so necessary for the modern digital computer. For what Babbage had devised was a scheme (albeit hardwired) whereby particular digits could be tested for equality with some predetermined constant and the subsequent calculation take two different forms depending on the success or failure of that test.
It is inconceivable that this discovery did not greatly influence Babbage’s later designs and, in particular, lay the foundations for his Analytical Engine. It is also quite possible that Ada Lovelace’s now renowned statement that the Analytical Engine had “no pretensions to originate anything” was also inspired by a perceived need to explain this phenomenon and its corollaries.
4. A Missing Chapter Difference Engine No. 0 has become a missing chapter in the history of calculating machines in general. As the first chapter in the story of Babbage’s Difference Engines, its omission from so many texts can only be deplored. As the sole calculating engine which Babbage successfully built and demonstrated, its omission verges on the negligent. Perhaps we should not judge the historians too harshly though, for when we read Babbage’s later works and his later descriptions of the early days it becomes clear that Difference Engine No. 0 had been consigned to the vaults of obscurity* in Babbage’s own mind by 1864. Even in the 1822 letter to Davy we can espy the perfectionist’s disquiet when he describes the engine as “suffering ... from great defect in the Workmanship”. Given such a sentiment on Babbage’s part and recalling that the later engines were much greater projects which attracted significant government investment we can begin to see how the achievements embodied in Difference Engine No. 0 must have appeared to pale over the years. The missing chapter has led to some unfortunate misapprehensions concerning both Babbage himself and his engines. Firstly, a perception has arisen of Babbage as the designer of monolithic machines which it was never possible to build - the mad inventor syndrome. This, of course, is quite unfair as Difference Engine No. 0 demonstrated, for it was neither monolithic nor unbuildable. A second consequence relates to the first. Difference Engine No. 0 was the only evidence that Babbage’s ideas for mechanically tabulating functions using the method of differences did actually work. Others, notably the Scheutzes, acknowledged their debt to him but they also added their own ideas and their success could not be taken as a vindication of Babbage’s years of effort without the clear example of Difference Engine No. 0. Many of the ideas which were to be used in the later more famous engines were worked out during the design and manufacture of Difference Engine No. 0. It is a shame that this is not more widely appreciated for, without the demonstration of the very first calculator to members of the Astronomical Society, it is quite possible that the later engines would have received no government support whatsoever. Considering the tremendous difficulties which Babbage experienced in obtaining government funding this is a very significant point. Babbage’s disenchantment with what he saw as penny-pinching short-termism on the government’s part is clearly espoused in a letter to the Duke of Wellington7, the Prime Minister of the day, in 1834.
* The obscurity persists to the point where this author and others, more competent than he, have been unable to trace a single sketch of Difference Engine No. 0. Any information would be much appreciated.
5. A Chronology of Babbage’s Difference Engines It seems fitting that, in the year in which we celebrate the bicentenary of Charles Babbage’s birth, we should also celebrate the birth of his calculating engines by resurrecting the history of his Mini-Computer and locating it in its rightful place, at the very beginning, in the following chronology of Babbage’s Difference Engines: 1791 1820 1822 1823 1833 1834 1842 1847 1871 1871 1910 1991
Babbage’s birth Difference Engine No. 0 designed Difference Engine No. 0 built Difference Engine No. 1 commenced Portion of Difference Engine No. 1 built Analytical Engine commenced Difference Engine No. 1 finally abandoned Difference Engine No. 2 designed Portion of Analytical Engine built Babbage’s death Portion of Analytical Engine built by Babbage’s son Difference Engine No. 2 built by the Science Museum
References 1. Swade, D., “Charles Babbage’s Engines: The Genius of Failure”, The Computer Bulletin, 1991, 3 (5), pp. 12-14. 2. Babbage, C., “On the Application of Machinery to the Purpose of Calculating and Printing Mathematical Tables”, London, 1822. Reprinted in The Works of Charles Babbage: Volume 2, ed. M.Campbell-Kelly. 3. Babbage, C., “The Science of Number Reduced to Mechanism”, 1822. Reprinted in The Works of Charles Babbage: Volume 2, ed. M.Campbell-Kelly. 4. Babbage, C., “Passages from the Life of a Philosopher”, London, 1864. Reprinted in The Works of Charles Babbage: Volume 11, ed. M.Campbell-Kelly. 5. Babbage, C., “On a Method of Expressing by Signs the Action of Machinery”, Phil. Trans. Roy. Soc., 1826, 116, pp. 250-265. Reprinted in The Works of Charles Babbage: Volume 3, ed. M.Campbell-Kelly. 6. Babbage, C., “Observations on the Application of Machinery to the Computation of Mathematical Tables”, Mem. Astr. Soc., 1822, 1, pp. 311-314. Reprinted in The Works of Charles Babbage: Volume 2, ed. M.Campbell-Kelly. 7. Babbage, C., “Statement Addressed to the Duke of Wellington respecting the Calculating Engine”, London, 1834. Reprinted in The Works of Charles Babbage: Volume 3, ed. M.Campbell-Kelly. 8. Campbell-Kelly, M., The Works of Charles Babbage: Volume 2 - The Difference Engine and Table Making, Pickering and Chatto Ltd., London, 1989. 9. Campbell-Kelly, M., The Works of Charles Babbage: Volume 3 - The Analytical Engine and Mechanical Notation, Pickering and Chatto Ltd., London, 1989. 10. Campbell-Kelly, M., The Works of Charles Babbage: Volume 11 - Passages from the Life of a Philosopher, Pickering and Chatto Ltd., London, 1989.