# What do the numbers on the punch cards mean?

Does anyone know what is the meaning of the numbers in punch cards? I need an example of any language, it's important for me to understand which information could be manipulated.

• It might be helpful if you could explain what exactly you're looking for, as well as what's the intended usage. Punch cards are a quite wide field with many many different use cases. Jan 16, 2019 at 20:35
• As far as any computer is concerned, there are no numbers on punch cards -- just holes. Jan 16, 2019 at 21:53
• This is really the type of question where a picture is mandatory. numbers can be in a several places and with several functions. (And, as already been pointed out in several places, the numbers written on the card is not read by the card reader.) Jan 17, 2019 at 7:50
• This is a link-only response, so wouldn't pass muster as an answer: Douglas W. Jones's punched card index has almost everything you could ask for. As he writes: “There were multiple mappings between the 12 holes of one card column and the character sets of various machines and keypunches.” For pre-computing tabulation applications, Punched cards; their applications to science and industry shows many ways that punch cards were used for record management. Jan 17, 2019 at 13:26
• @SolomonSlow: Punched cards were used by Jacquard Looms in the 18th century. Predating computing. Jan 17, 2019 at 18:20

Fundamentally the card is just an 80x12 array of bits (punch = 1, no punch = 0) and it's up to the system reading the card to interpret them. For example, the IBM 701 could read a card in "binary" mode, which interpreted the card as 12 rows of 72 bits (the rightmost 8 columns were ignored). Each 72-bit row represented two 36-bit machine words, which could be data or a pair of 18-bit instructions. This article describes a single-card boot loader for the 701 that was used to load larger programs from a stream of cards.

(As an aside, this is why early FORTRAN versions imposed a 72-character limit on source lines: the first FORTRAN compiler ran on the 701's successor, the IBM 704, which could only read 72 columns of a card - see p. 39 of the 704 Manual of Operation (31 MB PDF). As others have noted, the 8 ignored columns were often used to encode a sequence number for each card, which could be a lifesaver for the unfortunate programmer or operator who dropped a card deck on the floor.)

Normally though the card would be interpreted as representing 80 characters, one per column, in a binary-coded decimal (BCD) format. While they could have treated each column as a 12-bit integer which would have given 4096 possible characters (prehistoric Unicode, anyone?), a simple BCD encoding would treat it as two fields: a decimal part in rows 1-9, where a single row was punched to represent that digit, and a "zone" using rows 0, 11 and 12, which allows four values (one of the three rows punched, or no row punched).

In theory this would give you 36 characters to play with (4 zone values times 9 digit values), but real BCD encodings allowed multiple punches in the decimal field so you'd typically have 48 or 52 characters: there's a nice example in this description of the IBM 026 card punch, and Wikipedia lists many more encodings. Note that a column with only row 0 punched has an obvious interpretation as "no zone, digit 0" but strictly speaking it's "0 zone, no digit" which was used to encode the numeric character 0.

As another aside, once you've seen how the structure of BCD character sets relates to physical cards, the layout of EBCDIC starts to make a little more sense. But only a little.

• The last time someone claimed the card reader on a 701/704 could not actually read more than 72 columns, it was downvoted, despite the existence of manuals saying so. Link here
– dave
Jan 17, 2019 at 0:25
• I think the distinction being pointed out there is that the card reader itself can read all 80 columns, but it's the 701/704 host that can only transfer 72 bits per row to core (the manual page I referenced does say that the reader(?) control panel can be wired to present any 72 of those 80 columns to the host, not necessarily columns 1-72), So to be accurate I should probably say "early FORTRAN compilers" since it's an implementation-specific limit that became enshrined in the language standard. Jan 17, 2019 at 0:38

Does anyone know what is the meaning of the numbers in punch cards? I need an example of any language, it's important for me to understand which information could be manipulated.

It's not entirely clear what you mean by numbers. Is this about the numbers printed on the cards, or how numbers are encoded?

In general, punch cards do not encode any binary code, but characters (*1), based on a decimal code. Each character is encoded in one (of usually 80) columns. In the beginning punch cards were only meant to encode numbers and had 10 rows, numbered from zero (0), at the top, to nine (9), at the bottom. To hold a number, one and only one hole was punched for each column, at the according position.

Later on, the code was extended to cover letters and other symbols as well. To do so the space above the zero row, originally intended to be printed on or hold instructions, was used for two additional punching positions called 11 and 12 with 12 being the topmost. A decimal code grouping the letters in 3 groups of 9, 9 and 8 was developed. To punch a letter its basic row (1..9) within the group was punched, plus a hole in row 12, 11 or 10 (when encoding letters row zero (0) was called row 10) as follows:

``````A..I  ->  Row 12 + Row 1..9
J..R  ->  Row 11 + Row 1..9
S..Z  ->  Row 10 + Row 2..9  (*2)
``````

Except for a few early symbols (*3), encoding for symbols differed a lot between manufacturers and systems. In the long run IBM's basic encoding became standard within the mid 1960s. Here most symbols are identified by a punch in Row 8 plus a combination of 10..12 and 2..7 making it three holes per column (*4).

There are also standardized punch sequences for extended codesets as well as special usage, adding encodings with up to 6 holes per column. But that as well needs a separate look, depending on what you want to do with it.

*1 - There are also encodings based on properties but that's custom and a complete different story.

*2 - Since only 26 or the 27 available combinations are needed, one stays unused. By choosing the 10+9 combination as such, the encoding made sure to keep a minimum distance between two holes at two rows, thus working more reliably on weak paper or worn out cards.

*3 - Like minus which was a single 11 punch

*4 - Emphasis on most, as there are also a few dual punch symbols.

• IBM computers also supported "column binary" mode for pure binary data. The 2x12 hole positions on two adjacent columns stored 3 8-bit bytes of data in pure binary - no hole for a zero bit and a hole for a one bit. If course this created rather fragile cards, with 50% of the hole positions punched on average! Jan 16, 2019 at 20:50
• @alephzero Interesting, I worked for 25+ years on /370 mainframes and never ever seen the format you mention. Not even read in a manual or program or heared form the usual 'back then' stories by older peers. Sure, there where several binary or binary like formats encoding one binary byte per column, but no 24 bit one. I'd put it on the list of many custom formats - after all, one could control a punch in raw mode - and read cards in raw mode. Jan 16, 2019 at 21:03
• @alephzero, You might want to avoid using an 029 keypunch to duplicate those "column binary" cards. At least anyway, don't try using an 029 to duplicate lace cards. (Don't ask me how I know!) Jan 17, 2019 at 19:45
• @alephzero: I wonder if there were any binary formats that were designed to avoid excessive punches. For example, one could encode 8 bits per column by using three rows per two bits: no punch would represent 00, a punch in the first row would be 01, second row 10, and third row 11. Thus, a maximum of four punches would be needed per octet, and no more that two consecutive punches would appear in any column. Mar 12, 2020 at 18:43
• @supercat there may have been some. After all, readers usually supported modes to read 'raw'. But I guess there were few. Also, IBM defined punch codes with a maximum of 3 holes for all 256 EBCDIC codes - see above. So a 1 byte per row coding was no issue. But the main point here is that binary wasn't an issue back then. 99.9% of all card stack were data, which always was character based, not binary. Mar 12, 2020 at 21:42

Just as a FYI, prior to buying a handful of Apple ][s, our school programming lessons used marked cards. In essence these were similar to punched cards except that you used something like a 2B or 4B pencil rather than making a hole. This had the advantage that, when the inevitable syntax/programming errors were returned to you a week later, you could erase and reuse the cards.

The ones we used were marked out for BASIC with, IIRC, sections for line numbers, key words and then the rest of the line: probably very similar to this one

• How inventive! What kind of device was used to read such cards? Mar 12, 2020 at 15:57
• Generally, an optical card reader. The technology usually goes by the name 'mark sense'.
– dave
Mar 12, 2020 at 16:23
• @LeoB - I checked; you read the card correctly! Dartmouth BASIC, the original BASIC, ignored spaces -- see page 4. We can assume this implementation did too..
– dave
Mar 13, 2020 at 0:47
• If you gotta program, you gotta program. I used a Port-A-Punch to write Fortran. Though since we only had one to go around, mostly I made do with a homemade variant: straightened paperclip glued into old ballpoint pen, on slab of packing styrofoam.
– dave
Mar 13, 2020 at 12:03
• I can recall doing the same with the same type of card as shown, & others, in the mid to late 1970s. We were using them to write BASIC-PLUS programs a DEC PDP 11/70. However, we were instructed to use a HB pencil. For cards that only had numbers in the boxes were had to use the DEC 029 card code.
– Fred
Nov 27, 2023 at 6:20

The answer may depend on which format you are referring to. For the IBM 80-column punched card, I found this information from this wiki link

...alphabetic and special characters was added through the use of columns and zones. The top three positions of a column are called zone punching positions, 12 (top), 11, and 0 (0 may be either a zone punch or a digit punch).[46] For decimal data the lower ten positions are called digit punching positions, 0 (top) through 9.[46] An arithmetic sign can be specified for a decimal field by overpunching the field's rightmost column with a zone punch: 12 for plus, 11 for minus (CR).

But, as you read further down, the "zones" differ in meaning.

As for manipulation, I'm not sure. The few times I got to use punch card systems, any change in data or code required creating all new cards.

The order the cards were fed into the system made a difference too. It was common to number the cards sequentially in case the cards became disorganized (like from from dropping them on the way to class)