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 commentstsendspamJul 21st 2009 3:10PM
Im sorry mistake at
"but that dumb genius did NOT know what man would do with the atom.
oddtimeJul 21st 2009 7:30PM
Gone are the days it seems, when programmers developed software that was as efficient as possible due to the restraints and limitations at the time. Now it seems that software, including OS are so bloated and poorly written, eating up more resources than needed. I'm not knocking the geniuses who write the stuff, but know that if they didn't have so much headroom, they would be forced to rethink and retool many of their routines.
Michael ShermanJul 21st 2009 7:48PM
From what I understand, it's become far cheaper to add more hardware, than to spend more developer time optimizing code (excepting major efficiency boosts, like 40% etc.) It's also easier to maintain and use today's code.
BTW, not disagreeing with you at all, there is room for improvement.
AnonymousJul 21st 2009 8:35PM
I think its stupid the first thought would be to compare the Apollo 11 computers to an iPhone. The iPhone isn't that special OR that powerful. I'm getting tired of this Cult of Steve Jobs obsession over it.
Grant RobertsonJul 21st 2009 8:41PM
Are you freaking kidding me? The 3gs *could* be clocked to over 800Mhz (currently at 667) and sports a discrete 3D capable graphics chip. The desktop I was using just 5 or 6 years ago didn't have as much raw horsepower as an iPhone. Hell, the largest portion of the US nuclear program was developed with far less horsepower than there is in an iPhone.
And, as far as the Cult of Steve goes, if you knew me you'd know that couldn't be further from the truth. I love my macs, but they still take second place in a life full of Windows, Linux, BSD and even Solaris boxes, and a day job filled with serious heavy metal HP-UX boxes with more cores than the iPhone has gigs of flash memory.
Ok, to be fair, the Solaris box definitely comes last. Still, my point stands.
AnonymousJul 21st 2009 8:50PM
And compared to TODAY's standards, iPhones aren't that powerful, in a day where even embedded devices are starting to clear 1 GHz and PCs are pushing 4 GHz in some applications.
Okay, so you're not a Steve Jobs cultist, it was still an idiot thing to think of an iPhone as the first think to compare the Apollo 11 computers to, since iPhones are far from the most powerful devices out there. And frankly, I'm still sick of people's obsession over them. Name me one thing that is NOT a gimmick the iPhone does I can't do with my Treo, for example?
Grant RobertsonJul 21st 2009 8:59PM
I made it pretty clear why I didn't compare the AGC to the iPhone, it's way too different. The comparison would have been ludicrous, why would I have picked something faster? I could just have easily said my quad core Win7-64 HTPC box, but that would have been even more ridiculous. So, frankly, don't come slinging the word idiot at me, it's just a non-starter.
As for your poor Treo, dude, 2005 called and it wants its phone back. How about 3g data? GPS? Are those gimmicks?
AnonymousJul 21st 2009 9:14PM
What rock have you been living under? Treo's had 3G data since before the iPhone. As did the blackberry. It took the iPhone a generation to get that feature.
As for GPS... ALL phones have GPS. In fact, I seem to recall having dug up... IN 2006, I might add, a GPS program... FOR MY TREO. I didn't bother using it as I have no need for it.
That's two down. Next.
What pisses me off most about iPhone is when the Steve Jobs cultists start raving about the web browser, texting, media playing, etc, as if the the iPhone was the only one to do it.
FuzzyJul 24th 2009 1:33PM
My, my, you are a pissy little piss-ant, aren't you, Anon? I suspect the author initially thought about the comparison to an iPhone because it's an item with which a broad range of the public is familiar and has experience. Since it’s a common device which many of us carry around in our pockets on a daily basis, the comparison is much like the old comparisons of 60's and 70's supercomputer processing capability to 90's calculators. Time to get down off that high horse, Tex.
Interesting article, Grant, even for a non-techie like me.
AnonymousJul 24th 2009 2:26PM
"My, my, you are a pissy little piss-ant, aren't you, Anon? I suspect the author initially thought about the comparison to an iPhone because it's an item with which a broad range of the public is familiar and has experience. Since it’s a common device which many of us carry around in our pockets on a daily basis, the comparison is much like the old comparisons of 60's and 70's supercomputer processing capability to 90's calculators. Time to get down off that high horse, Tex."
WAAAAAAAY more people use PCs than iPhones, why didn't he think of them first? I call bullshit. The iPhone is just an overrated iPhone popular only because it was riding the iPod wave of success.
"Interesting article, Grant, even for a non-techie like me."
And all real techies are rolling their eyes and are basically saying "this is hardly newsworthy, it's like saying 'Old computers are slow! Film at 11!'" This is a waste of Internet space.
Grant RobertsonJul 24th 2009 2:27PM
And of course, we all know how precious and scarce a resource "internet space" is.
My apologies to the 35k people who read this article. :)
AnonymousJul 24th 2009 2:39PM
"My apologies to the 35k people who read this article. :)"
This coming from a guy who thinks a Hz is 1/1000th of a MhZ.
Are you sure you're not a Macfag?
AMGJul 22nd 2009 11:20AM
nice article. what kind of computers are in today's space shuttle?
Grant RobertsonJul 22nd 2009 11:21AM
That's a fantastic question. Dude, you just killed my productivity for the day!
Dave TJul 24th 2009 1:28PM
Thanks for the article! Brings back so many memories. My first computer was an analog - pots with dials and a null meter- really an electrical slide rule. My mom told me she could still calculate in her head faster than me, and she was right. Not to be deterred, at about age 20 I built my first digital computer based on RCA 1802 - 1MHz - 16 general purpose registers, 256 Bytes RAM, 0K ROM, 8 toggle switch input, 2hex LEDs output. Man I loved that machine. Eventually expanded the RAM, (1K I recall). Still have it. Still works. You might be surprised at the amount of hardware that such a machine can run. That's right, hardware, it isn't much good for making pretty pictures on video screens, but I could run a small assembly line factory with it. I still believe all students should first learn assembly language, after all isn't efficiency what the 21st century is all about?
Grant RobertsonJul 24th 2009 1:31PM
Ok, that's just totally hardcore. I *love* it!
http://en.wikipedia.org/wiki/RCA_1802
Wow. That 1802 was actually a pretty cool chip for it's time. 16 registers each 16 bits wide.. at the time, that would have been luxurious! Thanks for sharing!
nazJul 28th 2009 10:47AM
computing has come such a long way
Programmer GuyJul 31st 2009 12:33PM
Thanks for this article! This just goes to show the amount of computing power available to the average user is staggering. I however, I am dismayed to see Microsoft continue to battle Moore's law. This article really puts into perspective the amazing amounts of computations MS software must squander per second to cause Outlook 2007 to perform worse than Office 2003. New software has no grounds to demand higher hardware specs and deliver virtually the same functionality.
CarneyAug 13th 2009 3:50PM
We went to the Moon from a standing start in 1961 - in a nation that did not yet even have the push button phone, let alone Cape Canaveral, JPL, deep space communications and tracking, orbital rendezvous, heavy lift vehicles, space suits, lunar landers, etc etc. We are still coasting on the infrastructure we built during Apollo. And yet our current plans call for going to the Moon in 16 years, TWICE the time it took last time, and 50 years after the first time. Pathetic.
We should do the Mars Society's Mars Direct plan instead.
aiusepsiSep 16th 2009 1:49PM
The trouble isn't the technology, it's the political will. Going to the Moon requires a massive effort, massive expenditure, and a willingness to tolerate that there may well be fatal accidents.
In the midst of the Cold War, it was politically expedient to beat the Russians in the space race, especially as the same technology (rockets, guiding systems, etc.) could then be re-purposed for nuclear missiles.
There's no question that we could get to the Moon more easily today than we could 50 years ago, but we don't have nearly the same motivation to do so.