Punch Card Programming - Computerphile
Skills:
Systems Design Basics60%
Key Takeaways
Punch card programming and mainframe computing are explored in this video by Professor Brailsford, with a hands-on look at how punch card systems worked.
Full Transcript
the thing you used to dread more than anything else was to take these out of the box in which you carefully stack them up and they accidentally dropped them on the floor there is no quicker way to discover what n factorial means when you start trying to put them back together in the right order armed only with your knowledge of alol programs and which order these things must have occurred in we have here in the department a leg y deck of Punch Cards dating at my best guess from about 1971 it was left behind by a statistics student of that era Ken Atkin it just is like a blast from the past we'll put this on the classic black background provided by the cover of an iPad what could be better old meets new at the top of the deck we used to have to put a colored card basically stating who we were and what this job was about now I think the first thing to draw your attention to on any sample of these cards is you look at them against the light and if you remember that a card reader is reading vertically to get its characters like that not horizontally the most amazing thing you then discover which threw me for a while because I'd rather forgot it works like this is that if you now put the card down on a black background and we'll use another card as a ruler just look what happens every single character and if you look very carefully as well as the whole pattern that denotes a character it can also be printed out at the top of the card although the printing ribbon was pretty faded about these never mind every every single character has got a different hole punch pattern but there's never more than two holes that are punched now that might seem very strange and as I say it gave me a jolt I thought how on Earth does that get converted into a character code which is going to be a bit pattern representing an asy character or whatever you can't just put asy character punchings down here if you did you'd get into all sorts of problems because some Masky characters have got lots of one bits in them and if the situation is that you chose that every one bit was a hole some characters would make this thing look like confetti it would be like having a a tear off form you know there' be so many holes that the actual mechanical substrate of the card will be very fragile so this is the reason that there are various choices of two holes here out of 11 rows in total and that gives enough combinations to give a unique code for a fairly limited alphabet admittedly but it works so perhaps another thing to point out is that these are cards for an ICL 1900 computer which was mentioned in the previous video the ICL 1900 Series internally did not hold its characters in eight bits as would be done nowadays it held them in six bits so pretty well all of you out there are familiar with the fact that nowadays if you like the standard for years has been that you have a computer whose integers are held in 32 bits but if you want those 32bit entities called words are broken up into four 8 bit bites nowadays it's the bites that are addressed not the words and that particular architecture of bite address machines been optionally groupable into longer units to hold either instructions or integers or whatever that really did start with IBM mainframes they were the first to go in for bite addressing and 8bit bytes ICL on the other hand did not have 32-bit words with four 8bit characters it had 24bit words with four six-bit characters why I hear you cry the answer is it's cheaper you've got rather less memory to provide rather simpler adders to do you only need six bit Adder circuitry not8 bit Adder circuitry and uh it's as simple as that ICL could make their computers a little bit cheaper than IBM although they were arguably as well a little bit slower and so on so this is what these whole punchings are all about they are equating by specialized circuitry in the card reader to it being able to recognize these patterns and to say oh that's the six-bit character such and such and it will put that into a temporary file behind the scenes now when you're preparing these card decks you really did have to take huge care first of all the yellow card announces that this is a job for the computer to do big surprise there there newms there Nottingham University Physics and maths I think that stands for this is Ken's identifier pmsk KA for kenin and I think this thing at the end announces the global Terminator for this deck of cards which will come right at the bottom four up arrows okay then there's a little piece of job control here basically saying I want the Nottingham University Executive program which was our own sort of home brew addition to icl's George operating system and you notice at the end here it says by C in this added module to the operating system you could say how desperately urgent this job was or not you were given a certain number of notional pounds to spend every month for every user and you could opt to spend less money and have it run at low priority but you could either spend it by which means I want the job doing right now or you could say I'll go overnight and you were charged at a much lower rate the next card we see here announces that this is an alol job the following cards will be in the alol language so this is a signal to the operating system that to read all this in but when it's been read in it has to be fed in to the alol compiler and the operating system knows where that's kept you don't unlike Unix Linux whatever these days you don't get very close to the operating system it's there um it doesn't do much for you except run your jobs you just had to trust to it more or less notice here for those of you at all familiar with things like alol and Pascal it's beginning to look fairly sensible begin that's a reserved word in the alol language it's a bit like open curly brace in C but alol use begin and end instead of open curly and closed curly notice that it's signaled as being a reserved special word because it uses prime or single quote symbols it's quote begin quote quote proed your quote that's another reserved word in the alol language and it's defining this procedure e01 AAA with these formal parameters or arguments there we are then you're sitting in front of a card punch you type in just like you would do on a ordinary keyboard these days except this thing is electromechanical so it's going splash splash splash splash all the time every character you hit is punching out holes electromechanically and at the same time is hammering out a typewriter record on the top of exactly what all these holes mean every time you hit the return key whereas even on a dumb terminal you find the cursor going Zonk back from um from the right hand side of the screen to the left as you look at it what would happen when you hit return on one of these is that the card would as if by Magic be taken away from the punching station and propelled I think with sort of compressed air to a catcher tray so one after another you would build up a stack of cards in order that would later be fed into the machine so when it's all completed and of course the advantage is with having these things written out on top if you could see any mistakes on a quick scan through you can always punch another card and replace the bad card with a good card you would end up with a job to be submitted K stack is a particularly short one it just seemed to be running this routine and using it to generate a small amount of data to be printed out so there we are a very uh very small job in order to stay sane what you need to do is the following first of all decide whether card punch like to have these beveled Corners at the top left or the top right faintly recall that ICL and IBM probably did them different ways around but that was the thing to help you get your cards aligned and to stop you turning one accidentally upside down and thereby reading in the wrong hole pattern in the wrong order you used to make sure the bevels were in place like that so that's one self- protection mechanism another one that was optionally available on some better quality card punches was to put at the far right of the card typically I think in columns 72 to 80 because these are 80 column cards you could put a sequencing number here and you could have them automatically sequenced and numbered as you punch them out on the card punch the thing you used to dread more than anything else was to take these out of the box in which you carefully stack them up and then accidentally dropped them on the floor there is no quicker way to discover what N factoral means when you start trying to put them back together in the right order armed only with your knowledge of alol programs and which order these things must have occurred in so all sorts of subtes used to be used but the best was to have them numbered if possible and then if you could afford one of these things there were actually C collating machines where if you put in a randomized deck of cards they could electromechanically sort them for you I can't recall I ever used one of those perhaps I was careful enough or perhaps the university couldn't afford one I don't know another common trick to use was to actually put marker pen markings at the top of these if you did or you wrote a word here you could get them broadly back in the correct order by just making your patterns at the top look correct and you get them back in in roughly the way they should have been so here we have you see a much more substantial alol job I think most of this is programed there's a little bit of data at the bottom and so would you have one of these cards for every line would that be kind of how every line of the program yeah would have a card line and you can only fit one line per card yeah yeah one line per card right at the end of this wodge of stuff let's put it down here as a separate card of its own you see that magic word end and that is the final end of the program and just as in other languages your open and close curly braces can be nested inside each other so also in alol the begin and blocks could be nested inside one another so that end then is the final card of the program but then look what happens you get a four asterisk card the four asterisk is a marker to say that's the end of my program but there's still another section of my stuff to come after four asterisks you give the reserved word data and this is such a simple program I think from what I can make out it takes these three integers here and uses them to generate yet more data which will be of use in some other program so that is it there's the data that's the end of the pack if you had a program that gener erated more data for input to another program a favorite thing you could do was to specify in your job control at the very top that what you would like is not just a line printer output of your answers but to punch out another deck of cards for use in putting it into some other program later on so that that can basically provide you with a set of data to use with a different program yes and you might say well why not just pocket in a disk file you've got to remember this is the early' 70s you did not have a personal allocation of files on disk yes then would be a dis backing up this computer but used entirely by the operating system full of temporary files holding your jobs for you feeding them in in order and all that but in the very early days you in person did not get a personal account to hold your files you want to run something later on then you had to print it out so whereas nowadays a lot of you know if you want to punch out data for using another program you can either use a Unix pipe and pipe it directly into another program or you can use the Unix greater than symbol and send it into a file much more complicated in these days you had to announce ahead of time that you would be punching out results as well as printing them out [Laughter] now that's interesting what would a computer do with a hanging chad the emission of Richard stallman's name was not intentional I was thinking of him actually as I spoke I was tempted for a while and many of my friends told me to try this on with you but maybe not it would tend that the compressed air there's a lot of compressed air used in these machines to move the cars through very quickly
Original Description
How did punch card systems work? Professor Brailsford delves further into the era of mainframe computing with this hands-on look at punch cards.
Extra Material on Punch Cards: http://youtu.be/lkSGMrH5Kic
Extra Material - behind the scenes: http://youtu.be/Wi326Leuemg
Mainframes to Unix: http://www.youtube.com/watch?v=-rPPqm44xLs
Near to the Metal: http://www.youtube.com/watch?v=uNuFVq5QeRk
Addendum: "ICL punched cards actually have 12 rows -- not 11 as stated in the film. Choosing any two hole positions out of 12 gives 66 combinations -- which can represent 66 different characters. This in turn is more than enough for the 64 possibilities of a 6-bit character held in ICL computer memory. Also, some special characters could actually utilise three hole configurations adding further to the possibilities."
http://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: http://bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at: http://bit.ly/bradychannels
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Computerphile · Computerphile · 15 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
▶
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Follow the Cookie Trail - Computerphile
Computerphile
EXTRA BITS - Follow the Cookie Trail - Computerphile
Computerphile
Musical Floppy Drives - Computerphile
Computerphile
The Hair Algorithm - Computerphile
Computerphile
Getting Sorted & Big O Notation - Computerphile
Computerphile
Quick Sort - Computerphile
Computerphile
Hyper History and Cyber War - Computerphile
Computerphile
Entropy in Compression - Computerphile
Computerphile
Original Elite on the BBC B - Computerphile
Computerphile
IP Addresses and the Internet - Computerphile
Computerphile
A Career in Video Games - Computerphile
Computerphile
Error Detection and Flipping the Bits - Computerphile
Computerphile
Programming BASIC and Sorting - Computerphile
Computerphile
Birthplace of the World Wide Web - Computerphile
Computerphile
Punch Card Programming - Computerphile
Computerphile
Programming Paradigms - Computerphile
Computerphile
CERN Computing Centre (and mouse farm) - Computerphile
Computerphile
Error Correction - Computerphile
Computerphile
Home-Made Code - Computerphile
Computerphile
Security of Data on Disk - Computerphile
Computerphile
Gesture Controls - Computerphile
Computerphile
How Intelligent is Artificial Intelligence? - Computerphile
Computerphile
Encryption and Security Agencies - Computerphile
Computerphile
Virtual Machines Power the Cloud - Computerphile
Computerphile
Hacking Websites with SQL Injection - Computerphile
Computerphile
How Huffman Trees Work - Computerphile
Computerphile
Cracking Websites with Cross Site Scripting - Computerphile
Computerphile
Cloud Computing (Cloudy with a Chance of Pizza) - Computerphile
Computerphile
Texting Cabbage with a Recorder - Computerphile
Computerphile
Hashing Algorithms and Security - Computerphile
Computerphile
How YouTube Works - Computerphile
Computerphile
How NOT to Store Passwords! - Computerphile
Computerphile
A New Golden Age of Video Games - Computerphile
Computerphile
A Universe of Triangles - Computerphile
Computerphile
Cross Site Request Forgery - Computerphile
Computerphile
The True Power of the Matrix (Transformations in Graphics) - Computerphile
Computerphile
The Great 202 Jailbreak - Computerphile
Computerphile
EXTRA BITS - Printing and Typesetting History - Computerphile
Computerphile
Triangles to Pixels - Computerphile
Computerphile
The Problem with Time & Timezones - Computerphile
Computerphile
The Visibility Problem - Computerphile
Computerphile
Lights and Shadows in Graphics - Computerphile
Computerphile
The Penguin Barcode - Computerphile
Computerphile
Typesetters in the '80s - Computerphile
Computerphile
The Font Magicians - Computerphile
Computerphile
The Little Mac with the Big Bite - Computerphile
Computerphile
EXTRA BITS - More on the Original Mac at 30 - Computerphile
Computerphile
XP to Ubuntu with an 8yr old Hacktop - Computerphile
Computerphile
EXTRA BITS - Hacktop Real-Time Boot Comparison - Computerphile
Computerphile
EXTRA BITS - Making a Bootable USB in Linux - Computerphile
Computerphile
EXTRA BITS - Installing Ubuntu Permanently - Computerphile
Computerphile
The Dawn of Desktop Publishing - Computerphile
Computerphile
What is Bootstrapping? - Computerphile
Computerphile
Reverse Polish Notation and The Stack - Computerphile
Computerphile
Home-Made Z80 Retro Computer - Computerphile
Computerphile
Should Everybody Learn to Code? - Computerphile
Computerphile
Programming in PostScript - Computerphile
Computerphile
Heartbleed, Running the Code - Computerphile
Computerphile
YouTube's Secret Algorithm - Computerphile
Computerphile
YouTube Search & Discovery - Computerphile
Computerphile
More on: Systems Design Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
The Python Dictionary Trick That Makes Interviewers Smile
Dev.to · Ameer Abdullah
I Compared 50 Python Courses. Here Are My Top 5 Recommendations for 2026
Medium · Python
Machine learning for beginners #5
Medium · AI
Beyond the Elephant: On Manifolds, Projections, and the Hidden Assumptions of Neural Geometry
Medium · AI
🎓
Tutor Explanation
DeepCamp AI