Shortly after noon on July 20, 1969, as they orbited some 70 miles above the surface of the moon, Neil Armstrong and Buzz Aldrin detached their lunar lander from the Apollo 11 command module in preparation for descent. From his window aboard the command vessel, Michael Collins watched as the lander rotated away and pitched itself downward. In the lander’s cramped cabin, Aldrin and Armstrong could see the moon’s surface through small triangular windows. At elbow level was the console for the device that would direct the final stage of their approach: the Apollo guidance computer.

For most of the trip, the astronauts had been passengers. The spacecraft had been guiding itself, relaying its position to Mission Control’s IBM mainframe—a contraption the size of a walk-in freezer, which in 1969 was what people thought of when they heard the term computer. Something called a “minicomputer” had recently been introduced; it was the size of a refrigerator. The Apollo guidance computer—there was one on board the command module and another on the lander—was a fraction of that size. At just 70 pounds, it was the most sophisticated such device humanity had yet conceived.

Instead of bulky vacuum tubes, the Apollo computer used thin slices of silicon called chips. Each chip contained a pair of logic gates, and each gate was a simple electronic switch that monitored three inputs, and turned its output to “off” if any of the inputs were “on.” Some 5,600 of these primitive integrated circuits, arranged in a sequence, formed the digital cascade that was the computer’s brain. It was mounted in a hardened metal container on the wall behind the astronauts, then connected by wire to the console in front of them.

The chips had been designed by Fairchild Semiconductor, a technology startup in Palo Alto, California. In the early 1960s, the computing industry was decentralized, with research conglomerates like Bell Labs and MIT dominating on the East Coast; Fairchild was an outpost on the Western frontier. The Apollo program had breathed life into the fledgling company by ordering hundreds of thousands of Fairchild components. The demand for miniaturization had led Gordon Moore, Fairchild’s head of R&D, to hypothesize that the number of components on an integrated circuit would double every year. NASA had pioneered the use of silicon, and the computer on the wall behind the astronauts was Moore’s law’s proof of concept.

The computer’s console, with its numeric keypad, resembled that on a microwave oven, and its small readout screens cast an eerie green light from below. Aldrin managed the device by punching in two-digit commands he had memorized. In response, three small panels displayed five-digit codes that he’d been trained to interpret.

In that critical moment, hurtling like a lawn dart toward the surface of the moon, the Apollo guidance computer had crashed.

As the astronauts began the first stage of their descent, the engine ignited and the computer slotted the lander into an elliptical orbit that brought them within 50,000 feet of the surface. From there, Aldrin keyed in a new program, dropping the lander from orbit into a contact course with the moon.

For the next three minutes, the cratered lunar landscape grew closer, until, at around 46,000 feet, Armstrong rotated the vehicle, pointing the landing radar toward the surface while the astronauts turned to face Earth. The moon’s gravity is irregular, and to account for this, the astronauts had to take new measurements. With the void outside his window, Aldrin punched in a request to compare the lander’s calculated position with the reading from the radar.

He was answered by a klaxon ringing in his earpiece. Aldrin hurriedly keyed in the two-digit code 5-9-Enter, which translated, roughly, as “display alarm.” The console responded with error code “1202.” Despite his months of simulations, Aldrin didn’t know what this one meant; Armstrong, equally baffled, radioed Mission Control for clarification. The stress in his voice was audible, but only later would the two men learn how bad things really were. In that critical moment, hurtling like a lawn dart toward the surface of the moon, the Apollo guidance computer had crashed.