The 1947 Moth That Gave Computers Their First Bug
The Mark II was a 25‑ton electromechanical computer built under the direction of Howard Aiken for the U.S. Navy. It relied on roughly 13,000 high‑speed relays and punched paper tape for instruction input. Each relay was a small mechanical switch; two metal contacts closed when an electromagnet pulled them together. The entire arithmetic of the machine depended on thousands of such contacts touching cleanly, thousands of times per second. Any foreign object—dust, solder, or an insect—could interrupt the circuit and cause a failure.
The incident occurred while the Mark II was still in construction and testing at Harvard. The machine would not be delivered to the Navy’s Dahlgren proving ground until spring 1948, six months after the moth was found. The lab’s warm, light‑filled environment attracted insects, and the windows had no screens, allowing bugs to wander in at night.
Grace Murray Hopper, a Navy Reserve lieutenant and one of the original programmers of the earlier Mark I, was part of the team that worked on the Mark II. According to later interviews, Hopper did not personally find the moth; she has repeatedly stated that she was not the one who removed it. Nevertheless, she has told the story many times, and her name has become closely associated with the event.
The word bug was already in use by engineers long before 1947. Thomas Edison had referred to small faults in electrical circuits as “bugs” in an 1878 letter to Theodore Puskas. Telegraph operators and aviation mechanics also used the term. By the time the Mark II logbook entry was made, the metaphor was well established in electrical engineering.
The logbook entry’s humor lies in its self‑referential nature: the engineers had been chasing a glitch, opened a panel, and literally found a bug. The note “First actual case of bug being found” was a punchline that captured the moment and cemented the term in the language of computing.
The incident had a lasting impact on the field. The term debugging entered engineering vocabulary in the early 1950s, and the practice of locating and removing faults became a core discipline in software and hardware development. Other concrete objects—paper patches, the word crash, and freeze—also entered the lexicon as metaphors for technical problems.
Today, the logbook page is displayed in the Smithsonian’s computing collection. The moth, still taped to the page, is one of the most famous insects in computing history. The story illustrates how a single, accidental event can shape the terminology and culture of an entire industry.
The Mark II itself was delivered to the Navy in 1948 and used for ballistic calculations at Dahlgren. The machine’s relays and paper tape are now preserved in archives, but the moth remains a tangible reminder of the origins of the word bug.
The legacy of the 1947 moth continues in the everyday language of programmers and engineers. While the original insect is no longer alive, the term it helped popularize remains a central part of software development, reminding practitioners that even the smallest physical object can influence the way we think about technology.