# Babbage and Lovelace and the First Computer

In this step, we’re going to look at two of the earliest pioneers of computer science: Charles Babbage and Ada Lovelace. You’ll learn about their pioneering work in trying to design, build, and program what could have been the world’s first computer.

In this step, we’re going to look at two of the earliest pioneers of computer science: Charles Babbage and Ada Lovelace. You’ll learn about their pioneering work in trying to design, build, and program what could have been the world’s first computer.

## Babbage

Charles Babbage was a 19th century British mathematician, engineer, and inventor. During this period, to calculate the result of a particular mathematical function, such as the trigonometric functions sine, cosine, and tangent (which are important in geometry), one would use a mathematical table. If you wanted to find the sine of 100 degrees, you would use a table that provided all the results of sine calculations from 0 to 360 degrees. For example, Matthias Bernegger created a book of mathematical tables as shown in the image below:

## The Difference Engine

These tables were calculated by teams of human computers, but often suffered from calculation or transcription errors. Babbage realised that he could design a machine that could perform these calculations automatically, and with a high degree of accuracy. The machine would be mechanical in nature and he called it the Difference Engine.

The Difference Engine had only one purpose, to calculate the results of polynomial functions. Unfortunately, Babbage and the engineer he hired to build the machine had a falling out, over the cost of the precision tools required, and the machine was never completed, despite the ample funding given to Babbage by the government.

## The First Computer

While working on the Difference Engine, Babbage realised he could actually design a more general-purpose computer. That is, a computer that could be programmed to perform a variety of different calculations. He started working on this Analytical Engine in 1837, but it remained nothing more than a series of designs, which he would not complete before his death in 1871.

The Analytical Engine would have been the world’s first general-purpose computer, had it been completed. The machine could be fed instructions on punch cards. It had a device called a mill that could perform addition, subtraction, multiplication, and division. It could also store up to 1,000 numbers of 40 digits in length. There was also the ability for the machine to be fed instructions that included branching structures and loops.

## Lovelace

Ada Lovelace was the only child of Lord and Lady Byron. Lord Byron left his wife when Lovelace was a child, and Lady Byron decided that Ada should learn mathematics and logic, to prevent her suffering the perceived insanity of her father.

## The First Computer Program

Lovelace was introduced to Babbage at the age of eighteen, and the two would often write or meet to discuss Babbage’s invention. When she was asked to translate an article about the Analytical Engine, she supplemented the article with a set of her own notes on the machine, one of which turned out to be an algorithm for using the machine to calculate Bernoulli numbers, which play an important role in mathematics.

This is now often described as the first computer program, which makes Ada Lovelace the first programmer in history. Lovelace realised the true potential of the Analytical Engine to do far more than simply crunch numbers. She could see its potential for solving a wide range of computational problems, and once wrote:

Supposing, for instance, that the fundamental relations of pitched sounds in the science of harmony and of musical composition were susceptible of such expression and adaptations, the engine might compose elaborate and scientific pieces of music of any degree of complexity or extent.

## Input-Process-Output

So why is all this important? Well, apart from recognising the achievements of some of computer science’s pioneers, you can see that the basic function of a computer hasn’t changed in over 150 years. Just like modern computers, the Analytical Engine received, processed, and output data according to a set of instructions.

Do you think it is important for learners to have some historical context of the subjects they are studying?