The steam-powered computer in nineteenth century Britain which nearly changed the world
During Queen Victoria's reign, work was undertaken on a digital computer which promised to revolutionise science. It was designed to be driven by a steam engine.
The work of fiction generally regarded as being the first, true steampunk novel; The Difference Engine, published in 1990. The Difference Engine is set in an alternative universe; Britain in 1855, in the full flow of an information revolution. The point of divergence from our own world is some time in the early 1820s, when a brilliant scientist perfects a huge, mechanical computer. This initial invention, the difference engine of the title, is soon superseded by vastly more complex computers called analytical engines. These are powered by steam engines. The use of information technology at such a time causes upheavals in society, leading firstly to the imposition of martial law by Prime Minister Arthur Wellesley, Duke of Wellington, followed by a civil war and revolution. With the Industrial Revolution enhanced by an Information Revolution, British society is transformed into a meritocracy of intellectuals and scientists. This, in brief, is the plot of the novel.
Charles Babbage was born in 1791 into a wealthy family. Even before he went to Cambridge University, young Charles had shown an inventive flair. He devised and constructed, for instance, a pair of shoes which enable him to walk on water; essentially a pair of wooden boards attached to shoes, like giant skis. These worked, for a short while, before Babbage toppled over and nearly drowned, because his shoes made swimming to safety all but impossible.
At Cambridge, Babbage made friends with John Herschel, who in later life became a famous astronomer, chemist and pioneer of photography. Charles Babbage’s inclinations were more towards mathematics and he went on to become both a member of the Royal Society and also Lucasian Professor of Mathematics at Cambridge; a post later held by Stephen Hawking. Charles Babbage had various ideas, some revolutionary and others frankly bizarre. He felt persecuted by street musicians, for example, the people we today call buskers. He carried out the most careful calculations and concluded that he had spent a quarter of his life hearing the, too him, appalling noise of barrel organs and hurdy-gurdys. Because he was famous and influential, Babbage managed to get an Act passed by Parliament, banning street music. This was counter-productive, because most people found the sound of street musicians a pleasant change from the hubbub of the Victorian city. Babbage was booed in the streets and people paid musicians to play all night outside his London house! One more example will perhaps indicate something of his character.
In 1842 the young Alfred Tennyson, later to become the Poet Laureate, published a poem called The Vision of Sin. The famous mathematician wrote to the poet, with an idea for improving the poem by making it more scientifically accurate. The target of his criticism was the couplet, ‘Every moment dies a man, Every moment one is born’. We cannot do better than look at the letter which Charles Babbage wrote to Tennyson;
Sir:
In your otherwise beautiful poem "The Vision of Sin" there is a verse which reads – "Every moment dies a man, Every moment one is born." It must be manifest that if this were true, the population of the world would be at a standstill. In truth, the rate of birth is slightly in excess of that of death.
I would suggest that in the next edition of your poem you have it read – "Every moment dies a man, Every moment 1 1/16 is born."
The actual figure is so long I cannot get it onto a line, but I believe the figure 1 1/16 will be sufficiently accurate for poetry.
I am, Sir, yours, etc.,
Charles Babbage
Nobody knows if this letter was written with tongue in cheek or whether, on the other hand, poetic licence offended the scientist’s feeling for truth.
Before seeing how and why Babbage became the father of modern computing, a slight diversion will be necessary. After Isaac Newton’s death in the early eighteenth century, huge mathematical endeavours were undertaken, in order to make sense of the universe by calculating the paths of planets and comets, and also predicting natural phenomena such as the rise and fall of the tides. As the Industrial Revolution gathered pace, others needed to use complicated mathematics to navigate ships, work out compound interest and a hundred and one other things. It is no exaggeration to say that science and commerce, from the seventeenth century onwards, relied upon increasingly complex mathematics. So too did the growing British Empire. Britain was a sea power and being able to deliver warships on time to the correct location was crucial in establishing British dominance at sea. This too, relied upon all sorts of mathematical work; backed up by meticulous observations of the sky. With no computers or electronic calculators, all this had to be done, by and large, by hand. There was one short-cut to lengthy calculations, but it introduced a new set of difficulties of its own.
Anybody who attended school before 1970 will know that carrying out intricate sums, multiplication for instance, usually required the use of books of tables; log tables, sine tables, tan tables and so on. For multiplying numbers, particularly very long numbers, one would look them up in a log table and then add the numbers together and find the anti-log. This would show you the correct answer to your calculation. If you wished to multiply 89 by 62, to give a very simple example, you looked up these numbers in a table of logarithms. There, you would find that the log of 89 is 1.949 and the log of 62 is 1.792. By adding these two figures, a total of 3.741 was obtained. Looking this up in another table told you that 3.741 was the log of 5518. This was the answer to the sum; 89 X 62. Essentially, the most difficult multiplication, could be reduced to the addition of two numbers. Of course, it was vital that those tables should be reliable and accurate. The way in which they were compiled virtually guaranteed that they were not.
Extracting logarithms is a taxing and fiendishly difficult process. The most commonly used method is to represent any number as a power of ten; so the logarithm of 4 is 0.602. These are not rational numbers though; which means that one can never obtain a wholly accurate figure. The more decimal places to which a logarithm is calculated; the more accurate will be the results when it is later used. Some log tables were compiled to be accurate to 8 decimal places, others to 10 or 12. To carry out the reckoning necessary to obtain such accurate figures, teams of young men called ‘computers’ were employed. Our modern word for an electronic machine was being used centuries ago and referred until fairly recently to people, rather than machines.
When a group of men had found what they thought was the correct answer to however many decimal places, then the result would be sent to the printers and included in a new table. The problem was that not only were there many errors of calculation in a team project of this sort, but the handwritten answers would also be misread by the men whose job it was to set up the type and turn them into books of tables. A 2 might be taken for a 7 and so on. As a consequence, all the tables of logarithms produced in this way were inaccurate in varying degrees. A mistake in one of these tables could have far more serious consequences than merely throwing out of kilter some attempt to work out the exact path of the planet Mercury’s orbit. It could also end in a ship at sea missing landfall to take on water and provisions by many miles. As Sir John Herschel, a leading Victorian scientist and friend of Charles Babbage put it, ‘An undetected error in a logarithmic table is like a sunken rock at sea yet undiscovered, upon which it is impossible to say what wrecks may have taken place.’
It was to Herschel, in the summer of 1821, that Charles Babbage made his famous comment; which first suggested the notion of a steam-powered computer. Babbage had been working his way through some tables and was dismayed to discover many errors; so many in fact that he thought that the mistakes rendered the log tables all but worthless. He exclaimed to his friend in exasperation, ‘I wish to God these calculations had been executed by steam!’ Steam power was the very epitome of efficiency at that time and it was hardly surprising that Babbage should have seen it as a remedy to human mistakes; much as in our own time we look to digital technology to solve some of our problems.
Charles Babbage’s grand idea, which he fleshed out over the next couple of years, was for a gigantic, mechanical calculating machine. This would work out things such as logarithms and then print out the results automatically; thus removing all human error from the process of putting together log tables. Because of the possibility of vastly improved tables which would aid the British navy in their navigation, the government was interested in the idea of infallible log tables and in June 1823, a meeting was arranged between Babbage and the then Chancellor of the Exchequer; Frederick John Robinson.
Before going any further, it might be helpful to think a little about the problems of calculating by hand and why this was such an important matter for the British admiralty. These days, anybody with a mobile telephone is able to pinpoint his or her place on the Earth within a few meters. This is done by the phone exchanging messages with satellites orbiting the earth. Before GPS systems, finding out where you were at sea, where there are no landmarks, could be a complicated and time-consuming business. Take finding one’s longitude.
Longitude means nothing more than how far east or west one is from London; through which, for historic reasons, the Greenwich meridian runs. All one really needs to know to calculate longitude is what the time is where you are and what time it is in Greenwich. Every hour further away from Greenwich, or the Prime Meridian as it is now called, equates to 15 degrees of longitude. Put like that, the thing seems absurdly simple, but it was anything but. Without accurate clocks, it was impossible to know what time is was in Greenwich and so this had to be worked out by means of what are known as ‘lunar distances’. The apparent distance of the moon from various stars changes each day and if one could work out what these were at Greenwich and then compare them with readings from on board a ship, then it would be possible to find the difference between the two and so know how many hours and minutes the ship was behind or ahead of Greenwich time. Finding the time at sea could be done without a clock, by measuring the inclination of the sun above the horizon. From that, one could then find the longitude. The only problem was that these calculations and measurements took about four hours.
In the middle of the eighteenth century the then Astronomer Royal, Nevil Maskelyne, began preparing and publishing a Nautical Almanac, which contained, for months ahead, the lunar distances at Greenwich for any given day. This reduced greatly the mathematical work which needed to be carried out on board the ship. Working out the lunar distances months in advance was an incredibly tedious business and the Board of Longitude, who were responsible ultimately for the almanac, employed schoolteachers and clergymen do the donkey-work. These individuals were known as ‘computers’. Even when accurate and reliable chronometers began to appear, they were very expensive. Typically, a chronometer would cost about the third of the price of an entire ship. For that reason the cheap and readily available Nautical Almanacs remained in use well into the nineteenth century. It was not until the 1850s that these almanacs fell into disuse.
It was for complex and dull mathematical work of this sort that Charles Babbage’s difference engine might have been invaluable. Needless to say, that army of schoolteachers and old clergymen, dedicated as they might have been, made many mistakes in their working out; something which would have been impossible for Babbage’s computer.
Unfortunately for both Charles Babbage and the British government, no minutes were kept of the meeting between the eccentric scientist and the man in charge of the country’s finances. After it was over, the two men had very different ideas about what had been agreed. What was never disputed was that the Chancellor of the Exchequer had agreed to hand over £1500 in connection with Babbage’s marvellous mechanical computer. As far as the Chancellor was concerned, this was the total cost and for that sum, the government would receive a completed model of the new machine. Babbage, on the other hand, thought that he had made it clear that the £1500 was merely a down-payment; a preliminary amount which would enable him to begin work on the project.
£1500 was a substantial sum of money in 1823; at a time when an agricultural labourer might earn perhaps £20 a year. One can sympathise with the Chancellor of the Exchequer for thinking that such an amount might buy him a new kind of machine for aiding in the navigation of the navy’s ships. On his side, one can see why Charles Babbage believed that £1500 would merely lay the groundwork for what he hoped to achieve. There had been mechanical devices before which could add numbers, but nothing as ambitious as this.
Pocket calculators date not from the 1970s, as many people suppose, but were being produced across Europe in the seventeenth century. One of the earliest models was that made in 1645 by Blaise Pascal, the French mathematician. Leibnitz, the German philosopher invented another kind of calculator 30 years later. In England too, pocket calculators were being produced. The Science Museum at South Kensington contains an example made in London in 1666. This beautiful little machine is about the size and shape of a present-day smartphone and is made as precisely as a clock. The brass case and tiny dials have a decidedly steampunk air about them. Samuel Morland’s calculator was designed to deal with the British monetary system at that time, which is to say 12 pennies to the shilling and 20 shillings to the pound.
By the time that Babbage launched his project of building a difference engine, mechanical calculators like those of Morland, Leibnitz and Pascal were well-known and the mechanisms for things such as carrying numbers and converting 10 units to a single lot of tens were familiar to many people. Babbage was building upon tried and tested technology.
There is all the difference in the world between a mechanical calculator the size of a smartphone which can add and subtract, and the fiendishly complicated and enormous machine which Babbage hoped to build. The engineering involved in the project required cog wheels to be made to very precise sizes and it was essential that each should be perfect or the working of the entire machine would be compromised. New machine tools had to be built, simply to make the components of the difference engine. The costs spiralled and, having invested already a large sum of money, the government was at first reluctant to abandon what appeared to be a very useful piece of work; a machine which would make all sorts of calculations without any possibility of error creeping in. Not only that, it would actually print out these calculations as well.
Having sunk thousands of pounds in the construction of the difference engine, successive governments were reluctant to abandon to project and, little by little, handed over every larger amounts from the treasury. In 1829 the then Prime Minister, the Duke of Wellington, went to see a model of what Babbage hoped the difference engine would look like if completed. Wellington was impressed and arranged for a further £3000 to be given towards the project. Five years later, with the difference engine still not completed, Babbage told Lord Melbourne, who was now Prime Minister, that he wished for more money towards an entirely new machine which he thought might be possible. This was the vastly more complicated analytical engine, which would be eight foot-tall and weigh as much as a railway locomotive! Not surprisingly, he was told that until his difference engine had been completed, there would be no money available for any new ideas. After 11 years, it was looking to many people as though Charles Babbage was never going to produce anything practical, no matter how much money he was given from the public purse.
For the better part of 20 years, Charles Babbage worked on his difference engine, building small parts of it and, at the same time, dreaming of the even more elaborate and ambitious analytical engine. This would be able to do far more than just work out logarithms. As he planned it, the analytical engine would have all the features of a modern computer, although the names used for some of the parts were different to those with which we are today familiar. In addition to the printer, there would be the ‘mill’, which undertook the working out and was roughly the equivalent of the microprocessor in a modern laptop. There would also be a ‘store’, where the results of calculations would be stored. This corresponded to the memory on an electronic computer.
In 1842 Babbage, after having spent thousands of pounds provided by the treasury, in addition to a huge amount of his own money, had still not produced a completed machine. One can hardly blame the government for deciding at this point that enough was enough and they pulled the plug on the difference engine by refusing to pay any more towards its development. The British government had by now given Charles Babbage an incredible £17,000 and, in effect, received nothing in return but promises of future wonders. Small sections of the difference engine had been built, but nothing that was of any practical use. Babbage was a notoriously difficult man to work with, he had a habit of falling out with people; even his supporters. Along the way, he had made quite a few enemies One of these was a secretary of the Royal Astronomical Society, the Reverend Richard Sheepshank.
Richard Sheepshank thought that Babbage had effectively been living off the taxpayer for nearly 20 years, while moaning the whole time about not being given enough money. So strongly did he feel about this, that Sheepshank wrote and published a book attacking Charles Babbage. It was called Letter to the Board of Visitors of the Greenwich Royal Observatory, in Reply to the Calumnies of Mr. Babbage and contained a brilliantly succinct summary of what many people by then felt about Babbage and his famous difference engine. He wrote, ‘We got nothing for our £17,000 but Mr. Babbage's grumblings. We should at least have had a clever toy for our money.’
Although interest in Britain in Charles Babbage’s work was sometimes lukewarm, there were those in Europe who could see how tremendously significant were the ideas which Babbage was trying to put to work in a practical way. The Italian mathematician Luigi Menabrea wrote an article on the difference engine and Ada Lovelace, who by that time had been visiting Babbage and discussing his work with him at length, translated this into English. To her translation, she attached some notes of her own, which were three times the length of Menabrea’s original article. In these, she tried to give some idea of the limitless possibilities of the analytical engine, should it ever be built. Among these notes was a method for using the analytical engine to calculate Bernoulli numbers. The sequence of instructions has been described as the world’s first computer programme.
In fact it is through the writing of Ada Lovelace that we know most of what we do about the analytical engine. She talked a great deal with Charles Babbage and her notes provide us with both an idea of what Babbage planned and also Lovelace’s vision of what might be achieved as well.
One of the most radical ideas which the analytical engine featured was that it would be programmable by means of punched cards. There was nothing startlingly original about the use of punched cards or tapes to give instructions to a machine. As early as 1804 a Frenchman called Jacquard had invented a loom controlled by a sequence of punched cards, which would contain the finished pattern.
For most of the twentieth century, computers were programmed by means of punched paper cards and tapes of the kind which Ada Lovelace had envisaged being used to programme Babbage’s proposed analytical engine. This method of storing information and then allowing it to be read by machines was widely replaced from the 1980s onwards by magnetic discs and then flash drives. It lingered on though and was still being used in America as late as 2014 in the Votomatic machine used to record votes in an election. Attention was of course drawn to this antiquated means of processing data during the 2000 presidential election, which resulted in some of the IBM data cards not being punched correctly.
The proposed analytic engine would be so huge, taking up as much space as a small room, that it would have been quite impossible to turn all the various cogwheels and printers by hand. Babbage envisaged it being powered by its own specially constructed steam engine. There was nothing wrong in principle with the designs for these computers. A few years ago the London Science Museum actually built a difference engine based on Charles Babbage’s designs and it worked perfectly well. If only the British Treasury had been a little freer with their money, then the world’s first steam-powered computer could actually have become a reality.


Thank you. That was very interesting and of course though provoking. Just imagine where we would be technologically today had it been built in a timely manner. What would our society be like.
Who'd have thought, a British government throwing money at someone making such grandiose claims. Of course it would never happen today!!!