Guide

Apollo 11: to the moon with 4 KB of RAM

David Lee
20.07.2019
Translation: Patrik Stainbrook

Exactly 50 years ago today, Apollo 11 landed on the moon. Let's take a look at the computer science of space travel at that time. The technology used was ridiculous – making the results even more amazing

Even by today's standards, the moon landing is a gigantic achievement. With the first successful landing on 21 July 1969, another one has not been carried out since 1972. These days, astronauts cover only about one thousandth of the distance their forerunners did: it's about 400 km to the International Space Station ISS and about 400,000 km to the moon. The engines were also many times larger: the Apollo rockets were so loud at launch that windows broke in a small town 18 kilometres away.

The moon landing is particularly impressive when you consider how ridiculous computer technology was back then compared to today.

Computer science at the dawn of space travel

In the 50s computers were operated with tubes. They were several metres long, needed an absurd amount of electricity, were extremely prone to mistakes and didn't do much. In the 1960s, transistors became available for the first time; a huge leap forward.

The IBM 360, however, was still as big as an XXL refrigerator and had a mere 4 kilobytes of RAM – a millionth of what a cheap smartphone has today. The first model of the IBM 360 dates back to 1966.

An IBM 360 Model 91 Panel at NASA's Goddard Space Flight Center, 1966
An IBM 360 Model 91 Panel at NASA's Goddard Space Flight Center, 1966

Computer science in the early days of space travel

Under these circumstances, it's not so surprising that the first space satellites had no computers at all on board. Even the first manned spaceships could manage without a computer. This applies both to the USSR's Vostok spaceships (Yuri Gagarin, Valentina Tereshkova) and to the USA's Mercury programme (Mercury programme).

Most of the controls were calculated in advance, partly by hand. What's especially impressive: Vostok 3 and 4 as well as Vostok 5 and 6 were predicted to approach each other up to a few kilometres (the first so-called rendezvous of space travel).

John Glenn was the first American to orbit the earth in 1962. He had no computer in his Mercury spacecraft.
John Glenn was the first American to orbit the earth in 1962. He had no computer in his Mercury spacecraft.

NASA used on-board computers for the first time during the Gemini project and in the Apollo missions that followed, of course: Apollo 11 had two control computers – one in the spacecraft and one in the Lunar Module –, an unused emergency control computer and a missile control computer that was no longer needed after launch.

The most important reasons for using computers in the spaceship itself were the 1.5 seconds of radio delay to Earth and the fact that no radio connection is possible at all from the back of the moon. The spacecraft had to be able to act autonomously.

The main task of the computer was to process navigational data and to control the spaceship automatically. However, the astronauts could also control their space shuttle manually. Later on, this was no longer possible in Space Shuttles. In fact, the Apollo astronauts took navigating into their own hands during the final phase of the landing in order to better avoid obstacles.

Despite the desired autonomy, the main load of the calculations still took place on earth. The values were transmitted to the astronauts by radio, who typed them into the on-board computer. For Apollo 11, several IBM 360 networked together were used on the ground station.

Nasa Mission Control Center during Apollo 9, March 1969.
Nasa Mission Control Center during Apollo 9, March 1969.

The Apollo Guidance Computer (AGC)

The two on-board computers in the capsule and in the Lunar Module were identical in terms of hardware. These Apollo Guidance Computers were developed at MIT. During the entire Apollo project there were only two hardware versions of the AGC. The second version was used for all manned space flights (from Apollo 7 onwards).

The computer itself weighs 32 kilograms and measures 61 × 32 × 15 cm. Extremely small and light by the standards of the time. In addition, it has an operating panel that weighs 8 kilograms. It contains a display and the keys for operation. The computer needed 70 watts of power.

The Computer and the Interface
The Computer and the Interface

The AGC works with a 16-bit word length and 1 MHz clock frequency. The original version has a fixed memory of 4000 words and a variable memory of 256 words. This was expanded more and more – up to 36,000 and 2000 words respectively. Lack of memory was a permanent problem throughout the Apollo project.

As you can see on the control panel, the AGC only knows numbers, not letters. There are the "Verb" and "Noun" keys with which you can enter commands. The astronaut presses "Verb" and enters a number between 00 and 99. Then he repeats this with "Noun." A list shows which number means which command. The list changed on each Apollo mission.

The DSKY control panel, the verb and noun keys are on the far left.
The DSKY control panel, the verb and noun keys are on the far left.

During a space flight, the astronauts had to press a button about 10,000 times. Operation by ground control would've technically been possible, but this allegedly failed due to resistance from the astronauts. They wanted to make sure that nothing would be decided without their approval.

Crash-proof software out of thin air

The software of the two AGCs in the spaceship weren't the same, but adapted to their respective tasks. Software development for the Apollo programme at MIT was led by a woman: Margaret Hamilton. She and her team began developing the systems basically from scratch. At the beginning of the project there weren't even computers on which the programmes could be tested. Later, programmers could emulate the software on a computer, but not test it on the hardware that was actually going to be used.

Margaret Hamilton with the printed Apollo software.
Margaret Hamilton with the printed Apollo software.

MIT already used a more advanced programming language in order not to have to code directly in the assembler. This was slower, but took up less disk space.

You can try the AGC in your web browser. Be sure to remember the checklist linked there. You won't get far without it.

System-wide crashes were part of day-to-day life back then. On the ground anyway. In the vacuum of space, this would've spelled certain death for the astronauts. Therefore, a total crash had to be avoided under all circumstances. In addition, the computer had to be able to handle several tasks simultaneously in real time.

That's why the AGC software recognizes when the computer is overloaded and can prioritize important tasks accordingly. If this hadn't been the case, Apollo 11 might not have been able to land at all. During the landing phase, a malfunction caused the radar to continuously send senseless data to the computer, which couldn't be processed quickly enough. As Margaret's code ignored this data, the module could still land on the moon as planned.

And give us reason to celebrate.

120 people like this article


User Avatar
User Avatar

My interest in IT and writing landed me in tech journalism early on (2000). I want to know how we can use technology without being used. Outside of the office, I’m a keen musician who makes up for lacking talent with excessive enthusiasm.


Computing
Follow topics and stay updated on your areas of interest

These articles might also interest you

  • Skeleton Loader

    Skeleton Loader

  • Skeleton Loader

    Skeleton Loader

  • Skeleton Loader

    Skeleton Loader

19 comments

Avatar