Home / Trivia / Tech & Games

What was the first literal computer 'bug'?

Confirmed Computing · Verified 2026-10-31 · WWV-TV-TG-003

Answer

A moth stuck in a Harvard Mark II relay in 1947

Operators taped it into the logbook. The term 'bug' for glitches was already used by engineers.

Context

The Mark II was an electromechanical computer built at Harvard under Howard Aiken, and it used many relays. In 1947 operators found a moth lodged in one of them, removed it and taped it into the logbook with the note 'first actual case of bug being found'. The page is held by the Smithsonian's National Museum of American History.

The joke only works because 'bug' already meant a small machine fault. Engineers had used the word that way for generations, and Thomas Edison wrote of 'bugs' in electrical apparatus in the 1870s. The logbook entry is funny because this was a literal insect, not because it coined the term.

The anecdote is often attached to Grace Hopper, who worked with the Mark II team and later helped popularize 'debug' in computing. Museum accounts indicate the logbook was probably not in her handwriting, and she did not personally find the moth. The date usually given is 9 September 1947. The relay panel is a reminder that early computers were physical machines whose faults could be physical too, and that the word was later reabsorbed into software, where a bug is a flaw in code rather than an insect.

More in Tech & Games

Open the interactive trivia