How powerful was the Apollo 11 computer?
With all the buzz about the 40th anniversary of the Apollo 11 Moon landing I got to thinking, how powerful were the computers that "took us to the Moon?" It turns out, they were nothing short of amazing. If you've never had a nerdy bone in your body, feel free to skip this post. But, if you ever laid on your back under the stars and thought about Mercury, Gemini, Apollo or the Space Shuttle, read on and see if you're as geek-struck as I was researching this. Comparing the Apollo Guidance Computer to an IBM PC XT
My first thought was how did the Apollo computer compare to the iPhone? It turns out that's a really tough comparison to make. The iPhone is so advanced compared to the computer used in Apollo's guidance system that it's hard to believe they both came from the same planet -- at roughly the same period in time when viewed in contrast to man's time line on Earth. To really make a comparison that makes much sense it's much easier to look at the home computers of the late 1970's and early 1980's.
Take Intel's venerable 8086 for example -- you might know it better as "x86". Released in 1979, just a decade after Apollo 11's trip to the Moon, the 8086's cousin, the 8088, formed the basis for the IBM PC we all know and love. When the IBM PC "XT" was released in 1981, the lowest end configuration had 8 times more memory than Apollo's Guidance Computer -- 16k, vs the Apollo's 2k. The read-only storage of the AGC was 32k,
The IBM PC XT also ran at a dizzying clock speed of 4.077MHz. That's 0.004077 GHz. The Apollo's Guidance Computer was a snail-like 1.024 MHz in comparison, and it's external signaling was half that -- actually measured in Hz (1/1000th of 1 MHz, much as 1 MHz is 1/1000 of 1 GHz).
Internally, the 8086 had 8 16-bit registers available to work with -- for those not familiar with the internals of a processor, a register is much like the numbers you'd keep in your head while doing math, and "memory" is more like scratch paper where you write things down for later use. The 8086 could keep track of 8 of those, the Apollo Guidance Computer held just 4. (The AGC also had a host of other non-general purpose registers, ranging from 1 to 16 bits in width, but it's difficult to compare those with the architecture of the 8086)
Regardless, we've established that we're dealing with some pretty archaic hardware. In many ways, the AGC was half the IBM PC XT you could buy off the shelf just a decade or so later. What's so incredible about that? The part that blew me away when reading up on the Apollo Guidance Computer wasn't so much the hardware, as the software they wrote to exploit it.
The Software
The real-time operating system in the Apollo 11 spacecraft could multi-task 8 jobs at a time, no small feat for the time it was developed, and something we take entirely for granted today. Multi-tasking however, wasn't quite as we now think of it. Today's operating systems use mostly preemptive-multitasking, where the operating system itself is in control of the execution and can stop any program at any time and hand off some computing power to another. The Apollo Guidance Computer relied on non-preemptive multi-tasking, whereby programs had to relinquish control back to the OS periodically.
The Apollo system also implemented a sophisticated virtual machine which offered more complex instructions, and could be used to perform more advanced mathematics. For it's time, this was way-out stuff in 2k of memory and 32k of storage. The real-time OS managed transition between native instructions and the instruction set of the virtual machine, which let developers mix and match the hardware level instructions with the virtual instructions within the same assembler code. The complexity of those operations is simply mind boggling for someone who grew up writing in any high-level language such as BASIC, Pascal or even C.
Keep in mind that the Apollo 11 was actually the advanced "Block II" version of the AGC, and that earlier missions had relied upon as little as 24k of core read-only storage, and 1k of main memory, and you can begin to imagine the power the developers who wrote the AGC's code must have felt.
Interface Design or What's this button thingy do?
Every computer has some sort of interface, whether it's just switches and blinking lights, or a complex GUI. The AGC was way closer to switches and blinking lights than you might imagine. Commands were entered in a combination of "verb noun pairs", which would be input as numbers -- translated into English on a painted sign in the spacecraft. When you listen to the tapes of the Apollo 11 landing, you can hear the Astronauts refer to nouns and verbs in talking with mission control back in Houston.
Error Messages
No computer would be complete without error messages, right? The AGC had those too, but when it flashed an error, it could easily mean you should kiss your ass goodbye and tell your loved-ones where you stored your last will and testament.
On the Apollo 11 mission for example, a crew mistake left one radar system on, while the landing crew used a second system to determine the distance to the ground. A "1201" error, and then a "1202" flashed causing enormous concern on the lander and back on Earth. The errors essentially meant the computer was taking in too much data to function, and left the crew in the lurch. It's said that Neil Armstrong was paying little attention to the rangefinders when he finally set the lander down on the surface, 4 miles from its intended target.
Patches. We don't need no stinking patches!
What would a good program be without upgrades? The crew of the Apollo 14 mission found out just how complicated their computer was when they were forced to patch the system code in-flight. A malfunctioning switch meant that the computer was receiving abort signals when no one was pushing the abort button! While orbiting the moon, NASA engineers devised an in-memory patch (all the systems code was stored in something we'd likely refer to as read-only memory. Unchangeable without physical upgrades) that the crew keyed in by hand. The error, patch authoring, and key-in was discovered, authored and programmed into the ship's computer in about 90 minutes. Think about that the next time you wait months for a simple upgrade!
So, when you think about all those amazing manned missions to the Moon, and what it took to get there, don't forget to ponder the blood, sweat and tears that went towards designing, building and programming the AGC. For the time, likely one of Man's greatest achievements. As I read earlier -- and can't find a source to attribute now -- one NASA engineer said later, had the complexities of the eventual AGC been understood when they began to design it, they likely never would have started, as they would have considered the computer far outside the available technology of the day.
Think this is geeky and esoteric? Try building an Apollo Guidance Computer in your basement.












Comments
41
Subscribe to commentsHenryJul 20th 2009 10:00PM
I worked on the Apollo moon mission in 1967 as a student at the University of Miami (Fl.). My job was to learn a base 25 number system in 6 weeks while pursuing full time an undergraduate program. Why? To see if the astronauts could learn a base 15, base 20 or abase 25 system in a short amount of time while learning the other chores necessary to take a capsule to the moon. The reasoning was that a base 15, 20 or 25 number system would enable astronauts to communicate the necessary math with the ground to plot the path of the capsule in a timely manner (befroe the capsule moved to far.) As a result of this study, the space program delayed the mission and invested a billion dollars with Texas Instruments to develop the first microchip so calculations could be done on board. It was the final obstacle to be overcome so a man could walk on the moon.
Ken CJul 20th 2009 10:51PM
my first pc was an ibm pc AT 16 mhz and cost around $1,000+ with no hard drive. A good dual core PC cost only $300~400. Imagine the things people can do with the affordable technology these days. We are in for some exciting times ahead.
MikeJul 20th 2009 11:17PM
Today, I was in the audience at Draper Labs, while the retired project lead for the AGC gave a speech about the challenges they faced throughout the program. As an undergraduate EE, it was really inspiring how much they accomplished with the technology available, as well as the time constraints. Just need to push the limits.
ManJul 20th 2009 11:50PM
Their computer took them to the moon and back.
My desktop skips and freezes trying to watch video of the moon landing.
That is real power.
MysteriusJul 24th 2009 2:27AM
The AGC had the benefit of significant hardware acceleration, though...
OmatseiJul 21st 2009 1:17AM
Just a minor correction... 1 Hz is 1/1,000,000th of a Mhz, not 1/1000. I'm sure you (and almost anyone interested in this stuff) knew that.
Niels van DijkJul 21st 2009 3:36AM
Imagine installing Bioshock or something on that.
EdzaJul 21st 2009 4:40AM
But can it run Crysis?
flaviapmJul 21st 2009 6:24AM
This video (http://www.youtube.com/watch?v=DdaBwh20nIk) shows us how the technology evolved. So what would we be able to do if the challenge was released today?
MarkJul 21st 2009 6:11AM
Correction, the 8088 in the IBM PC/XT ran at 4.77 MHz, not 4.077 (watching a bit too much M*A*S*H perhaps?)
Nice article though :D
ian mortonJul 21st 2009 5:11PM
They only had 32k of storage, so rather than a bloated operating system and over elaborate software, the programmers could almost hold that much code in their head, or at least all the subroutine calls. Writing at assembler code level wasn't that bad; it was an improvement over boot-strapping code into a machine by setting switches for each byte of machine code. The special part was the multi tasking, which had to take into account the styles of several programmers' brains.
Peter EnisJul 21st 2009 8:45AM
Dont forget that these chips were developed for other types of missiles as well......
And furthermore.... a chip (glad they made it anywayzzz) was perhaps not even the best option:
http://www.wired.com/gadgetlab/2009/07/low-tech-computers/2/
Wei GengJul 21st 2009 9:20AM
Hmmmmm correct me if i'm wrong
"The Apollo's Guidance Computer was a snail-like 1.024 MHz in comparison, and it's external signaling was half that -- actually measured in Hz (1/1000th of 1 MHz, much as 1 MHz is 1/1000 of 1 GHz). "
1/1000th of 1MHz would be 1KHz, 1 kilo-Hertz
1Hz would be 1/1000th of a kilo-hertz
wine.curmudgeonJul 21st 2009 9:25AM
I learned Fortran in high school (can't say I remember any today) in the mid-1970s. The computer sat in the corner of the room, had lots of blinking lights, and we programmed it, if I remember it correctly, with paper tape. We thought that was the be all and end all.
And I miss my 8088, with DOS and Norton Desktop and Sidekick.
Marcus_wit2Jul 21st 2009 10:18AM
Omatsei, not impressed, the correction should be - 1 Hz is 1/1000th of a Ghz, since most of use talk in Ghz now-a-days
OmatseiJul 21st 2009 3:54PM
No, that'd still be wrong. 1 ghz is 1000 mhz... 1 mhz is 1000 khz... 1 khz is 1000 hz. So if we wanted to measure the speed of the AGC in hz, it'd be 1027000 hz (in ghz, it'd be 0.001027 ghz).
Either way, it's incredibly slow compared to almost any piece of hardware available today, even in third-world countries.
joepJul 21st 2009 11:44AM
More mundane, but the same idea - Magnavox Odyssey was in my living room in 1972 and Pong kept me busy throughout high school. All with only 40 transistors and 40 diodes. That is about what you need today to build a single BYTE!
I wonder why travel websites have not evolved - look at frommers, fodors, http://www.tripcart.com/New-England,Fishing-Index.html
Oh well
DapxinJul 21st 2009 12:21PM
Microsoft engineers would have developed a solution, that relies on a customised (lol) dot net edition were the flight to be now.
Never mind it could blow up on the just after reaching escape velocity...and MS will then be made to release a patch...:rant.
interesting read.
tsendspamJul 21st 2009 3:08PM
HAHAHA and with the tech we have today we havent gone to the moon ever since. I still dont believe the moon landing. NASA is the biggest money laundering scheme in the world. Why take such a giant leap and stop there? Why not build the space station on the moon other than floating around space? Just like Enstein is to be believed to be this great genius but that dumb genius did know what man would do with the atom. I would say he is the most evil person in the world for creating nuclear weapons.
JordanAug 17th 2009 11:15AM
You're a douche. We haven't been back since because we've been working on the space shuttle program - which can't reach the moon. It was designed for near earth missions. Though the shuttle may look more advanced and may technically be more complex, it's actually less useable and more dangerous than the type of spacecraft used in the Apollo missions. We are now entering a new era in which we will return to the moon and beyond. Do you know how many products you use in your daily life that have come to exist because of NASA? People like you seem to think hating on NASA is the cool thing to do because "oohhhh my tax dollars!", but you fail to realize what you have gained from it and how stupid you look. Again, you are a douche.
I find it funny that computers are now how much more advanced, yet they run like crap. I know it's because all OSs we use are written for general purpose in that they need to run a vast library of applications and are not written for a specific purpose with specific programs, but still, you would think they would perform better.