September 9, 1947

The first actual case of a computer bug was found. Operators traced an error in the Harvard Mark II computer to a moth stuck in a relay.


Cambridge, United States | Harvard University

Watercolor painting based depiction of The first actual case of a computer bug was found. Operators traced an error in the Harvard Mark II computer to a moth stuck in a relay. (1947)

The First Documented Computer Bug - September 9, 1947

On September 9, 1947, computer history was made with the first documented occurrence of a “computer bug.” This event took place at Harvard University’s Computation Laboratory when operators encountered a malfunction in the Harvard Mark II, a significant relay-based computer system used to advance the field of computing.

Discovery of the Bug

While the team was testing the Mark II, they traced an error to a physical obstruction within the machine. Upon investigation, they discovered a moth trapped in Relay #70 in Panel F. This was noted as the “first actual case of a computer bug” after they removed the moth and taped it to the computer’s logbook. The operators humorously recorded that they had “debugged” the system, despite the prevailing use of the term “bugs” to describe mechanical glitches before this incident.

Broader Context

  • The Mark Series: The Harvard Mark II was part of a series of electro-mechanical computers developed by Howard Aiken and his team at Harvard. These computers were precursors to the modern digital computers, utilizing a mix of mechanical and electronic components.

  • Innovation in Computing: The incident underscored the complexity and challenges faced by early computer engineers. The Mark II was an innovative step from its predecessor, the Harvard Mark I, and was instrumental in complex calculations during a burgeoning era of computing technology.

  • Cultural Impact: The term “bug” had been used before in engineering to signify a flaw or defect, but this incident immortalized it in the realm of computing. “Debugging” has since become a fundamental aspect of programming, further cementing this event’s place in computing lore.

Aftermath and Significance

This occurrence is considered a landmark anecdote in computer history, as it was humorously emblematic of the new frontier that computer science was exploring at the time. Although the term “bug” was already part of engineering vernacular, this event vividly illustrated the literal possibility of bugs interfering with machinery, thereby popularizing the concept across the blossoming field of computer science.

The log entry of the moth, with the moth still taped to it, is preserved in the National Museum of American History of the Smithsonian Institution, serving as a testament to the serendipitous origins of one of the most common terms in technology.