Monday 3 December 2018

A legacy of punched cards

One interesting aspect of computing is that older generations of computing, now long obsolete, still have left their mark on computers people use every day. An example of this is in ASCII, the standard for encoding characters like these ones in a computer. If you look at an ASCII chart (and one is shown below) you will notice something strange. The first thirty two spaces in the chart are reserved for control codes (things like carriage return, bell et cetera*)... all except the code for DEL(ete) which is at the very end of the chart below. So why is this control code separated from the rest of them?

The reason is because of punched cards, a method of data storage now no longer used. With punched cards binary data was encoded by a hole in the card or the lack of one. The best way to tell a computer to ignore a character (or delete it) was to punch all of the holes in that character which in those days was encoded in seven bits. Therefore 1111111 (in binary) was delete. In hexadecimal that is 7F which is where the DEL control code is in the chart below.
Public domain image from Wikipedia

* Many of these control codes were intended for teletypes and have little utility these days.