Charles Babbage’s Analytical Engine

Between 1834 and 1836, Charles Babbage, an English Mathematician began work his Analytical Engine. It was proposed to be a mechanical general purpose computer, one which, at least on paper shares many of the features of what we now think of as a being necessary to fit the description of a modern computer system. Had it been built it would have been capable of basic arithmetic addition, subtraction, multiplication and division, it would have also had a basic set of instructions allowing a user to create programs using punch cards. Its physical layout of a “store” (memory) and a “mill” (processing unit) would have mirrored what we would now know to be a Von Neumann based architecture. Babbage’s vision of the Analytical Engine was such that it would have been able to evaluate arbitrary formulas in a similar way to a modern computer with absolute integrity of the results. (Wilkes, 1991).

Work on the Analytical Engine began during the summer of 1834 after the 10 year Difference Engine No.1 Project had finished. Initial work proceeded at pace with a workable plan devised in the middle of 1836. During this time that Babbage was able to devise the first automated direct multiplication and division, at which point Babbage had devised a four function calculator, capable of all of the basic arithmetic operations (addition, subtraction, multiplication and division). (Swade, 2000), the idea of separate areas of the Engine for arithmetical operations and the “mill” and an area for storage of numbers, the “store” (terms borrowed from the textile industry) (Swade, 2000). Babbage also suggested the use of punch cards as a way to control the Analytical Engine, a technology borrowed from the Jacquard Loom (Essinger, 2004).

Multiplication and division operation were controlled by “barrels”, the surface of which contained fixed studs, similar to what can be seen on a children’s music box. Unfortunately the process of multiplication and division was time consuming, due in part for the need of repeated operations. To accommodate the execution time need for multiplication and division, Babbage set to work reducing the amount of time needed for addition. The difficulty with addition lay in the ability to carry tens. Babbage’s felt that his previous method of Successive Carry, used in the Difference Engine No.1 was too slow, as it required an extra unit of time for each digit in the working numbers. Babbage states: “At last I came to the conclusion that I had exhausted the principle of successive carriage. I concluded also that nothing but teaching the Engine to foresee and then to act upon that foresight could ever lead me to the object I desired, namely, to make the whole or any unlimited number of carriages in one unit of time.” (Morrison, P. & E. 1961. p. 53). The result of this line of thought was the anticipating carriage. Babbage thought this to be the single most important part of the Analytical Engine. The ENIAC machine would later use an electronic implementation of this idea (Thornton, 2007).

There was another issue relating to the carriage of tens. The amount of machinery required. Babbage found that it would be more economical to centralize all of the expensive machinery in one place rather than spreading it around the Engine as needed. So he split the engine into two distinct parts (Swade, 2000). The section of the engine dedicated to performing arithmetical functions he named the “mill”, the section of the engine used to store numbers was named the “store”. The Store consisted of columns of wheels which held the numbers that were to be used during operations. Today we would refer to the “store” as memory. The Mill on the other hand, contained all the machinery needed for arithmetical functions. Numbers would be called up from the Store and sent to the Mill via a set of axes that would act as buffer registers. This arrangement is very similar to today’s modern electronic computers. The architecture, now known as the Von Neumann architecture was first described in a paper published in 1945 by John Von Neumann (Swade, 2000). In that paper Von Neumann describes the internal layout of a modern electronic computer. One of the main features of that paper is the separation of the central processor for general memory. An idea clearly demonstrated by Babbage over 100 years earlier.

Prior to deciding on the use of punch cards, Babbage had experimented with studded barrels to control the sequence of operations to be executed by the engine. This approached had a level of inflexibility that was easily overcome with the use of punch cards (Bromley, 1982). Babbage realised that by using punch cards he could create a device with essentially unlimited capacity. The engine was designed to read in such a way, that the engine would register any given hole if a metal rod was able to pierce it. Babbage also devised a number of ways to ensure that cards were read correctly.

Babbage proposed four different types of punch cards: operation cards, number cards, variable cards and combinatorial cards.

Operation cards told the engine which type of operation to perform – addition, subtraction, multiplication or division. Operation cards could be strung together to perform set sequences of operations. This could be extended without limit. Variable cards specified where in the store a number was to be fetched and where to store a result of an operation. Number cards held numerical data. These cards could be used for setting initial values in the store automatically. They could also be used as secondary or reserve memory. Babbage had planned for number cards to be able to express numbers up to 1050-1 (Essinger, 2004). Combinatorial cards added the ability to loop back and iterate a through a set of operations.

Punch cards also have the distinct advantage of being a permanent record of both inputs and output from the engine, for instance, when a number is read out from the machine the figure wheel containing that number is set to zero, this is termed a destructive read out, where the number is lost after being read. Punch cards allow for a non-destructive read out of the values stored on those cards. This would have allowed for libraries of operation, variable and number cards to be created and used at will. It would also have allowed for a user to re-run a particular sequence and be confident that the result was correct. Babbage himself states “There is no limit to the number of such cards which may be strung together according to the nature of the operations required.” (Morrison, P. & E. 1961. p. 62).

By combining sets of punch cards it was possible to give instruction to the Analytical Engine, in a way similar to a modern computer. An operation card could correspond to the action to be performed or an Opcode using modern terminology, a variable card would specify where in memory to store or retrieve a value from, or an Operand. Number cards could act as user input in order to set values in the store as an alternative to setting them by hand; they could also be used for the input of pre-computed values (Swade, 2000).

Babbage’s engine was now capable of executing sequences of instructions entered via punch cards, which used the internal operations (microprograms) in any order, what we would today refer to as a program. The descendant of punch card technology would later be used with great success by IBM with their multiplying punch systems (Thornton, 2000).

While the Analytical Engine was programmable via punch cards, it appears that not effort was made by Babbage to store users programs internally in the engine. As such it was not a Stored-Program computer (Bromley 2000). This is in stark contrast to today’s modern computers. Each time a program was to be run the user would need to enter the full sequence of punch, where the concept of stored programs is fundamental to their operation. However the technology required for stored program computers wouldn’t be fully realised until the end of the 1940s.

As Babbage’s goal for the Analytical Engine was integrity of the results, he spent great amounts of time ensuring that the engine was resilient when encountering errors. For instance he devised a system of wedges to lock each figure wheel in place during the engines operations. The wedges would be withdrawn for the short periods of time when that figure wheel was required for an operation. The wedge would also help to keep figure wheels in correct alignment. If a figure wheel was out of alignment the wedge would class with the gears on the wheel and cause the engine to jam. Using this method Babbage could theoretically use the jamming of the engine as an error detection mechanism (Swade, 2000).

Babbage’s Analytical Engine was an extremely complex mechanical wonder, with many similarities to today’s modern computers. Particularly in the areas programmability along with logical and physical layout of the engine, in that Babbage choose to use punch cards and the segregation of the Store and Mill.

It could be said that with his design of the a centralised processing until along with a memory store that he is a father of modern computing, and indeed many text books make this claim, however as Swade (2000, p.93) states it was not until the 1960’s that Babbage’s work was studied in any great detail by academics. Allan Bromley goes one further and says with some authority: “Babbage had effectively no influence on the design of the modern computer” (Swade, 2000, p.309)

References

Bromley, A. G. (2000). Babbage’s Analytical Engine Plans 28 and 28a. The Programmers Interface [Electronic version]. Annals of the History of Computing, 22(4) 5-19.

Bromley, A. G. (1982). Charles Babbage’s Analytical Engine, 1838 [Electronic version]. Annals of the History of Computing, 4(3) 196-217

Essinger, J. (2004). Jacquard’s Web. How a hand-loom led to the birth of the information age. Oxford: Oxford University Press.

Morrison, P. and E. (Eds) (1961) Charles Babbage and his Calculating Engines. Of the Analytical Engine (pp. 52-72) Canada: Dover Publications, Inc.

Swade, D. (2000). The Cogwheel Brain. London: Little, Brown and Company

Thorton, J. (2007). The Foundations of Computing and the Information Technology Age. – A Historical, Sociological and Philosophical Enquiry. Sydney: Pearson Education Australia.

Wilkes, M. V. (1991). Babbage’s Expectations for his Engines [Electronic version]. Annals of the History of Computing, 13(2) 141-145

About Jeremy

Jeremy is a Father of 3, Husband, overly opinionated Software Engineer and Professional Trouble Maker.

Jeremy is currently a Cephalopod at Octopus Deploy.
You can find him on Twitter and GitHub.