How a Moth Could Stop a Computer

Harvard’s Mark II was not a computer of tiny silicon chips. It was a room-sized machine built from electromechanical relays: switches that used moving parts to direct electrical signals. A relay had to open and close reliably for the machine to carry out its calculations. If a contact was blocked, the signal could go the wrong way—or fail to go anywhere.

In 1947, operators investigating a problem in the Mark II found a moth trapped in one of the relays. The insect had interfered with the switch, turning a small physical obstruction into a fault in the machine’s operation. The team removed it and taped it into the logbook, noting: “First actual case of bug being found.”

A Physical “Bug” Becomes a Computer Story

Engineers had used bug informally for a flaw or trouble in a system before the moth incident. What made this episode memorable was the literal specimen: a machine fault had, unusually, been caused by an actual insect. The logbook entry gave the wordplay a tangible record, and the story helped make “debugging”—finding and fixing faults—a vivid part of computing’s vocabulary.

The moth did not represent a mysterious failure deep inside the machine. It showed how directly the Mark II’s calculations depended on physical hardware: a tiny object in the wrong place could interrupt a chain of switching on which the whole computation relied.