Fact Cafe
81

First Computer Bug Was a Moth

Learn More

First Computer Bug Was a Moth illustration
First Computer Bug Was a Moth

The colossal Harvard Mark II, an early electromechanical computer, filled an entire room with its intricate network (Review) of electromagnetic relays, switches, and wiring. This marvel of post-World War II engineering, completed in 1947, was designed for complex calculations, yet it was susceptible to surprisingly mundane interruptions. On a September day that year, the massive machine began to register inexplicable errors, halting its critical operations.

Upon investigation by the operating team at Harvard University, a literal culprit was discovered: a moth, trapped between the contacts of Relay #70, Panel F. The tiny insect had caused a circuit to fail, bringing the sophisticated 25-ton apparatus to a standstill. The team carefully removed the moth and taped it into the machine's logbook with the now-famous annotation, "First actual case of bug being found." While the term "bug" had already been used in engineering jargon since at least the 1870s by figures like Thomas Edison to describe mechanical faults, this incident provided a vivid, literal example that cemented the term's association with computer malfunctions.

This amusing yet pivotal event was widely popularized by computing pioneer Grace Hopper, who was part of the Harvard Mark II team and frequently recounted the story. The actual moth, still taped in the logbook, is preserved today at the Smithsonian National Museum of American History, serving as a tangible reminder of a moment that not only coined the phrase "debugging" in the context of computing but also highlighted the unexpected vulnerabilities of early technology. It remains a charming anecdote that illustrates the very human element in the evolution of computer science.