Google
 
Showing posts with label The Babbage Engine. Show all posts
Showing posts with label The Babbage Engine. Show all posts

Tuesday, July 8, 2008

A Modern Sequel


Nagging Questions

In 1985 the Science Museum in London set out to construct a working Difference Engine No. 2 built faithfully to Babbage's original designs dating from 1847-9. The project was led by the then Curator of Computing, Doron Swade. The purpose of the project was both to memorialize Babbage's work in time for 200th anniversary, in 1991, of Babbage's birth, and at the same time to resolve two nagging questions: could Babbage have built his engine, and had he done so, would it have worked?

Authenticity

Babbage left twenty large design drawings which depict the Engine's mechanisms. Detailed as they are, they are insufficiently detailed to serve as manufacturing drawings. Tolerances, methods of manufacture, choice of materials and finish are not specified. New drawings were made specifying each of the 8,000 parts with sufficient detail for manufacture. Modern manufacturing methods were used but uncompromising care was taken to ensure that the precision achievable by Babbage was nowhere exceeded. Composition analysis on materials used by Babbage was carried out to ensure the best materials match.

Final Vindication

The project took seventeen years to complete. The calculating section was finished in 1991 in time for the bicentenary of Babbage's birth, and the printing and stereotyping apparatus was completed in 2002. The project had a drama worthy of Babbage - funding crises, manufacturing challenges, impossible deadlines, and technical puzzles.

The completed machine works as Babbage intended. Its 8,000 parts are equally split between the calculating section and the output apparatus. It weighs five tons and measures seven feet high, eleven feet long and is eighteen inches deep at its narrowest. As a static object it is a sight to behold - a sumptuous piece of engineering sculpture. In operation it is an arresting spectacle.

The project confirms Babbage's standing as a designer of formidable ingenuity. It also demonstrates that achievable precision was not a limiting consideration in Babbage's failures. It appears that the 19th century outcome had as much to do with politics, economics, and personalities, as with technology. We can say with some confidence that had Babbage built his engine, it would have worked.

The complete working Babbage engine is on public display at the Science Museum in London. A duplicate engine and printer, a 'second original', was recently completed for a private benefactor of the project, Nathan Myhrvold, formerly chief technology officer and Group VP at Microsoft. Myhrvold has generously agreed to delay delivery of the Engine to him and lend it to the Computer History Museum, Mountain View, California, where it will be displayed and demonstrated until May 2009.



Source:http://www.computerhistory.org/

How it Works

Principle of the Difference Engines

Difference engines are so called because of the mathematical principle on which they are based, namely, the method of finite differences. In general, calculating the value of a polynomial can require any or all of addition, subtraction, multiplication and division.

An advantage of the method of finite differences is that it eliminates the need for multiplication and division, and allows the values of a polynomial to be calculated using simple addition only. Adding two numbers using gearwheels is easier to implement than multiplication or division and so the method simplifies an otherwise complex mechanism.

If the first few values of a polynomial are known, the rest may be calculated using simple repeated addition. The method is illustrated in the diagram above for the function F(x) = x2 + 4. The values of x are shown in the first column incrementing by 1 each time (x = 1, 2, 3, 4 . . .). The values of the function x2 + 4 are shown in the second column with the first four values calculated by mental arithmetic or by hand (5, 8, 13, 20).

The next step is to calculate the first and second differences. The first differences are shown in the third column and are calculated by subtracting successive values from the previous column as shown by the solid arrows flowing from left to right (8-5=3, 13-8=5 etc.). The second differences are calculated by subtracting first difference pairs and these are shown in the last column.

With these initial values calculated the rest of the values of the function can calculated by reversing the process. The values we wish to calculate are shown below the upper dotted line. For this polynomial, the second difference is a constant (2). To calculate the value of the function for x=5 the constant difference (2) is added to the first difference (7) to obtain the next first difference (9) (red arrow), which can then be added to the last function value (blue arrow) to yield F(5) = 29. This is the desired result, achieved without performing multiplication.

The process can then be repeated to yield the next first difference (11) which may be added to the last function value to get F(6) = 40, etc. Using this method, any second-degree polynomial can be computed this way and, more generally any nth degree polynomial can be computed, using only addition, starting with the nth difference.

Babbage's Difference Engine No. 2 has 'registers' to hold one number from each of the columns in the table (for example 20, 7, 2). It would add the second difference to the first, then add that result to the function value to compute the next entry in the table. There were enough 'registers' for seven differences, allowing it to compute 31-digit values for polynomials with terms up to x7.

The Engines

The Engines

Charles Babbage (1791-1871), computer pioneer, designed two classes of engine, Difference Engines, and Analytical Engines. Difference engines are so called because of the mathematical principle on which they are based, namely, the method of finite differences. The beauty of the method is that it uses only arithmetical addition and removes the need for multiplication and division which are more difficult to implement mechanically.

Difference engines are strictly calculators. They crunch numbers the only way they know how - by repeated addition according to the method of finite differences. They cannot be used for general arithmetical calculation. The Analytical Engine is much more than a calculator and marks the progression from the mechanized arithmetic of calculation to fully-fledged general-purpose computation. There were at least three designs at different stages of the evolution of his ideas. So it is strictly correct to refer to the Analytical Engines in the plural.

Binary, Decimal and Error Detection

Babbage's calculating engines are decimal digital machines. They are decimal in that they use the familiar ten numbers '0' to '9' and they are digital in the sense that only whole numbers are recognized as valid. Number values are represented by gear wheels and each digit of a number has its own wheel. If a wheel comes to rest in a position intermediate between whole number values, the value is regarded as indeterminate and the engine is designed to jam to indicate that the integrity of the calculation has been compromised. Jamming is a form of error-detection.

Babbage considered using number systems other than decimal including binary as well as number bases 3, 4, 5, 12, 16 and 100. He settled for decimal out of engineering efficiency - to reduce the number of moving parts - as well as for their everyday familiarity.

Difference Engine No. 1

Babbage began in 1821 with Difference Engine No. 1, designed to calculate and tabulate polynomial functions. The design describes a machine to calculate a series of values and print results automatically in a table. Integral to the concept of the design is a printing apparatus mechanically coupled to the calculating section and integral to it. Difference Engine No. 1 is the first complete design for an automatic calculating engine.

From time to time Babbage changed the capacity of the Engine. The 1830 design shows a machine calculating with sixteen digits and six orders of difference. The Engine called for some 25,000 parts shared equally between the calculating section and the printer. Had it been built it would have weighed an estimated fifteen tons and stood about eight feet high. Work was halted on the construction of the Engine in 1832 following a dispute with the engineer, Joseph Clement. Government funding was finally axed in 1842.

The Analytical Engine

With the construction project stalled, and freed from the nuts and bolts of detailed construction, Babbage conceived, in 1834, a more ambitious machine, later called Analytical Engine, a general-purpose programmable computing engine.

The Analytical Engine has many essential features found in the modern digital computer. It was programmable using punched cards, an idea borrowed from the Jacquard loom used for weaving complex patterns in textiles. The Engine had a 'Store' where numbers and intermediate results could be held, and a separate 'Mill' where the arithmetic processing was performed. It had an internal repertoire of the four arithmetical functions and could perform direct multiplication and division. It was also capable of functions for which we have modern names: conditional branching, looping (iteration), microprogramming, parallel processing, iteration, latching, polling, and pulse-shaping, amongst others, though Babbage nowhere used these terms. It had a variety of outputs including hardcopy printout, punched cards, graph plotting and the automatic production of stereotypes - trays of soft material into which results were impressed that could be used as molds for making printing plates.

The logical structure of the Analytical Engine was essentially the same as that which has dominated computer design in the electronic era - the separation of the memory (the 'Store') from the central processor (the 'Mill'), serial operation using a 'fetch-execute cycle', and facilities for inputting and outputting data and instructions. Calling Babbage 'the first computer pioneer' is not a casual tribute.

A New Difference Engine

With the groundbreaking work on the Analytical Engine largely complete by 1840, Babbage began to consider a new difference engine. Between 1847 and 1849 he completed the design of Difference Engine No. 2, an improved version of the original. This Engine calculates with numbers thirty-one digits long and can tabulate any polynomial up to the seventh order. The design was elegantly simple and required three times fewer parts than No. 1 for similar computing power.

Difference Engine No. 2 and the Analytical Engine share the same design for the printer - an output device with remarkable features. It not only produces hardcopy inked printout on paper as a checking copy, but also automatically stereotypes results, that is, impresses the results on soft material, Plaster of Paris for example, which could be used as a mold from which a printing plate could be made. The apparatus typesets results automatically and allows programmable formatting i.e. allows the operator to preset the layout of results on the page. User-alterable features include variable line height, variable numbers of columns, variable column margins, automatic line wrapping or column wrapping, and leaving blank lines every several lines for ease of reading.

Physical Legacy

Aside from a few partially complete mechanical assemblies and test models of small working sections, none of Babbage's designs was physically realized in its entirety in his lifetime. The major assembly he did complete was one-seventh of Difference Engine No. 1, a demonstration piece consisting of about 2,000 parts assembled in 1832. This works impeccably to this day and is the first successful automatic calculating device to embody mathematical rule in mechanism. A small experimental piece of the Analytical Engine was under construction at the time of Babbage's death in 1871. Many of the small experimental assemblies survived, as does a comprehensive archive of his drawings and notebooks.

The designs for Babbage's vast mechanical computing engines rank as one of the startling intellectual achievements of the 19th century. It is only in recent decades that his work has been studied in detail and that the extent of what he accomplished becomes increasingly evident.

A Brief History


The Age of Machinery

The middle decades of the 19th century were times of unprecedented engineering ambition. Engineering, transport, communications, architecture, science and manufacture were in a state of feverish change. Inventors and engineers exploited new materials and processes and there seemed no end to invention and innovation. Steam engines slowly replaced animals as a source of motive power. Iron ships began to compete with sail, railway networks rapidly expanded, and the electric telegraph began to revolutionize communications. Science, engineering, and flourishing new technologies held limitless promise.

Engineers, architects, mathematicians, astronomers, bankers, actuaries, journeymen, insurance brokers, statisticians, navigators - anyone with a need for calculation - relied on printed numerical tables for anything more than trivial calculations. Printed tables were calculated, copied, checked and typeset by hand. Humans are notoriously fallible and some feared that undetected errors were disasters in waiting.

Infallible Machines

In the 1821 vignette of Babbage and his friend, the astronomer, John Herschel, checking manually calculated tables, Babbage, finding error after error, was driven to exclaim 'I wish to God these calculations had been executed by steam'. The grindingly tedious labor of manually checking tables was one thing. Worse was their unreliability. Babbage embarked on an ambitious venture to design and build mechanical calculating engines - vast machines of unprecedented size and intricacy - to eliminate the risk of human error. The infallibility of machinery would eliminate the risk of error from calculation and transcription (copying the results). Automatic typesetting would banish the risk of error when manually setting results in loose type. Stereotyping - a process that automatically impressed results on soft material for the manufacture of printing plates - would eliminate errors in repeated printing. Special security devices would ensure the integrity of the results. The outcome would be flawless. This was the intention, but one that he failed to realize.

Difference Engine No. 1 - A Fateful Start

His first machine, Difference Engine No. 1, was designed to automatically calculate and tabulate mathematical functions called polynomials which have powerful general applications in mathematics and engineering. Babbage worked closely with Joseph Clement, a master toolmaker and draftsman who was tasked with making the parts. Difference Engine No. 1 called for 25,000 parts and would have weighed an estimated fifteen tons.

Construction was abruptly halted in 1833 when Clement downed tools and fired his workmen following a dispute with Babbage over compensation for moving Clement's workshop closer to Babbage's house. The Engine was never built. Some 12,000 unused precision parts were later melted down for scrap. For the British Government that had bankrolled the venture, the project was a costly failure. When the final bills were paid the Treasury had spent £17,500 - the cost of twenty-two brand new steam locomotives from Robert Stephenson's factory in 1831 - a formidable sum.

The Finished Portion of the Unfinished Engine

A small demonstration assembly was built and delivered to Babbage by Clement in 1832. This 'beautiful fragment', one seventh of the calculating section, was all Babbage had to show after a decade of investment. Babbage used the piece to develop his ideas on computation and also for dramatic demonstrations to savants, guests, dignitaries, scientists, and friends. The device proved the soundness of the design and supported the feasibility of a full machine. It was the first successful automatic calculator and one of the finest examples of precision engineering of the time. It remains amongst the most celebrated icons in the prehistory of automatic computation.

The Analytical Engine

In 1834, with the Difference Engine project stalled, Babbage conceived of a new more ambitious machine, later called the Analytical Engine - a general-purpose programmable computing machine. The Analytical Engine was a quantum leap in logical conception and physical size, and its design ranks as one of the startling intellectual achievements of the century.

The Analytical Engine features many essential principles found in the modern digital computer and its conception marks the transition from mechanized arithmetic to fully-fledged general purpose computation. Had the Engine been built, it would have dwarfed even the vast Difference Engine and cranking it by hand would have been beyond the strongest operator. 'Calculating by steam' would have been more than a figure of speech. It is on the Analytical Engine that Babbage's standing as 'the first computer pioneer' largely rests.

Ada Lovelace

In 1833 Babbage met Ada Lovelace, daughter of the notorious British poet Lord Byron, at a party. Lovelace, just seventeen, had some mathematical training which was unusual for a woman at that time. She was entranced by the small working section of the machine and in time became an enthusiastic supporter of Babbage's work.

In 1843 Lovelace published an article by the Italian engineer Luigi Menabrea that she translated from French. In it she appended extensive notes of her own that ran to three times the length of the host article. The Notes included a description of the steps the engine would take in solving certain mathematical problems - procedures we would now call programs - the first published descriptions of the kind.

Lovelace speculated that the machine might go beyond numbers and more generally manipulate symbols in accordance with rules. She saw that numbers could represent entities other than quantity - letters of the alphabet, notes of music - and that by manipulating numbers, computing machines could extend their powers beyond the world of mathematics. In the light of developments in the 20th century, this notion is prophetic and one that Babbage appears not to have envisioned with any clarity.

The Second Difference Engine

As Babbage refined the mechanisms of the Analytical Engine he saw how he could simplify the design of the Difference Engine. Between 1847 and 1849 he designed a new engine, Difference Engine No. 2. The new design benefited from many of the techniques developed for the more demanding Analytical Engine.

The new design was elegant and efficient requiring three times fewer parts than Difference Engine No. 1 for similar computing power. With 8,000 parts, the Engine would weigh five tons and measure eleven feet long and seven feet high. Babbage made no attempt to construct the machine. It is this design that was finally built and completed in 2002, and is the first of Babbage's engine designs to be realized in its entirety.

Two Inspired Swedes

Others attempted to build difference engines in Babbage's time, all with dismal outcomes. Inspired by an account of Babbage's first engine, published in 1834, a Swedish father-and-son team, Georg and Edvard Scheutz, built a working prototype, completed in 1843. Two fully engineered versions in metal followed, the first in 1853 in Stockholm, the second in 1859 in London for the General Register Office.

Neither was much of a success. The hoped-for economies of automatic tabulation by machinery did not materialize. Worse still, the machine, made in London, lacked Babbage's security devices, tended to derangement, and required constant care. Both father and son died bankrupt. Building difference engines contributed to their ruin. The three engines now reside in museums, handsome testaments to dashed hopes and financial disaster.

Why Babbage Failed

Babbage failed to build a complete machine despite independent wealth, social position, government funding, a decade of design and development, and the best of British engineering. The reasons are still debated and the cocktail of considerations is a rich one. Babbage was a prickly character, highly principled, easily offended and given to virulent public criticism of those he took to be his enemies. Runaway costs, high precision, a disastrous dispute with his engineer, fitful financing, political instability, accusations of personal vendettas, delays, failing credibility and the cultural divide between pure and applied science, were all factors.

Babbage was also a rotten publicist. He disdained to lecture on his work and neither proclaimed nor promoted the mathematical potential of his engines. As a result the engines were judged largely on their practical utility to produce error-free tables, and experts of the day did not agree that there was any real need for new tables. Some argued that existing tables were already sufficiently accurate and that there was no economic justification for the large capital costs of building his huge machines. Others questioned whether the twenty, thirty and fifty figures of accuracy insisted upon by Babbage were justified when measurements could be made to no more than a few decimal places.

False Dawn

The 19th century movement to automate computation failed and the movement largely died with Babbage in 1871. There is no continuous line of development from Babbage to present times, and many of the principles embodied in his work were reinvented by the pioneers of the electronics era, largely in ignorance of his work. Though the legend of his work was never lost it was only in the 1970s that his designs were studied in any detail and the scale of his accomplishments emerged more clearly.

Overview

An Appeal to Steam

London, Summer 1821. Charles Babbage (1791-1871), inventor and mathematician, is poring over a set of astronomical tables calculated by hand. Finding error after error he finally exclaims 'I wish to God these calculations had been executed by steam'. His appeal to machinery, in one of the most resonant utterances of the 19th century, was the start of a new era of automatic computation.

The Tables 'Crisis'

It was not only the grindingly tedious labor of verifying a sea of figures that exasperated Babbage, but their daunting unreliability. Engineering, astronomy, construction, finance, banking and insurance depended on printed tables for calculation. Ships navigating by the stars relied on printed tables to find their position at sea. The stakes were high. Capital and life were thought to be at risk.

Infallible Machines

Babbage embarked on an ambitious venture to design and build mechanical calculating engines to eliminate the risk of human error in the production of printed tables. The 'unerring certainty of machinery' would solve the problem of human fallibility. His work on the engines led him from mechanized arithmetic to the entirely new realm of automatic computation. Tabular errors provided a practical stimulus. But this was not his only motive. He also saw his engines as a new technology of mathematics.

Final Vindication

Babbage himself failed to build a complete calculating engine and his designs remained an historical curiosity for over 150 years. Finally, in 2002, the first full-size Babbage Engine (Difference Engine No. 2), built faithfully to the original designs, was completed at the Science Museum in London, the culmination of a seventeen year project. The Engine consists of 8,000 parts, weighs 5 tons and measures eleven feet long and seven feet high. It works as Babbage intended, and brings to a close an anguished chapter in the prehistory of computing.

A duplicate engine is on display and demonstrated at the Computer History Museum in Mountain View, California. It is a sumptuous piece of engineering sculpture and an arresting sight in operation.

Welcome

Charles Babbage (1791-1871), computer pioneer, designed the first automatic computing engines. He invented computers but failed to build them. The first complete Babbage Engine was completed in London in 2002, 153 years after it was designed. Difference Engine No. 2, built faithfully to the original drawings, consists of 8,000 parts, weighs five tons, and measures 11 feet long.

We invite you to learn more about this extraordinary object, its designer Charles Babbage and the team of people who undertook to build it. Discover the wonder of a future already passed. A sight no Victorian ever saw.

An identical Engine completed in March 2008 is on display at the Computer History Museum in Mountain View, California until May 2009