In 1947, Harvard’s Mark II ran on roughly 13,000 electromechanical relays, stored numbers across 100 registers, and read instructions from punched paper tape, turning thousands of clicking metal switches into a Navy calculator vulnerable to dust, loose contacts, and one famously misplaced moth

In 1947, Harvard’s Mark II ran on roughly 13,000 electromechanical relays, stored numbers across 100 registers, and read instructions from punched paper tape, turning thousands of clicking metal switches into a Navy calculator vulnerable to dust, loose contacts, and one famously misplaced moth Featured Image

Harvard’s Mark II began solving test problems in July 1947 with approximately 13,000 electromechanical relays clicking inside it. The machine could perform eight additions, four multiplications, and twelve transfers every second, while its 100 relay registers stored roughly 1,200 decimal digits.

Those figures came from a contemporary description of the machine published shortly after it was built. They describe a computer whose arithmetic depended not on microchips or electronic memory, but on thousands of physical switches opening and closing in carefully arranged sequences.

The famous moth found inside Relay 70 was therefore more than a comic accident. It exposed the physical nature of early computing: every number, instruction, and intermediate result ultimately depended on clean pieces of metal making contact at exactly the right moment.

A calculator built from 13,000 switches

An electromechanical relay is a switch controlled by an electromagnet. When current passes through a coil, the magnetic field pulls a small metal armature into a new position, opening one electrical path or closing another.

One relay can make only a simple decision. Connect thousands of them through carefully designed circuits, however, and those individual switches can store numbers, transfer values, choose instructions, and perform arithmetic.

The Mark II contained approximately 13,000 relays of a new high-speed design. Contemporary accounts said an individual relay could operate reliably within one-hundredth of a second, although a complete calculation required many relays to work together in sequence.

The machine had 100 relay registers that collectively held about 1,200 decimal digits. Numbers were normally represented with ten significant decimal digits and a movable decimal position, allowing the Mark II to work with values ranging from extremely small fractions to numbers in the quadrillions.

This was an important break from the Harvard Mark I. As the IEEE Computer Society’s account of Howard Aiken’s machines explains, the earlier calculator relied heavily on electromechanical counters and rotating mechanisms, while the Mark II used relays for its numerical storage as well as its control circuits.

Relay computers were not unique to Harvard. Six years earlier, Konrad Zuse had demonstrated the Z3 in Berlin using roughly 2,000 telephone relays, showing that a programmable calculator could be assembled from switches originally developed for communications equipment.

Two complete calculators inside one machine

The Mark II was not simply one enormous calculating unit. It contained two substantially identical calculators that could operate separately on different jobs or be connected when a larger problem required the resources of both halves.

That arrangement gave its operators a form of flexibility that was unusual for the period. One side could continue processing a problem while work was prepared or checked on the other, reducing the amount of time for which the entire installation had to sit idle.

Programs did not sit inside electronic memory. Instructions entered through punched paper tape, with patterns of holes telling the machine which operation to perform and which registers to use.

The Mark II could consult eight tape feeds for numerical data and four tape feeds for instructions. According to the contemporary technical description, it could read one number and one instruction from paper tape in approximately one-thirtieth of a second.

The result was a machine that was programmable but not easily editable. Changing a sequence could mean preparing a new length of tape, checking the holes, feeding it through the reader, and watching closely to see whether the physical machine followed the intended path.

Software was still something an operator could hold. Decades before Apollo programs were woven into rope memory by hand, the Mark II’s instructions travelled through the room as long strips of perforated paper.

The Navy needed mathematical tables

The Mark II was built for the US Navy rather than as a general university experiment. In November 1944, the Bureau of Ordnance asked Harvard’s Computation Laboratory to design an automatic digital calculator for the Naval Proving Ground at Dahlgren, Virginia.

The request grew from the volume of calculation required to produce firing and range tables. Artillery trajectories depended on variables including elevation, velocity, distance, atmospheric conditions, projectile design, and the changing behaviour of a shell during flight.

Before automatic calculators, teams of human computers worked through such equations repeatedly. Even when each individual calculation was manageable, producing a useful table across many possible ranges and conditions could consume an enormous amount of labour.

Clinton Bramble of the United States Naval Academy helped push the project forward because he believed the Navy had to move beyond hand calculation when producing range tables. The Naval Postgraduate School’s history of its mathematics department preserves his account of why the Mark II was commissioned.

The machine was built and tested at Harvard before being delivered to Dahlgren in 1948. There it joined a naval installation that was becoming one of the country’s most important centres for automated scientific and weapons calculations.

Programmer Ralph Niemann later remembered the Mark II as a room-filling machine with moving paper tape and constant clattering from its relays. His recollections, preserved by the IEEE Computer Society, describe a computer whose operation could be watched and heard as it worked.

Eight additions every second

The Mark II’s speed sounds microscopic beside modern hardware. Eight additions per second would now be too slow for even the simplest consumer device, but in 1947 it represented a substantial increase over calculations performed manually or through slower mechanical equipment.

The machine could also complete four multiplications and twelve transfers each second. Division was handled through repeated approximation using the operations the calculator already performed, rather than through a single dedicated division mechanism.

Its speed came from making thousands of relays act as one coordinated system. An individual switch might change position in one-hundredth of a second, but arithmetic required values to move through a succession of registers and control circuits before a result emerged.

The Mark II was described at the time as at least twelve times as powerful as the Mark I. It also demonstrated how quickly computer architecture was changing, even while engineers were still building machines from mechanical contacts and paper tape.

Within a few years, vacuum tubes and electronic storage would begin displacing relay-based designs. Later machines such as the IBM 305 RAMAC would place millions of characters on spinning magnetic disks, making the Mark II’s 100 relay registers seem like a narrow ledge of memory.

The moth found the machine’s weak point

On 9 September 1947, while the Mark II was still undergoing tests at Harvard, operators recorded trouble in Relay 70 on Panel F. Inside the relay contacts, they found a moth.

The insect was removed and taped into the operations logbook beside the handwritten observation, “First actual case of bug being found.” The page is now held by the Smithsonian’s National Museum of American History.

The incident did not create the engineering term “bug,” which was already in use. For the Mark II itself, the more revealing fact is where the moth was found: between physical contacts whose ability to close cleanly determined whether part of the machine worked at all.

A speck of dirt, a worn contact, a loose connection, or a trapped insect could interrupt a signal. Troubleshooting therefore required operators to understand both the mathematical sequence on the tape and the physical route electricity followed through thousands of components.

The logbook entry records that the machine was in tests, not that the moth ruined a historic calculation. Its preservation matters because it captures the ordinary maintenance reality behind one of the most advanced calculators of its time.

The Mark II’s full technical description eventually filled a 336-page manual produced by Harvard’s Computation Laboratory. A copy is preserved in the Smithsonian’s Grace Murray Hopper Collection, documenting a system complicated enough to require an entire book to explain its relays, registers, tapes, and operating procedures.

The paper tapes no longer race through their readers, and the thousands of relays no longer fill a room with clattering arithmetic. What remains is the image of calculation made physical: ten-digit numbers held in banks of switches, instructions punched into moving paper, and one small moth resting in the exact place where metal was supposed to meet metal.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Make Tech Easier Editorial Team Avatar

Read next

In 1971, engineer Ray Tomlinson sent the first networked email between two computers sitting side by side in the same room — he chose the @ symbol to separate user from machine because it was the only punctuation on the keyboard nobody was using
How did a single computer worm written by a Cornell graduate student in November 1988 crash roughly 6,000 machines and force the internet to invent security?
When you tilt a smartphone, gravity shifts microscopic silicon fingers inside its accelerometer by only a few nanometres, changing the capacitance between them and producing the electrical imbalance the phone reads as a new direction for down
A microwave oven works because water molecules have a slight positive and negative end — the magnetron flips an electric field 2.45 billion times a second, and the molecules twist back and forth so fast the friction becomes heat
The retina of the mantis shrimp carries twelve types of colour receptor to the human eye’s three — and yet experiments suggest it sees colour worse than we do, using the extra channels for speed instead of subtlety
When a lightning return stroke heats a channel only centimetres wide to roughly 30,000 kelvin, about five times the temperature of the Sun’s visible surface, the air expands so violently that the pressure wave rolls across the ground as thunder
In October 1957, a beachball-sized aluminium sphere called Sputnik 1 began sending 0.3-second pulses on two radio frequencies from orbit, signals amateur operators around the world could receive, making the space age suddenly audible from Earth
In 1968, Douglas Engelbart sat before roughly 1,000 computing professionals in San Francisco and demonstrated the mouse, hypertext, video conferencing and shared-screen editing in one 90-minute session, a concentrated glimpse of the interactive computer future later remembered as the Mother of All Demos