• Home
  • :
  • Community
  • :
  • Blogs
  • :
  • Breakfast Bytes
  • :
  • The First Computer on the Moon

Breakfast Bytes Blogs

  • Subscriptions

    Never miss a story from Breakfast Bytes. Subscribe for in-depth analysis and articles.

    Subscribe by email
  • More
  • Cancel
  • All Blog Categories
  • Breakfast Bytes
  • Cadence Academic Network
  • Cadence Support
  • Computational Fluid Dynamics
  • CFD(数値流体力学)
  • 中文技术专区
  • Custom IC Design
  • カスタムIC/ミックスシグナル
  • 定制IC芯片设计
  • Digital Implementation
  • Functional Verification
  • IC Packaging and SiP Design
  • In-Design Analysis
    • In-Design Analysis
    • Electromagnetic Analysis
    • Thermal Analysis
    • Signal and Power Integrity Analysis
    • RF/Microwave Design and Analysis
  • Life at Cadence
  • Mixed-Signal Design
  • PCB Design
  • PCB設計/ICパッケージ設計
  • PCB、IC封装:设计与仿真分析
  • PCB解析/ICパッケージ解析
  • RF Design
  • RF /マイクロ波設計
  • Signal and Power Integrity (PCB/IC Packaging)
  • Silicon Signoff
  • Solutions
  • Spotlight Taiwan
  • System Design and Verification
  • Tensilica and Design IP
  • The India Circuit
  • Whiteboard Wednesdays
  • Archive
    • Cadence on the Beat
    • Industry Insights
    • Logic Design
    • Low Power
    • The Design Chronicles
Paul McLellan
Paul McLellan
19 Jul 2019

The First Computer on the Moon

 breakfast bytes logo I am sure you can't fail to have noticed that tomorrow is the 50th anniversary of the first landing on the moon. It has been everywhere for the last few weeks.

I was a teenager. I remember watching the landing. In Britain, in the basement at my parents' house in Chatham, which is where our one TV was.  It was the middle of the evening at 20:17UTC, which means it would have been 9:17pm since we would have been on daylight saving time in July (British Summer Time). Like everyone else watching, seeing something like that for the first time, and hearing Houston counting down the fuel remaining, it was a relief when Neil Armstrong said:

Houston, Tranquility Base here.
The Eagle has landed.

Six hours later, which must have been about 3:00am UK time, Armstrong stepped onto the moon with the words:

one small step for [a] man, one giant leap for mankind

The [a] is in brackets since it is unclear whether he said it (it doesn't sound like it to me) or whether he just meant to say it.

I read an interesting point of view about "the race to the moon", which was that it was not any race with the Russians. Rather, it was a race with NASA itself, which had been formed in 1958, as to whether they could get to the moon before the organization lost the skunkworks mentality and became too bureaucratic to get anything done quickly. (If you want to read my post on NASA culture, see NASA: "Never Have Another Accident Due to Our Organizational Flaws" about Nancy Currie-Gregg's keynote at IRPS a couple of years ago.)

NASA's Computers

One area that I've talked about before is how much, or rather little, computer power was available. Not only was the mainframe installation at NASA the first time IBM had installed a real-time system, but the Apollo guidance computer on the lunar module was also the first time a computer had control of a person's life.

NASA apparently had about 1 MIPS of computer power in total on all its computers. You may have heard someone say that "your smartphone has more computer power than NASA had to go to the moon." This is true, but it more on a par with saying Bill Gates has more money than I do, than comparing two numbers that are close in magnitude.

I said somewhere in an earlier post that I can no longer find, saying "did you know that your smartphone has more computer power than NASA had to go to the moon" is equivalent to saying "and did you know that at its maximum speed as it returned to earth that the Apollo spacecraft was going faster than a snail." That's about the same ratio of, perhaps, 40,000 times.

 Apollo Guidance Computer

One major innovation was the Apollo Guidance Computer or AGC. There were two on each Apollo mission, one in the command module, and one in the lander.

The AGC was either the first or one of the first computers to be built using integrated circuits rather than discrete transistors. No, this wasn't anything like a modern SoC or even a 1970s-era microcontroller. The prototype version was built using 4100 identical chips, each containing a single 3-input NOR gate (made by Fairchild). The second version took advantage of Moore's Law and doubled the number of transistors per chip. It had roughly the same design, but now had 2800 chips, each containing two 3-input NOR gates.

To give you an idea of how limited this computer was, it had just 2048 words of erasable magnetic-core memory (what we might call RAM today) and 36K words of read-only core-rope-memory (today we'd call it ROM). A word was 16 bits, consisting of 15 bits of data and an odd parity bit. The numerical representation was smaller still, with 13 bits of data, one overflow bit, and one sign bit using ones complement representation (today, all modern computers use twos complement, partly to avoid having to deal with "schizophrenic zero" where you have both the +0 and -0 that you get with ones complement). The memory cycle time was 11.7us.

The AGC had four registers. They were the accumulator, the program counter, and a register that gave the remainder after a divide and the return address after a subroutine call. Actually, it didn't have a subroutine call instruction, but just a transfer control instruction, but the return address was always stored in this register after any transfer of control. The fourth register was the lower product after a multiply instruction. I assume it could be used for other things. All instructions seemed to reference memory—there don't seem to be any register-to-register instructions, so I assume that the AGC executed one instruction about every 25us, with one memory access to get the instruction, and one involved in the execution. The clock was 1MHz, divided down from a 2MHz crystal, but it couldn't execute instructions at that rate.

Or, as someone put it on Hacker News:

The Apollo 11 computer ran at 0.001GHz with 0.000002GB memory and 0.000032GB of read-only storage. The display was a few dozen 1-bit pixels.

However, there were issues on the first Apollo 11 landing and the computer overloaded. Later it was determined that the reason was that the rendezvous radar switch was in the wrong position, causing the computer to process data from both the rendezvous and landing radars at the same time (the rendezvous radar was only needed later when returning to dock with the command module). They were also, for reasons never entirely understood completely, a long way past the planned landing spot. Armstrong landed manually with less than 30 seconds of fuel remaining.

Metric Units

I saw a remark on Twitter recently that there are two groups of countries in the world, those who use the metric system, and those who have been to the moon. It's a cute remark, but it's not really true. All the calculations in the AGC, were done in metric units. However, since the astronauts were all air-force pilots who were used to feet per second and nautical miles, the units were converted for the display on the AGC. That's why if you listen to the moon landing, or read the transcript, you'll find things like "30 feet". But the computer was doing all its calculations in metric, since they are a lot simpler. You can read more details at the UK Metric Association including some extracts from the source code showing all the constants in metric such as the thrust in Newtons or the fuel burn-rates in kilograms per centisecond. 

And if you really, really want to get into the source code of the AGC, it is available on Github. And there's a book The Apollo Guidance Computer: Architecture and Operation.

Around that same time, my father was one of the engineering managers responsible for transferring the US Polaris submarine/missile program from the US to the UK Royal Navy. He told me years later that he had been "Dr No" since he realized that if the British started making changes to the design then it would never be completed on its aggressive schedule. The only change that was made was to change the units from feet and inches to metric, since even in the 1960s, the British didn't use "English units" anymore for engineering work.

This would come and bite NASA three decades later in 1999 when they lost the Mars Climate Orbiter since a computer produced output in pound-force-seconds instead of Newton-seconds expected, and the number was misinterpreted. As a result, the orbiter didn't. Orbit, that is. It vanished when it was supposed to enter orbit around Mars.

 Read More

I think you just have to look at any newspaper tomorrow. it is the 50th anniversary of one of the most amazing events in the history of the human race. Like many people, I wonder just how it would work out if we tried to do it again today.

But two of the greatest American authors wrote about the moon program. If you have never read them, then I recommend both Tom Wolfe's The Right Stuff (the movie not so much) and Norman Mailer's Of a Fire on the Moon (just A Fire on the Moon outside the US).

Or you can relive it Experience the Apollo 11 Lunar Landing. Or at Apollo 11 in Real Time you can experience everything precisely 50 years after it happened.

 

Sign up for Sunday Brunch, the weekly Breakfast Bytes email.

Tags:
  • moon landing |
  • NASA |