Babbage analytical machine. Part Three - Final
(To begin with, I advise you to read the first and second parts of the article.) Charles Babbage difference machine for the first time made it possible to automate the calculation process and to produce it to some extent without human intervention. As was said in the previous part, to calculate functions such as the logarithm, trigonometric functions, and others, they had to be divided into sections, each of which seemed to be its own polynomial, and only then it was possible to calculate the values of the function for this section. Passing from one polynomial to another, the machine operator had to manually enter all the initial values of the registers. In addition, the machine allowed only the addition operation, which was not much even by the standards of the 19th century.
Thinking over this problem, Babbage came to the conclusion that it is possible to build a machine that would itself change the values of the source registers depending on the value of the result. That is, she herself could manage the calculation process. In the future, developing this idea, Babbage came up with the idea of not just making a machine that would tabulate the function completely automatically, but creating a machine that would solve the whole class of computational problems. For this, the algorithm of such a machine should not be rigidly sewn into its design, but set from the outside, and the machine itself should be able to perform all arithmetic operations, as well as control the progress of the calculations. Babbage called the new computing machine Analytical.
The main parts of the Analytical Engine were:
1. "warehouse" - a device for storing numbers, that is, memory in modern terminology;
2. "mill" - a device for performing arithmetic operations (Arithmetic device);
3. The device that controls the operations of the machine;
4. input and output devices; (Element of the “mill.” Figure by Henry Babbage. Source ) In such an architecture, it is not difficult to see the prototype of a modern computer with its memory, processor (mill + control device) and output input devices.

The “data exchange bus" between the ALU and the memory was a set of gear racks. The memory should have been a thousand numbers of 50 decimal places. For a number of 50 decimal places with a sign, 168 bits are needed, that is, the amount of RAM was a little more than twenty kilobytes. For comparison, I advise you here to see the amount of RAM of the first computers.
As mentioned in the previous part, while working on the analytical machine, Babbage came up with an original pre-migration scheme. It is worth saying that before that he thought over more than twenty versions of the sequential transfer scheme, before he realized that a completely different principle was needed for the cardinal acceleration of the process.
As in a difference machine, the registers that store numbers were gears. The sign of the number was set by a separate gear wheel. If this wheel displayed an even number, then this was interpreted as a positive sign, otherwise as a negative.
The operations of multiplication and division were supposed to be implemented as sequential additions or subtractions.
The estimated time to complete the operations was to be one second for addition and subtraction and one minute for multiplication and division, which is not so bad for the 19th century.
To enter data into memory and control the operation of the machine, Babbage decided to use punch cards. At that time, they had already existed for more than a dozen years, and were invented by Jacquard Joseph-Marie to control the pattern of an automated loom.
The analytical machine used two mechanisms with punch cards - one mechanism set the operations that the mill was supposed to perform, and the second controlled the transfer of data between the "mill" and the "warehouse". (Loom with Jacquard cards. Source )

During Babbage’s arrival in Italy, he was contacted by a mathematician, Professor Mosotti. “He noted that he is now ready to believe in the ability of the mechanism to master arithmetic and even algebraic relations to any desired degree. But he added that he cannot understand how a machine can make a choice that is often necessary in analytical research (that is, in the calculation process), when two or more paths are presented, especially when the correct path, as is often the case, is unknown until the previous calculations have been done. ” For this case, the Analytical Engine provided for the possibility of organizing conditional execution and cycles. For this, the transfer mechanism of the last discharge controlled the movement of punch cards and could make this mechanism repeat the action or skip it.
Output devices made it possible to print to the result of machine calculations in one or two copies, reproduce in the form of a stereotypical print or punch the result on punch cards.
Working on the analytical machine, Babbage made more than 200 drawings of its various units and about 30 layout options for the machine. However, the size of the plan, and the complex nature of the inventor, delayed the birth of his inventions for a good hundred years. If you look at the difference machine, which, according to Babbage, was supposed to tabulate up to the 20th sign of the function with constant seventh differences, then a machine similar in capabilities appeared in 1934 - it tabulated functions with constant seventh-order differences and up to 13 signs . What can we say about the gigantic possibilities of the conceived analytical machine ...

(Part of the printing mechanism of the machine. Source )
After the death of Charles Babbage, his son, Henry, took up the analytical machine, deciding to focus on two nodes - the "mill" and the printing device. In 1888, the machine unit data was ready, which could calculate and print the product for natural numbers with 29 characters. When calculating the 32nd term, the machine returned an incorrect result due to a failure in the transfer mechanism. For the rest of his life, Henry continued to work on his father’s analytical machine, and also popularized the ideas of computers.
Despite the fact that Babbage wrote a lot of books and articles in his life, he never created a detailed account of the principles of the difference and analytical machines, since he considered the creation of machines more important than describing them. A detailed description of the difference machine was given by Dionisy Lardner, and the analytic machine was described in an article by Luigi Frederigo Menabrea. It was this article that led to the birth of the first program in the world and the first programmer. The honor of wearing such a title has Ada Augusta Lovelace, daughter of the poet Byron. Charles Babbage was familiar with the family of a young talented girl and in every possible way encouraged her craving for science. Once Ada became interested in Babbage computers and took up the translation of Menabrea's article. While working on the translation, Ada supplemented it with her comments, examples of the practical use of machines, and also compiled a “program” for calculating Bernoulli numbers. Ada's name was immortalized in the name of one of the programming languages - Ada. I won’t go deeper into the biography of Ada, because this topic has already beendisclosed on a habr. (Ada Augusta Lovelace. Source ) The fate of Charles Babbage was no less complicated than the fate of his computers. The attitude of contemporaries towards this scientist changed over time from a genius to an eccentric and even to an inventor who was damaged by his reason on the basis of computers. During his life, he created a large number of various inventions, such as speedometers, dynamometers, and came up with a single postal rate and more. The president of the Royal Society, Lord Ross wrote that "Babbage only with his inventions in the field of mechanical engineering fully reimbursed the funds that the government invested in the construction of its difference machine."

The idea, which was born in the nineteenth century and became reality in the twentieth century, made a revolution not only in science, but also in our everyday life. Babbage’s life, the history of the creation of his computers, is the clearest example of how far-sighted and persistent a genius can be, and how long and thorny the path of creation can be.
PS: Everyone who is interested in mechanical computers, their history of creation, a description of the design and principles of work and the origin of their electronic counterparts recommend that I find and read the book "From the abacus to the computer" by R. S. Guter and Yu. L. Polunov, 1981 edition .