13

Computer pioneer Grace Hopper often recounted the story of her team finding the first physical computer bug:

While she was working on a Mark II Computer at Harvard University in 1947, her associates discovered a moth that was stuck in a relay; the moth impeded the operation of the relay. While neither Hopper nor her crew mentioned the phrase "debugging" in their logs, the case was held as an instance of literal "debugging." For many years, the term bug had been in use in engineering. The remains of the moth can be found in the group's log book at the Smithsonian Institution's National Museum of American History in Washington, D.C.

The photo below of the log book states "Relay #70 Panel F". What precise function did this relay perform?

first computer bug

6
  • 5
    This question might be "Are there schematics for the Mark II?"
    – RETRAC
    Oct 30, 2020 at 1:09
  • 5
    @RETRAC: There are, in the Grace Murray Hopper Collection of the Smithsonian. Here are links to the Mark II panel diagram and a badly-organized PDF of random pages from the Mark II User's Manual, with schematics of various parts. However, I haven't yet found the relay in question.
    – DrSheldon
    Oct 30, 2020 at 1:23
  • 19
    "What precise function did this relay perform?" - in this instance it caught a moth. Do you mean what function was the relay supposed to perform? Oct 30, 2020 at 4:34
  • 5
    @BruceAbbott wouldn't that make it a feature and not a bug?
    – HorusKol
    Oct 31, 2020 at 5:26
  • 5
    @Liam, relays do much more than just storage, just as the transistors in modern machines aren't all in memory cells (registers, RAM, etc). It's as likely to be in an i/o unit, for example. May 13, 2021 at 12:31

1 Answer 1

6

Parts of this answer are necessarily speculation, especially since the way the machine worked (and its bizarre programming model) are buried deep in time, or at least deep in various museums(1) :-)

First off, I have to say this behemoth was truly a thing of beauty. The way it was programmed was with a paper tape with each instruction holding parts (practically RISC/VLIW in the general approach):

  • which devices would output to the "bus";
  • which devices would input from the "bus"; and
  • an operation which would be executed or started.

All uses of the calculator boiled down to a sequence of simple operations like adding, multiplying, interpolation, and function calculations. These were used in conjunction with "constant" registers that would use these operations for specific tasks.

The whole thing was driven by a (very mechanical) sequencing unit, using motors and gears to advance the paper tape and use the current tape "instruction" to control every other part of the machine. Hence it was, for all intents and purposes, the clock signal in modern computers:

enter image description here

It appears it was even multi-core since you could dedicate the entire calculator to one task or use the duplication on right and left to do two calculations concurrently.


The following layout shows the various parts of the system.

enter image description here

On the other side of the main "winged" control panel stood the six rather large relay cubicles, which each contained various panels, including panel F in the third relay cubicle, where the moth in question met its glorious and famous end. A non-layout view of the left three relay cubicles (and the left wing) is shown here:

enter image description here

That panel F in the layout did not have a more mathematically obvious labels (such as ADDER, MULTIPLIER, or INTERPOLATOR). Instead, panels F and G were both labelled SEQUENCE, and panel E2 was TRANSFERS AND JUMPS.

So they were all probably responsible for program or data flow, such as controlling flow of information between various other panels, or somehow affecting the "clock generator" shown above.

The image of a JUMP instruction causing a motor/gear combo to back the paper tape up a few feet, rather then just changing the instruction pointer register, seems particularly funny to me (I have no idea how loops were actually done, that thought just popped into my head as one possibility).


(1) Note that all images and most research in this answer has come from either:

  • the Grace Hopper online exhibitions at the Smithsonian; or
  • the Computer History Museum in California.

I'm not affiliated with them in any way but I urge you to visit (or otherwise support) them if you're interested in retro-computing, especially if you're interested in times before the unholy trinity. I visited the CHM about a decade ago and still plan to visit the Smithsonian at some point in the future, assuming the chances of a treasonous insurrection during my visit can be minimised :-)

2
  • 2
    If JUMP relied on moving the tape, then a tight loop could be quite expensive. How did they optimize loops back then? Were they unrolling the loop already back then? Or was there a "loop buffer", e.g. a drum or circular tape loop? Jul 17, 2023 at 6:40
  • Sorry, @user3528438, I meant that as a joke (and have now clarified in the answer). I'm not sure how loops were actually done.
    – paxdiablo
    Jul 17, 2023 at 13:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .