‘My friend Herschel, calling upon me, brought with him the calculations of the (human) computers, and we commenced the tedious process of verification. After a time many discrepancies occurred, and at one point these discordances were so numerous that I exclaimed ‘I wish to God these calculations had been executed by steam’.’ This is how Charles Babbage recalled a meeting in 1821 with John Herschel, the astronomer, and how he came to consider designing an automatic calculating machine.
The driving motive behind Babbage’s early efforts to build automatic calculators was to eliminate errors in mathematical tables. Engineers, astronomers, navigators, scientists, bankers and merchants relied on printed tables both for mundane use and for applications requiring more than three or four figures of accuracy. Babbage was a connoisseur and collector of printed tables and a fastidious analyst of tabular errors, which worried him considerably. A contemporary of his, the scientist Dionysius Lardner, wrote in 1834 that a random selection of 40 volumes of tables contained no fewer than 3700 known errors.
Naturally the cost of unknown errors was impossible to quantify but there were rumours of ships going aground because of errors in navigational tables. Herschel wrote in 1842 that an error in a logarithmic table was ‘like a sunken rock at sea yet undiscovered, upon which it is impossible to say what wrecks may have taken place’.
Advertisement
There were three basic sources of possible error in mathematical tables, all the result of human fallibility: the repetitive calculations required for each new tabular value; copying the results into a form suitable for
presentation to a printer; and setting the results using loose type for printing.
Babbage’s Difference Engines were designed to solve all this at a stroke. The ‘unerring certainty of mechanism’, said Lardner, would eliminate human error from the process of calculation. If the machines produced stereotype moulds from which printing plates could be made then fallible human beings would be eliminated from the loop.
The Difference Engines are so called because of the mathematical principle on which they are based, the method of finite differences. This principle was well-known to the people who prepared tables, without the help of automatic machines.
For a mathematical function, the ‘first differences’ are the arithmetic differences between the values of the function for successive values of its variable. For instance, for the simple function, y = x 4, the first differences are 15 (2 4 – 1 4), 65 (3 4 – 2 4), 175 (4 4 – 3 4), 369 (5 4 – 4 4) and so on. The ‘second differences’ are the differences between the first differences. For y = x 4, they are 50 (65 – 15), 110 (175 – 65), 194 (369 – 175) and so on. At higher orders of differences for an important class of mathematical functions, known as polynomials, and of which y = x 4-1 + . . . + a0, is constant: for y = x 4, the fourth difference is 24 for all values of x.
The advantage of this property of polynomials is that computers, human or otherwise, can work backwards from the constant and generate new values of a function by doing repeated additions. The method of finite differences allows Babbage’s Engines to calculate successive values of a mathematical function using only additions – and addition is much easier to mechanise than multiplication or division. Furthermore, many mathematical relationships in physics and engineering can be reduced to polynomials, and common mathematical functions, such as logarithms and trigonometric functions, can be approximated by them.
Babbage’s concern about errors in tables was not shared by everyone. Nils Selander, a 19th-century Swedish astronomer, argued that reputable tables were accurate enough and that the problem was that the observational data were imprecise. Sir George Biddell Airy, Astronomer Royal from 1835 to 1881, argued that the initial values entered into the machine still needed to be computed by hand and that the Engines only automated a small part of the overall task of tabulation.
Babbage’s Difference Engine No 1, conceived in 1821, was the first complete design for an automatic calculator. The operator did not require any intimate knowledge of the workings of the Engine or its principles, to achieve useful results. The small portion of Difference Engine No 1 completed in 1832, and now a regular exhibit at the Science Museum, was the first device to successfully reduce a mathematical method to handle-cranking.
Babbage’s reputation as a computer pioneer rests less on his work on Difference Engines than on his later Analytical Engine, however. The Difference Engine could process numbers only one way, by adding successive differences. It could not be adjusted, or programmed, to work in any other way. In modern parlance, it was a ‘hard-wired’ calculator dedicated to one specific set of operations. The Analytical Engine, on the other hand, was conceived as a general purpose machine, capable of multiplication, division, subtraction and addition, which an operator could program in any sequence.
It is customary to refer to Babbage’s Analytical Engine as though it was a physical machine. This is a convenience of language. The Analytical Engine is actually a series of designs that were continually refined at intervals from about 1834 until Babbage’s death in 1871, by which time only a simplified version of the mechanical processor, or mill, existed. A full scale Analytical Engine, had one been built, would have been the size of a railway locomotive and would have required a steam engine to power it.
The Analytical Engine has a number of features that are startlingly similar to those of modern electronic computers. The internal architecture of the machine featured a separate store (memory) and centralised mill (central processor) capable of direct multiplication, division, addition and subtraction. The Engine was programmable using punched cards: a string of ‘operation cards’ represented the sequence of instructions; ‘number cards’ contained data the machine might need during the calculation; ‘variable cards’ indicated where results and data were to be held in the store; and ‘combinatorial cards’ dictated the number of times the same sequence of operations should be repeated, a feature now known as looping. While it was operating, the Engine could respond in one of two ways depending on the result of a calculation, a feature known as conditional branching. The control system used a form of micro-programming in which it executed a sequence of elementary instructions to produce a single complex action. Babbage also considered parallel processing using two mills. Output was printed or delivered on punched cards or on a graph plotter.
Babbage’s failure to build any of his Engines is celebrated almost as noisily as the genius of their invention. The reasons for his failure continue to exercise historians. They include Babbage’s allegedly prickly personality, the lack of credible progress after 10 years of development, personal vendettas and a dispute with his engineer. Some historians blame runaway costs, problematic funding, an unfavourable entrepreneurial climate and poor financial and technical management. Others point to the political vacillation, the conflict between pure and applied science, government shortsightedness and the fact that experts disagreed about whether there was any real need for the machines (see ‘The life and times of a computer pioneer’, this issue).
But the position most often cited in histories of computing is that Babbage failed because of limitations in the capabilities of Victorian mechanical engineering to produce the systems of gears, racks, cams and levers used in Babbage’s Engines. Few commentators take the thesis beyond this simple statement.
Narrowly interpreted the ‘limitations of technology’ view can be taken to imply that parts could not be made with sufficient precision. There is little contemporary evidence to support this view, however. Babbage was thoroughly versed in manufacturing techniques. Leading engineers and toolmakers were directly involved or associated with the project. These included Joseph Whitworth, James Nasmyth and Joseph Clement – masters of the art of making machines, who helped England become the ‘workshop of the world’. None warned that Babbage’s Engines could not be realised in practice. The government consulted the Royal Society on three occasions. The society’s reports on feasibility, progress and the likelihood of eventual success were all favourable.
There is other evidence against the rather self-congratulatory notion of modern technocrats that 19th-century technology was too crude to succeed. Difference Engines were built by Georg and Edvard Scheutz, a Swedish father and son team who were inspired by reports of Babbage’s work. The first Scheutz prototype was built far more crudely than Babbage’s machines and was successfully demonstrated in 1843. The Scheutzes made two ‘production’ machines. One was sold in 1857 to the Dudley Observatory in Albany, New York, the other to the General Register Office in London where it was used to prepare the English Life Table of life expectancies and life assurance data published in 1864. In use, these machines needed constant attention but they were still technically viable devices. Finally, measurements taken from surviving
contemporary parts of Babbage’s machines indicate that the precision and repeatability required for a working machine was achievable.
The closest Babbage got to building one of his machines was when work stopped on the construction of Difference Engine No 1, which he started in the early 1820s. The project was abandoned in 1833 after a dispute with Joseph Clement, Babbage’s engineer, over compensation for moving the work to a new fireproof workshop next to Babbage’s house. The complete Engine would have weighed several tons and measured 8 feet high, 7 feet long and 3 feet deep. A design drawing from 1830 shows that the machine was intended to calculate tables of seventh order polynomials to 16 figures of accuracy, using seven orders of difference.
At the time Clement downed tools about 12 000 of the estimated 25 000 parts had been made. The circumstances surrounding the collapse of the project are complex but technological limitations were apparently not directly responsible.
In an attempt to resolve, or at least illuminate, these issues the Science Museum has built Babbage’s Difference Engine No 2. Computer and electronic companies have financed the construction of the machine, which cost £295 000, and provided around £200 000 to stage the Babbage exhibition.
The project was proposed in 1985 by Allan Bromley, a computer scientist at the University of Sydney, who had studied Babbage’s designs while a visiting research fellow at the museum. Bromley was convinced the Engine could be built and suggested the bicentenary of Babbage’s birth as a deadline. The museum completed a trial piece in 1989 and plans for the entire machine were ready in June 1990 when contracts were issued for the manufacture of parts. Assembly of the Engine on the museum’s ground floor began five months later. (Though the Analytical Engine may have been a finer tribute to Babbage’s genius, it would have taken much longer and been more expensive to complete.)
Babbage designed the Difference Engine No 2 between 1847 and 1849. This later model was designed to tabulate seventh order polynomials to 30 figures of accuracy. Like the earlier machine, it was operated by hand. Babbage offered the plans of the Engine to the government in 1852 but nothing came of this and no attempt was made to build the machine until now.
Difference Engine No 2 consists of 4000 parts, weighs about 3 tonnes and measures 11 feet long, 7 feet high and 18 inches deep. Babbage designed a printer to go with it, but the museum did not try to raise the extra
£200 000 needed to make and assemble the several thousand components of the printing mechanism. The museum will seek the funds when it has shown that the calculating machine works.
The Engine was built to original designs using materials closely matching those available to Babbage – cast iron, steel and bronze (gunmetal). Babbage’s 20 design drawings and several tracings for Difference Engine No 2 survive intact. These drawings fully describe the Engine but do not specify dimensions, choice of materials, methods of manufacture, tolerances or finish. This information was supplied by scaling the drawings, from knowledge of 19th-century practice, from analysing surviving parts made by Babbage and from measuring the parts built for the Difference Engine No 1.
The museum produced a new set of detailed drawings that specify each of the 4000 components. Babbage used one supplier, Joseph Clement, in his attempts to build Difference Engine No 1; the Science Museum has used 46 separate contractors.
Modern manufacturing techniques were used unashamedly. We have welded where Babbage would have forged, and we used numerically and computer controlled machines to manufacture similar parts. To safeguard the authenticity of the work, we took care to manufacture components no more precisely than we know Babbage could have.
In several respects the set of original drawings drafted for Babbage do not represent an internally consistent description of the Engine; this may have been an attempt to protect the design from industrial espionage.
There are errors of size, complete assemblies were wrongly drawn as mirror images and, in one case, a 30-digit mechanism is redundant because its computations are isolated from the rest of the calculating section. In each case solutions had to be found that were consistent with Babbage’s thinking.
Difference Engine No 2, like Babbage’s other Engines, uses a decimal number system, rather than the binary one of modern computers, and it is digital, like most modern computers, rather than analogue. The value of each digit in a number is represented by the angular rotation of a toothed wheel engraved with decimal numerals. Multidigit numbers are represented by columns or stacks of such figure wheels, one for each digit. Unlike binary electronic logic, a figure wheel can take up a position between two integral values of a digit. However, the Engine’s control mechanism ensures that these intermediate positions are always transitional; the wheels never rest at them. It also ensures that at fixed points in the machine-cycle a wedge is driven between the teeth of the figure wheels to correct any deviation from fixed integral values. The wedge also locks the wheel when it is not in use. Babbage used to boast that it was impossible to corrupt his machines while in operation and that his Engines will either produce the correct result, or jam, but never deceive.
The six-year saga of the Engine’s construction is one worthy of Babbage himself – a bankruptcy, funding crises, mishaps and the politics of any major engineering project. Though the Engine can be assembled in a week, getting it to work is taking longer. Commissioning the Engine has been under way for several months. Until the machine functions correctly there must remain some doubt as to whether it can. However, with the project so far advanced and no insurmountable problems in evidence, confidence in the original designs remains intact. Even in its partially working form the machine is already an object of deep historical interest, a sumptuous piece of engineering sculpture and a lasting monument to its inventor.
Doron Swade is Senior Curator (computing and control) at the National Museum of Science and Industry (Science Museum) in London. He is head of the Babbage Engine project.