It’s all in the holes

Computing with punched cards

How much does a software program weigh? Today this question is meaningless: we measure software in megabytes, not in kilograms. But it wasn’t always like this.

A deck of punched computer cards

The photo above shows a software program from 1975 that weighs 1.285 kilograms. It performs some research task related to evaluation of atomic masses of various isotopes, a complicated subject in theoretical physics. It was one of many created in the 1970s by a graduate student of my late father, who was a professor of physics; and it exists as a deck of punched cards. Fortunately I salvaged this one for my collection.

This card deck contains some 360 cards. All conform to the standard format set by IBM in 1928: eighty columns of rectangular holes in a 7⅜ × 3¼ inches card. They do, however, differ in function. Here are some examples from this particular deck:

A Job Card

A Job  punched card

This card is about bookkeeping, not computing. It was issued to the user as validation of their right to use (and be charged for) computer resources. Its location at the front of this deck for over 50 years explains the damage caused by paper eating insects – probably silverfish.

A Control Card

A control punched card

Control cards are green (for human signaling; the computer couldn’t care less) and contain various Job Control Language (JCL) commands that direct the operating system how to deal with the program. The one shown here reads:

    //  EXEC  FORTGCG,REGION.GO=128K

This means “Execute the FORTGCG procedure, allocating 128K of memory to the GO (program execution) step”. FORTGCG would compile the FORTRAN code in the next cards and execute it.

A FORTRAN Instruction Card

A FORTRAN instruction punched card

The deck contains 55 program cards, each containing one command in FORTRAN, the language of choice for scientific applications at the time. This one reads:

    INTEGER*2 A(1400),Z(1400),N(1400),ERR(1400),NAM2(1400),ZC,NC,AC,

which declares five arrays of 1400 2-byte integers, and three 2-byte integer variables.

A Comment Card

A Comment punched card

In FORTRAN a card with a C in column 1 is a non-executable comment. This one, from the front of the deck, gives the purpose of the program, if somewhat cryptically:

    C   CALC O-C ( WAPSTRA’S MASSES – OUR MASSES )

(A.H. Wapstra was a Dutch physicist renowned for his work on atomic mass evaluation).

A Data Card

A data punched card

There are 300 cards containing numerical data that the program is to operate on. As is written on the deck, these contain Wapstra’s masses sorted according to atomic number Z; presumably each represents various data for a different isotope.

An End of Job Card

An end of job punched card

This is the last card, and only says // , which instructs the system to stop reading cards and do its thing. Note the blue color and the reversed location of the cut corner, which would give the computer operator a visual and tactile cue that this job ends here.

The encoding of information in the holes of a card was simple: each column held up to 3 holes and represented a character, and there were 80 columns. The following diagram shows the meaning of the hole patterns; note that they are also printed in human-legible form at the top of the card. Of course one could punch more than 3 holes per column, creating artsy patterns or even a “lace card” that had holes in all positions (and would jam the card reader).

Encoding of IBM punched cards

These cards hold fond memories for me from my student days in the early 1970s. We used them to submit jobs to the mainframe computer, and how that worked is a far cry from today’s coding practices. Remember, the computer in question was a batch processing behemoth that occupied a large climate-controlled room its own building, cost millions, and was only physically accessible to specially trained technicians. We wrote our programs on paper forms, then punched them onto cards using a key punch; then they were submitted to the computation center and we’d come the next day to retrieve the results on fan-fold paper. Any errors – and of course there were errors – meant we had to replace some cards, re-submit the job and wait another day.

The key punch, incidentally, was a very cool desk-sized machine, the model seen in this photo:

IBM 029 key punch

Image source: G. Glenn Henry, under CC license

What I most remember from using this machine is the satisfying “Ka-chunk” sound it made as you hit each key. None of today’s wimpy inaudible keyboards! The blank cards went in the tray on the right, and would end in the tray on the left. In the middle was a very ingenious “program drum” around which you could wrap a specially punched card that would apply special processing to specific columns on all the cards you punched, such as skipping columns or duplicating data. This also opened the way to a variety of cool, if totally unproductive, creative pursuits!

You can see this amazing (and noisy) machine in action in this video.

All these cards were made by the millions, so they are nostalgic but not rare. But the item in the next photo is as uncommon as it is cool:

This is a punch registration gauge, which was used to calibrate the punches so the holes came out in the exact positions expected. You’d jam a punched card against the stops and verify the black rectangles fill the holes.

Although they were frequently called “IBM cards”, punched cards go much further back. The concept of encoding information in holes is at the heart of Joseph-Marie Jacquard’s automatic loom of 1801; his cards were used to encode colorful patterns in the cloth being produced.

Herman Hollerith, whose Tabulating Machine Company later became part of IBM, took Jacquard’s idea and applied it in 1890 to census data, and then IBM ported it to computing.

Incidentally, those cards were an amazing reource. In order for the computers to run reliably while gobbling them by the thousands, the cards had to be resistant to wear, and were therefore made from thin, strong cardboard stock, which made an excellent raw material for crafts projects and other household uses. Here is a castle I built back then from these cards (except for the internal scaffolding which was made from thicker cardboard).

A castle model crafted from punched cards

Exhibit provenance:

  • The punch registration gauge came from the collection of the late Bob Otnes, an accomplished engineer and a master slide rule collector.
  • The punched cards have been gathering dust in my basement for decades…

More info:

Leave a Comment