Punched Cards

Interactive Card Punch Simulation Applet, click here.

A blank card


This should be displayed at its exact size if your monitor is set to a resolution of 72 dpi (very common). The dimensions should be Seven and three eighths inches wide and Three and a quarter inches high.

Programs consisted of large decks of cards. Serious programs were really heavy and would occupy many many yards of shelf space. Cards always had three nice rounded corners and one cut off sharply (usually the top right as with this one), so that you could easily tell if one had been put the wrong way round. Once the cards were assembled in order in a deck, the programmer would usually draw a long diagonal line across the top edges of the cards, so that if ever one got out of order it would easily be noticed. If you ever dropped a deck of cards, it would probably be faster to retype the program than to try to sort them all out. This was in the days when discs were not big enough for long-term storage of programs.

The card is divided into 80 columns (just like a standard VDU screen) and 12 rows. On this card, only 10 rows, numbered 0 to 9 are printed, the top two are invisible, but you can see the space left for them. The top row was called 'R' (or sometimes '10' or '&'), and the second row was called 'X' (or sometimes 11, or '-'). A card could hold a single line of up to 80 characters of text. Characters were represented by punching out 1, 2, or 3 of the 12 possible positions in a column in various combination. Here is a punched card containing the Fortran statement "   99 STOP".

Some card punches were nice enough to print the equivalent text along the top, like this one, but many didn't; you had to learn to read the combinations of holes.

Many programming languages were designed specifically so that lines of code would be a maximum of 72 characters long; the extra 8 characters on a punched card would be completely ignored. This meant that programmers could punch a sequence number on each card, so that if they were ever dropped they could run them through a collating machine to sort them into order. Collating machines were big expensive luxuries that most installations didn't have.

This is the (fairly) standard code for converting characters to holes (if you want to be exact, its the "ICL 1900 Punched Card Code", which was used by all ICL 1900 series computers, which were very popular in the early 1970's):
 Char  Holes     Char  Holes     Char  Holes 
spacenone FR,6 -X
00 GR,7 "X,0
11 HR,8 /0,1
22 IR,9 +R,2,8
33 JX,1 .R,3,8
44 KX,2 ;R,4,8
55 LX,3 :R,5,8
66 MX,4 ,R,6,8
77 NX,5 !R,7,8
88 OX,6 [X,2,8
99 PX,7 $X,3,8
&R QX,8 *X,4,8
#3,8 RX,9 >X,5,8
@4,8 S0,2 <X,6,8
(5,8 T0,3 (a)X,7,8
)6,8 U0,4 £0,2,8
]7,8 V0,5 ,0,3,8
AR,1 W0,6 %0,4,8
BR,2 X0,7 ?0,5,8
CR,3 Y0,8 =0,6,8
DR,4 Z0,9 (b)0,7,8
ER,5
(a)=arrow pointing upwards.
(b)=arrow pointing left.


There are no lower case letters or funny-brackets or any of those other new-fangled symbols because we didn't have them. You may notice there are exactly 64 codes in the table. That's because the ICL 1900s used a sixbit code (i.e. 6 bits to represent a character, therefore a total of 64 possible characters). That's why old programs tend to shout at you in capital letters, they had no choice.