Skip to content

Turing stunts: the programming guru speaks

A table of character mappings

(Non-alpha!) character mappings for the Mark I

I’ve marked-up this quote taken from the system programming manual written by Alan Turing for the Ferranti Mark I computer. (The manual is available from the Turing archive.)

Scales of notation

 
The information stored on paper by the human computer will mostly consist of sequences of digits drawn from 0, 1, …, 9. There may also be other symbols such as decimal points, spaces etc. and there may be occasional remarks in English, Greek letters etc. There may in fact be anything from 10 to 100 different symbols used, and there is no particular need to decide in advance how many different symbols will be concerned. With an electronic computer however such a decision has to be made; the number of symbols chosen is ruled very largely by engineering considerations, and with the vast majority of machines the number is two. Machines (e.g. ENIAC) have however been made with 10 different symbols. The number for the Ferranti machine is two, and the symbols used are 0 and 1. [Binary would have been an obvious choice for Turing, who had both the Entscheidungsproblem paper and his own mechanical and electronic experiments as a basis for such a decision.]
 

It is not difficult to see that information expressed with one set of symbols can be translated into information expressed with another set by some suitable conventions, e.g. to convert a sequence of decimal digits into sequences of 0’s and 1’s we could replace 0 by 0000, 1 by 1000, 2 by 0100, 3 by 1100, 4 by 0010, 5 by 1010, 6 by 0110, 7 by 1110, 8 by 0001, and 9 by 1001. Alternatively one could assume that the sequence of decimal digits represented an integer according to the ordinary Arabic convention. This same integer could also be represented in the scale of two and would then appear as a sequence of 0’s and 1’s. There is an infinity of alternative possible conventions. However we are not obliged to choose any one of them. The possibility of this translation process was only mentioned to show that there need be no loss of generality involved in using only two symbols.
 
Although we shall not need these translation conventions we shall often wish to interpret a sequence of 0’s and 1’s as meaning some integer. The most natural convention to choose is that by which the value of a 1 in the rth position from the right hand is 2r?1, so that 25 is represented by 10011 instead of 11001. These facts may be described by saying that the machine uses ‘the scale of two with the most significant digits at the right hand end’.
Although the scale of two is appropriate for use within an electronic computer it is not so suitable for work on paper, and it is not possible to avoid paper work altogether. Without attempting to explain the reasons at this stage let us accept that there are are occasions when it is desirable to write down on paper the sequence of symbols stored in some part of the machine. Suppose for instance that the sequence was:
10001110111010001001100011100101010101101100100110
The copying of such sequences is slow and very liable to inaccuracy. It is very difficult to ‘keep one’s place’. It is therefore advisable to represent such a sequence on paper in a different form not subject to these difficulties. The method chosen is to divide the sequence into blocks of five:
10001 11011 10100 01001 10001 11001 01010 10110 11001 00110
and then to replace each block by a single symbol, according to the table [shown as a picture in this post]. The above sequence then becomes:
Z"SLZWRFWN
These symbols are essentially the teleprinter code, except that the combinations 00000, 01000, 00010, 11011, 11111, which in true teleprint are represented by no effect, line feed, space, carriage return, figure shift, letter shift respectively have here been given the representations /, @, :, 1 , “, £. These symbols have been chosen so as to enable the upper case of a typewriter to be used throughout. In manuscript or with other typewriters we permit the synonyms % for /, 1 for 1 , $ for £. With certain kinds of teleprint apparatus it may also be necessary to permit the synonyms 2 for @, 4 for :, 8 for 1 , 5 for “, 0 for £. These six combinations will be known as ‘stunts’.
 
The user is strongly recommended to learn the above table. [Turing had no problem remembering things like this, so why should anyone else? Note that the characters do NOT fall in alphabetic sort order.] A number of aids to computation in the scale of 32 are given on Figs. A, B, C & D. These include addition and multiplication tables, special tables to assist in multiplication by powers of two, powers of 10 in the scale of 32, and aids to decimal-teleprint conversion. In principle it is possible to do without these aids for the machine itself can do all the conversion processes required. In practice it frequently happens that some single number is required in the scale of 32, and it is found less trouble to do the conversion by hand than to use the machine. To convert a decimal number less than 1 to scale of 32 multiply by 1024 subtracting and recording the integral part at each stage. This can be done very quickly with a Brunsviga [mechanical calculator] with transfer. The integral parts obtained may be broken up into two teleprint characters with the aid of the table on Fig. B.