The Nearly Man
Table of Contents
The Nearly Man
by Nigel Holder
from the January 1983 issue of Personal Computer World
Charles Babbage is remembered as the man who nearly invented the digital computer. Working in a pre-electronic age he nevertheless discovered principles which were not put into practice until Von Neumamin in the 1940’s. His mechanical computer was defeated by the lack of precise enough manufacturing techniques. Nigel Holder tells the story.
This is an account of the work of the pioneer of automatic calculating machines, Charles Babbage. His Difference Engine and Analytical Engine will be discussed. The emphasis is mainly historical, and as such there will be no detailed descriptions of how the machines work. A general over view of the calculating machines is given, as well as a description of the problems that Babbage faced.
With the advances in technology towards the end of the eighteenth century, mathemati cal tables assumed an increasing importance as an aid to calculation. These tables were more often than not riddled with errors, introduced either during the original com putation or at the typesetting stage.
The Difference Engine
The method used to calculate the tables was the ‘method of differences’. This had the advantage of using addition only in calculating the next value of a function, even if the function was very complex. This simplified the task of the computers (the name given at the time to the human evaluators), and reduced the risk of error since addition is easier to perform than multiplication. Another great asset of this method is that each result obtained relies on the previous result. Therefore, if the hun dredth result is correct then it is almost cer tain that all of the previous results are also correct.
The method of differences work as follows (see PCW Dec pg 134): If a function such as F(x) = 3x + 7 is evaluated for successive values of x, the difference between adjacent values of F(x) is found to be constant.
D2 , the second difference, is constant in case of F(x) = x2. In general, for a polynomial of degree n (xn ), the nth difference will be constant. Although all polynomials have a constant difference, functions of much greater interest, such as logarithms and trigonometric functions, do not in general have a constant difference.
In order to produce tables for these functions by using the method of differences, it is necessary to divide the function into sections which may be approximated by suitable polynomials.
In 1820 Charles Babbage, aware of the problems inherent in producing tables (he had already produced a few of his own), decided to design and construct a machine which would compute and typeset mathe matical tables — a Difference Engine. By 1822, after devoting a great deal of his time towards the project, he had a working model which was capable of working with 6-digit numbers to a constant second difference. This machine was a prototype, built to show what could be achieved. In order to finance a project to construct a full scale Difference Engine, Babbage petitioned the government of the day for aid. The government asked the Royal Society to prepare a report on the project’s viability; they replied that, in their opinion, Babbage’s work should be aided where possible.
The government agreed to advance £1500 towards the project; Babbage agreed to provide between £3000 and £5000. This would, in Babbage’s opinion, provide sufficient resources to construct the Difference Engine (presumably based on his experience with the prototype), in two to three years, at which time he hoped that the government would reimburse his financial outlay.
But Babbage discovered that a full scale Difference Engine was a great deal more complicated to construct than a prototype. The machine was larger and more complex, and thus required finer tolerances of com ponents. He also found that the state of engineering at the time was not sufficiently developed to construct his Difference Engine. Babbage therefore decided to devote the first few years of the project to advancing the art of mechanical construction. This involved designing a part and then designing a tool for making the part. During this process, an alternative and often simpler method would sometimes appear — the whole process of design and construction would then be repeated. Although this was a costly and time con suming process, Babbage’s work advanced the state of engineering in Britain by many years.
Due to the project taking longer and cost ing a great deal more than originally anticipated, Babbage frequently found himself asking the government for more money; he had the Royal Society audit his accounts to prove that the money was being spent on the project. Unfortunately, the audit and the government’s deliberations on the future of the project meant a delay each time (up to four years in some cases) before Babbage received any money. During this time, work on the project all but stopped; most of the engineers working for Babbage were disbanded (however, this helped to spread Babbage’s engineering advances throughout Britain) — each time the money was received Babbage had to hire and train new engineers before work could com mence on the project.
It was during one of these enforced breaks in production, in 1833, that Babbage had a disagreement with his chief mechanic (Joseph Clement, who had always stayed with Babbage — even during the breaks in construction). This was never settled and, under British law, mechanics possess the right of property of all tools that they have constructed, even if construction was paid for by their employers. This right was exercised, and the plans to the Difference Engine were also taken, although they were later returned. This would have considerably delayed the project if it had continued, since all of the tools would have had to have been constructed again; this, however, was not the case.
During this time Babbage, while attempt ing another modification to the design, con ceived the idea of the Analytical Engine. This would need a much more sophis ticated arithmetic mechanism than that currently employed in the Difference Engine — he therefore set about designing one. After over 20 different designs, he produced one which he considered could not be improved. He decided that this new improved design should be incorporated in his Difference Engine, and informed the government that, in his opinion, it would be quicker and cheaper to incorporate his new design into the Difference Engine than to complete the old one. The government was dismayed at the thought of yet another redesign after nine years of delay (and a change of government) and in 1842 in formed Babbage that they would not con tinue financing the project. The government offered to let Babbage keep everything, but Babbage, remembering the original terms of the agreement, said that the machine’s future was in the government’s hands — the Difference Engine now resides at the Science Museum in London.
In all, Babbage had spent £17,000 of government money, and it is estimated that he spent a further £20,000 of his own per sonal fortune. The Difference Engine that Babbage had constructed at the collapse of the project was a working model which had a constant third difference, and handled 6-digit numbers.
Had it been fully completed, the Difference Engine would have been approx imately 10 feet high, 10 feet wide and five feet deep. It was to have worked to a constant sixth difference, handling integer num bers to a precision of eighteen digits. Babbage had realised that truncation could lead to errors when accumulating results; he therefore devised a rounding mechanism to round off the eighteenth digit correctly.
Once the initial values had been loaded (set up) into the machine, the machine would have operated as follows:
A cycle would consist of two steps — Step 1: Add ODD differences to EVEN differences
Step 2: Add EVEN differences to ODD differences
The result of the next value is now obtained. For successive results, repeat steps 1 and 2. Each step consists of two parts since after addition any carries generated had to be added, allowing them to ‘ripple through’. Each step consisted of turning the operating lever half a turn back ward (producing the addition), followed by half a turn forward (addition of any carries generated). The words ‘Calculation Complete’ would be displayed at the end of each cycle.
The Analytical Engine
In 1833, Charles Babbage began work on what turned out to be the most ambitious project of his life’s work: the Analytical Engine. This machine was strikingly similar in concept to computers of today, although it was never completed. During the many years devoted to the project, many excellent engineering drawings were made of parts of the Analytical Engine; work had in fact started on constructing the machine before Babbage’s death in 1871 — at his own expense since there were no means of raising financial aid after the collapse of his Difference Engine project.
The Analytical Engine would have been the first general purpose automatic calculating machine. It was to be capable of doing virtually any mathematical opera tion. It would follow the instructions programmed into it by its operators, and even go on to make decisions about which instructions to follow next, based on the results of its own computations. Both the instructions and data were to be entered separately on punched cards designed by Babbage. The cards themselves were strung together with narrow ribbons — this enabled the cards to read sequentially in either direction. Following the instructions, a process ing unit called the ‘mill’ by Babbage performed operations on the data and returned the results to the ‘store’. The final results were to be printed out or automatically set in type.
The Analytical Engine was conceived to be on a massive scale. It was to be powered by steam and was capable of storing up to a thousand 40-digit numbers; it would have been about the same size and weight as a small railway locomotive. Whenever it required additional values for a calculation it was working on it could signal to its operators that it needed additional values by ringing a bell.
The Analytical Engine was a decimal machine which used sign and magnitude representation for the numbers. A decimal number base was used since, unlike electrical circuits, in a mechanical device it is just as easy to represent ten states as it is two states; the decimal system is man’s ‘natural’ number system. A sign and magnitude representation was chosen since it simplifies input/output and the examination of inter nal states of the machine. It also simplifies multiplication and division. Throughout the machine numbers are represented by the positions of wheels (each holding a digit), rotating about a vertical axis.
As previously mentioned, the basic theory of design of the Analytical Engine is remarkedly similar to that of modem com puters. To show this, Figure 2 shows, in a diagrammatic form, the main architectual features of the Analytical Engine with mod em names in brackets. Figure 1 shows Babbage’s General Plan 25, which is the general configuration of the Analytical Engine. In contrast to his Difference Engine, Babbage has distinctly separated the Store from the Arithmetic Unit.
The basic four arithmetic operations are provided — addition, subtraction, mul tiplication and division. Two variations on the above are also provided — multiplication and division with limited precision. These operations are provided for when the full 40 digits of accuracy are not required or when the speed of computation is impor tant. Since the operations are mechanical, a multiplication/division would take about four minutes.
A major innovation was the use of a barrel for control of complex operations such as multiplication and division. The barrel would have studs around the outside, against which levers would rest (with as many as 70 ‘rings’ to a barrel, each ring containing up to 80 studs). As the barrel revolved, whenever a stud touched a lever the lever would move. By use of many levers, the operation would take place synchronously for one revolution of the barrel. Today, exactly the same concept is used in computers, known as micro code (or micro programming). Another great innovation was the advent of a ‘look ahead carry’ mechanism. Since there were 40 digits to a number, the process of allowing the carry to ‘ripple through’ would take a great deal lon
ger than the addition itself required. Bab bage realised this and developed the technique of ‘look ahead carry’ (which he called ‘anticipatory carry’), allowing an addition to take place in one operation as the carry would be pre-determined. This technique proved the most difficult for Babbage, and he spent a great deal of time per fecting this technique.
Babbage spent most of his time on the project in designing and redesigning parts of the Analytical Engine. He appeared to find great satisfaction with the intellectual stimulus of theoretical design (perhaps it was because he realised that the machine would probably never be built — at least in his lifetime, anyway).
The reading of numbers from the store had a destructive effect in that, once read, the value was no longer held in the store (compare with the destructive read of ‘core store’ memory on early electronic computers) — if the number was required for further calculation, it had to be written back into the store.
As far as programming the Analytical Engine was concerned, Babbage did not have a very clear idea of how this would be achieved; it was as if this was a secondary consideration — he was concerned mainly with the mechanical working of the machine. The store could be accessed only by specifying the location in the instruction itself; there was no true variable address concept that would allow the store to be accessed as an array or vector. This is not really a criticism of Babbage himself, since the early electronic computers also lacked this ability until John von Neumann proposed it in 1945. The Analytical Engine possessed what is known today as the ‘three address system’, in which two addresses specify the operands to be used, and the third specifies where the result is to be placed.
It is perhaps a shame that Charles Babbage had so many great ideas, but was never able to realise them fully. If he had successfully completed the Difference Engine, he would have probably been granted financial aid for the Analytical Engine — it is just possible that, given enough time, the engineering technology of the day would have permitted the Analytical Engine to have been constructed. It is ironic that Babbage himself was the prime cause of his failures; he was always updating and modifying his designs — if he had kept to a single design throughout he would have probably completed the Difference Engine. His work was not in vain, though, for it stimulated others into designing and constructing their own Difference Engines, as well as advancing the state of engineering in Britain by many years.
It is not known exactly to what extent Babbage’s work affected the design of early electronic computers, although it is thought to be only superficial — in which case it is remarkable that Babbage’s concepts are so similar to those of modem computers. It is almost certain that computers would have evolved earlier if the Analytical Engine had been built. It is a shame that Babbage is mostly remembered for his failures; he was a brilliant mathematician and design engineer, years ahead of his time.
For anyone interested in early mechanical and electronic computing, an excellent book to start with is The Origins of Digital Computers, edited by Brian Randell and published by Springer-Verlag. The price is £18.45, and the ISBN is 0-387-11319-3. This book contains selected papers, and for the really keen person, the bibliography contains over 850 items.