Punch Cards

Before the Commodore 64, the IBM PC, and even the Apple I, most computers took input data from a type of non-magnetic storage medium that is rarely used today: the punched card. These pieces of cardstock held programs, data, and pretty much everything used to run computers in the before-time. But with all of that paper floating around, how did a programmer or user keep up with everything? Enter the punch card sorter and [Ken Shirriff[‘s eloquent explanation of how these machines operate.

Card sorters work by reading information on the punched card and shuffling the cards into a series of stacks. As [Ken] explains, the cards can be run through the machine multiple times if they need to be sorted into more groups than the machine can manage during one run, using a radix sort algorithm.

The card reader that [Ken] examines in detail uses vacuum tubes and relays to handle the logical operation to handle memory and logic operations. This particular specimen is more than half a century old, rather robust, and a perfect piece for the Computer History Museum in Mountain View.

It’s always interesting to go back and examine (mostly) obsolete technology. There are often some things that get lost in the shuffle (so to speak). Even today, punched cards live on in the automation world, where it’s still an efficient way of programming various robots and other equipment. Another place that it lives on is in voting machines in jurisdictions where physical votes must be cast. Hanging chads, anyone?

40 thoughts on “Punch Cards

  1. We used punch cards in my first CS class, as well as cassette tape in later years. The first missile system I maintained used a punch tape to load it’s software. Fun stuff…

      1. When I was an undergrad, the University’s computers were IBM’s using punchcards. I witnessed an engineering student nearly collapse in tears one windy day when he dropped a card deck that must have been two, two and a half foot thick. (it was a week before the end of the semester, ISTR it was a sizeable chunk of his senior project)

        Numerous bystanders (including myself) were running all over the mall chasing cards.

        I was lucky, my dad worked for a place that had their own card punches; I was able to go in and use them to work on my programs instead of waiting ’till 3AM to use the university’s when they got busy.

        1. And that is why I always labelled mine. I got a stamp thing that automatically advanced the number on it when you press down (similar to the stamps that librarians used). In the business world, I had one of those auto-numbering punch card printers and a line printer. Whenever I’d print to card, I would tee its output to the line printer, giving me a proper, and exact, backup. If I ever dropped the card stack, it was a simple matter of sorting the cards by their serial number, which was also its line number on the print out.

        2. I hope he had heard of the trick I learned when I started working with punch cards: Draw a diagonal line across the top of the card deck. That way, if the deck gets dropped, it’s pretty easy to put everything back in order, and to identify where cards were missing (in which case, you prayed that you had a recent printout of the deck so you could rekey the missing cards…)

          This trick certainly saved my bacon a few times!

  2. I prefer the term dangling chads. I can’t remember exactly but I think we went to a Boeing Open House event or my Dad knew someone a ways back, but I remember being there and filling out a form or card that was then punched and fed into a large machine (computer?) in it’s own room behind a glass wall that printed out our names in large letters in ASCII on a large banner using continuous feed paper. Fun stuff for a kid.

  3. The first time you dropped the stack of cards holding your program you learned to include sequence numbers on the cards, especially with a 24 hour turnaround to run a compile!

          1. I found it hard to line up two edges perfectly so ignored smaller miss-alignments of the top edge. The side edge was more important because a missed card or cards took forever to re-locate manually so I focused on aligning the side edge so that no cards were missed.

            I then drew two diagonal lines that were deliberately not parallel. This way the space between the two line indicated order even when the top edge was miss-aligned.

            That’s one of my (now) totally useless skills lol.

  4. Entered my very first programs using scrap- and punchcards way back in the late 70’s. Then our school got a Teletype with 1200/75 (!) baud modem and the future had arrived.

  5. Although punch cards were being used well into the Eighties as input for computers, card sorters were mostly used in unit record machine data processing where there was little of what we would recognize as ‘computing.’ Cards were passed through a number of different state machines, where they would be sorted, collated, gang punched, repunched in dedicated summery and multiplying machines, and finally tabulated and printed. Of those machines the key punch and the sorter were the last to go.

  6. In my first job (in high school) I used an older model of sorter than the one in the video. (but newer than the one in the picture that leads the article.) In my first real programming job (in 1977) the usual workflow had people preparing things on punch cards. Luckily I managed to cobble together a standalone system so I could use an actual text editor. Teco no less.

  7. What is the sorting criteria for punch cards, and why do they need to be sorted? Isn’t the stack supposed to be in the order of the code lines written by the programmer, each card with a line of code, like the rows of code in a text editor?

    1. Program code on punched cards was a relative latecomer. The initial “killer app” was the US Census of 1890, and each card held one record. Card sorters (aka tabulating machines) were used to filter, sort, and group by various fields on the cards — basically a mechanical precursor to SQL.

      1. Actually the initial “killer app” for punched cards was Jacquard’s loom, about a century prior. As for programing while indeed they were not used for such until the mid Forties, Babbage and Lovelace had planned to use them for just that in the Analytical Engine.

  8. I wrote cobol programs in pencil on coding sheets. These were taken to the data prep area where dozens of women typed them out printing one card per line. The programs could be long enough for it to be distributed between several data prep stations. The cards would then be sorted and by line number and put in a box that was taken to the computer room for compilation. The sorter as a valuable resource and I recall one poor sod dropped a box of cards and was made to hand sort them, by eye. ie he had to hold the card up to the light and read the line number from the holes. In later years the data prep stations actually printer the line in text along the top of the card. Those were the days. With a 24 hour turn around on compiles a single mistake cost you some very angry words from your boss. Desk checking was paramount.

  9. Both CS classes in high school (RPGII and COBOL) utilized punch cards. This was in the 80’s! I got the honor of being the go to guy for jam clearing and machine maintenance on the punch card entry machines.

    Our trick to keep programs intact? LARGE THICK RUBBER BANDS!! On the smaller programs, then you’d use boxes with lids and rubber bands on the larger end of year type projects.

  10. I had Al Kossow yelling at me in big capitals about calling it punch cards on the cctech mailing list once. He insist on calling them PunchED cards, as they are formerly known. As I live in The Netherlands the direct translation from the dutch “Ponskaarten” is punch cards, not punched cards. they oly become punched cards after you have punched them. :-)

  11. We were just about the last class to use IBM punchcards for the FORTRAN course at NJIT, early 1990’s. When you went to pick up your (run) program, sorted into alphabetical pigeon-holes, you knew in an instant if the program ran. If the cards were wrapped in in thin, sheet of printout paper, you knew the program had crashed. The printout would simply state the card that stopped the run, and a description of the error. Usually, just a “Syntax Error” remark, it was your problem to figure out what the syntax error was. If the cards were wrapped in thick layer of printout paper it usually meant success.
    If the program didn’t run it was back to retyping the card(s) that held the error…and resubmitting. On a good day the turnaround time was an hour or so, during busy times (like when everyone is trying to finish assignments, 12 hours was more typical.

  12. Any recommendations for a card puncher? I keep wanting to roll my own for fun but I can’t figure out a design that’s is repeatable and consistent. Any time I try to look for something vintage that I think I might be able to retrofit for smaller playing-card sizes (because they’re dog cheap in bulk), I wind up pulling a ton of results for scrapbooking punches.

    1. I’ll have to pull it out from the basement to find its model number, but I have an old IBM card puncher / ink stamper that had an RS-232 interface and you’d send it 1000 bytes of data. The first twenty would get printed along the edge and the remaining 80 would get punched. No control characters, so a bit of a pain when an extra character gets inserted but other than that, it was awesome.

  13. OK, everyone has one, so here’s *my* punch card story. This one is circa 1972.

    I’d written a program to play tic-tac-toe on a Litton Monroe desktop calculator. Once debugged, the program was manually transcribed onto punch cards using a stylus to punch out pre-embossed “chads”.

    These were standard IBM punch cards but were dark brown color and in rather short supply. When a mistake was made or an edit needed, I sometimes used scotch tape and an Xacto knife to stick a “chad” back into a hole in the card.

    Finally my program was complete, and I was to demo my program to my SciFi class as an example of Artificial Intelligence to expect in the future. To make certain that I wouldn’t have a random chads fall out I took my program “deck” (4 punched cards) to the county school data processing center, and the guy ran them thru the card punch machine and made me a duplicate set on regular manilla IBM punch cards.

    The problem is, the new cards didn’t work! The old set still did. What gives?

    Turns out the card reader was optical, and while the brown cards blocked the light correctly, the translucent manilla duplicated cards often let too much light thru, and falsely read as punched holes. The solution? The art department. One of the students, proficent with an airbrush, blackened my manilla IBM cards with India ink. Once dried, they read perfectly.

    My tic-tac-toe demo worked and was a great success, but no one heeded my warnings about the perils of AI, and today we are enslaved by Google and Skynet. OK, I made up that last part…

    …or did i?

  14. In the Nazi camps, the prisonners had an identification number tattooed on the right arm.

    This was the number of their IBM puchcard containing all the data needed to proceed to the detention including a code number for the reason why they where arrested (Jew, Political, Homosexual, Gipsy, Common law…)

    The regime had bought a lot of IBM electro-mecanical computers from IBM’s subsidary in Germany named Hollerith.

    https://en.wikipedia.org/wiki/IBM_and_the_Holocaust

Leave a Reply to Nate OceansideCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.