Charles Babbage was an

English polymath, mathematician, philosopher, inventor

and mechanical engineer, who was born in 1791. In that time, printed

mathematical tables, for example for navigation,

were still calculated by human computers;

in other words, by hand. Repeating mistakes were known to occur

in transcription as well as calculation and it also just was just a

lot of exhausting manual work. Babbage once said: I wish to God, these

calculations had been executed by steam! To solve the problem,

he first designed the “Difference Engine”,

that was able to compute values for polynomial functions. But he never finished the complete machine,

prabably also because in the meanwhile, his attention had moved on to developing a far

more sophisticated thing, namely, the Analytical Engine. It was in 1833 and he

was 42, when he started this work and interestingly

in the same year, he met “Augusta Ada Byron King”,

“Countess of Lovelace”, or a little bit simpler

just “Ada Lovelace”. She was 17 years old, already a mathematician

and very interested in Babbage’s ideas. Charles Babbage, on

the other side, praised her analytical skills

and later called her lovingly “Lady Fairy”. In the following years,

with some interruptions, Babbage worked on the

design of the Analytical Engine and developed in total

28 different plans for it. Ada saw the potential

of his invention and wrote several programs for

the theroretical machine. That’s why many people see

her as the very first programmer! Babbage created this

trial model of the Analytical Engine and documented his

ideas in about 1000 Notations and 7000 Manuskripts. His son Henry also finished

another part of the machine in 1910. But in the end, the complete

machine was never built. Despite all this, the concepts were really

brilliant and Charles Babbage was probably 100 years ahead of his time. So let’s have a closer look on how

this machine *should* have worked! The comic writer “Sydney Padua”

imagines the Analytical Engine as follows: Isn’t it beautiful? In front of the machine Mr. Babbage

smiles and seems quite confident. On the right hand side, Lady Ada Lovelace, a

little bit dreamy, reads a long row of punch cards. The machine is really

huge and therefore a strong steam engine is required to drive it. The first part of the

program is located on the “Operation Cards” which

are processed by a reader device and define which

arithmetic instructions should be done by the

machine one after another. The instructions on the

cards are encoded in holes, which are decoded then by the

reader and afterwards passed to the Barrels that define

a sequence of smaller operations which then

are executed by the the Mill. The Barrels together with the mill

implement the 4 basic arithmetic operations, namely, addition,

subtraction, multiplication and division. The program data is located in the Store, where in total

1.000 decimal numbers, with 50 digits each, can be saved. Each number is implemented

by a stack of 50 gears and has a unique column number

which is used for addressing. The numbers are loaded into the Mill by

transfer commands that are encoded on the Variable Cards. This is the second part of

the program and contains the Load / Store instructions

to transfer numbers using racks between the Store and the Mill. The somehow odd

separation of Variable and Operation Cards probably

had technical reasons. The input data is loaded

into the Store with the Number Cards and the

results can be put on paper using a Printer device. So that’s it. Sounds somehow familiar, doesn‘t it? And indeed, Mr. Babbage

has designed already in the 1840s an almost modern computer. We just would name the components

a bit different in our days. The Mill is called today the CPU or Processing Unit. The Barrels store the Microprogram that contains smaller steps

for implementing the arithmetic operations. Then of course the Store is today called the read-write memory. The Operation Cards together with the Variable Cards define the read-only program, which is

located on the punch cards. One can argue that also the Number Cards are part 3 of the program,

namely the constants, but they can also be seen as input data, similar to

data entered by today’s keyboards, where

a user types in the numbers for the program. Then of course the printer is today called still the

printer, but since it is the main output device for the

Analytical Engine, it had to also fulfill the functions of

today’s monitors, for example. And last but not least the Steam Engine: Well, of course this is a bit

oldschool and modern machines use Electricity instead of Steam. So in principle everything is

there what modern computers have. Since the program is

separated from the memory, the Analytical Machine is not

a von Neumann computer, but instead it follows

the Harvard architecture. By the way, one the first

computers with that design, the Mark I, was built in the

1940s, almost exactly 100 years after the Analytical

Engine was invented by Charles Babbage. So now let’s open the

engine and look a little bit more into the details. We see again the Store with 1000 stacks of

gears, one for each number. With the Number Cards, we can

feed data into the Store. The Mill consists of a

very complicated set of mechanical parts for

doing the microinstructions, orchestrated by the Barrels. As input for the arithmetic

operations, a so called Ingress Axis is used, which can

store a 50 digit decimal number. At least logically, there are

even two Ingress Axes, so for simplicity we added a second one: The two Ingress Axes

are basically what we today would call input registers

and they are used as operands for the arithmetic instructions. The result of a

calculation is stored in the Egress Axis, which also can

hold numbers with 50 digits. There are Racks that connect the

Ingress- and Egress Axes with the Store. Today we would say that

this is the memory bus. The Variable Cards instruct

the Racks to copy column contents from the Store

into the Ingress Axes and copy back the result

data from the Egress Axis. The Operation Cards define which

arithmetic functions should be done. And besides that, they also can instruct a bell to ring or they can

halt the whole machine. Now that we know all

the important pieces of the Analytical Engine, it is

time to run a program on it. Fortunately, Ada was so kind

to develop a good example and created the required punch cards for us. For some strange reason

Mr. Babbage wants to prevent her from running the code. The question is why, since

the program is really simple. Ada just wants to calculate as an Example: 24 plus 18. Before we start, we should

mention that the three streams for Number-, Value- and Operation-Cards

somehow have to be synchronized. It seems a bit unclear, if

Babbage ever explicitly defined, how that should work. So for simplicity again, let‘s

assume that the selection of the correct card stack is done by magic. So let’s start the program. In the first column you

see the step number, in the second there are

assembler-like instructions and in the last column there is

a short description of what is going on. First two Number Cards

are read, to load number 24 into column 5 and then number 18 to column 6. Then the first Operation Card is read, which is an addition. This configures the Barrels for adding two

numbers which are read in the following steps. Next, we read two Variable Cards which first load the number 24 from Store column 5

into the Ingress Axis I and then the number 18 from column 6 into Ingress Axis II. To achieve that, the

data is transferred by the Racks. Now the Ingress Axes are read by the Mill, which is then doing the addition under the control of the Barrels. The gears are performing their magical work, when they are doing

the arithmetic operation. After the calculation is finished,

the result is written to the Egress Exis, which we would

call today an output register. Then the next Variable Card is read,

which instructs the Racks to save the contents of the Egress Axis back to column 7. Finally, we print the last result, ring the bell and halt the program. So the answer is 42, which is obviously

right and by coincidence exactly the age of Mr. Babbage,

when he first met his Lady Fairy. So that was a brief

summary of what can be found in the Internet

for the Analytical Engine. But there are still some

more details worth mentioning: The Machine has a

“run-up lever” that indicates exceptions, like

overflows or sign changes. The indication can then

be used for conditional branches that are able

to wind the punch cards forwards and backwards. And this feature together

with the Store makes the Analytical

Engine probably even Turing complete. The machine somehow also implements

pipelining, meaning parallel computation. Nevertheless, the speed of the machine seems

moderate: People are guessing 3 seconds for an addition and 3

minutes for a multiplication. Last but not least, there is an emulator

available on the internet, where we can try Ada’s program. Indeed, having an emulator is really cool. But the prove that this machine could also

have worked in reality is still missing. Therefore in 2010 a project called “Plan 28”

was initiated by John Graham-Cumming, who in a TED talk

described Babbage’s ideas. The machine should be built and finished in

the 2030s, two hundred years after it was originally designed. Plan 28, from which the

project takes its name, is the most complete

of Babbage’s designs. Doron Swade, former curator of the Science

Museum London, and involved in the 17 years reconstruction of the Difference Engine No. 2,

in 2012 estimated that the project would require 15-20 years and 20-40 million dollars. The machine would be

10 x bigger than Difference Engine would weight several tons and it would probably need

50.000–80.000 parts to build it. So it looks like a really challenging plan! Good luck, for our British colleagues! Would be so great, to see

the machine up and running!