Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game

Home > Science > Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game > Page 52
Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game Page 52

by Andrew Hodges


  Von Neumann had also seen that it was possible to interfere with the stored instructions, but had done so in only one very particular way. If a stored instruction had the effect of ‘taking the number at address 786’, then he had noticed that it would be convenient to be able to add 1 into the 786, so that it gave the effect of ‘taking the number at address 787’. This was just what was needed for working along a long list of numbers, stored in locations 786, 787, 788, 789 and so forth, as would so frequently occur in large calculations. He had programmed the idea of going to the ‘next’ address, so that it did not have to be spelt out in explicit form. But von Neumann went no further than this. In fact, he actually proposed a way of ensuring that instructions could not be modified in any other way than this.

  The Turing approach was very different. Commenting on this feature of modifying instructions, he wrote in the report: ‘This gives the machine the possibility of constructing its own orders…. This can be very powerful.’ In 1945 both he and the ENIAC team had hit upon the idea of storing the instructions inside the machine. But this in itself said nothing about the next step, that of exploiting the fact that the instructions could now themselves be changed in the course of running the machine. This was what he now went on to explain.

  It was an idea that had arrived somewhat by chance. On the American side, they had thought of storing instructions internally because it was the only way of supplying instructions quickly enough. On the Turing side, he had simply taken over the single tape of the old Universal Turing Machine. But neither of these reasons for adopting stored instructions said anything about the possibility of interfering with the instructions in the course of a computation. On the American side, it was not pointed out as a feature of the new design until 1947.4 Equally, the Universal Turing Machine, in its paper operation, was not designed to change the ‘description number’ that it worked upon. It was designed to read, decode, and execute the instruction table stored upon its tape. It would never change these instructions. The Universal Turing Machine of 1936 was like the Babbage machine in the way that it would operate with a fixed stock of instructions. (It differed in that that stock was stored in exactly the same medium as the working and the input and output.) And so Alan Turing’s own ‘universality’ argument showed that a Babbage-like machine was enough. In principle there was nothing that could be achieved through modifying the instructions in the course of an operation that could not be achieved by a universal machine without this facility. The faculty of program modification could only economise on instructions, and would not enlarge upon the theoretical scope of operations. But that economy could, as Alan said, be ‘very powerful’.

  This original perception flowed from the very universality of the machine, which might be used for any kind of ‘definite method’, not necessarily arithmetical. That being so, the pulses ‘1101’ stored in a delay line, might well not refer in any way to the number ‘thirteen’, but might represent a chess move or a piece of cipher. Or, even if the machine were engaged upon arithmetic, the ‘1101’ might be representing not ‘thirteen’, but indicating perhaps a possible error of thirteen units, or a thirteen in the floating-point representation* of numbers, or something else altogether, at the choice of the user of the machine. As he saw it from the start, there would be far more to adding and multiplying than putting pulses through the hardware adder and multiplier. The pulses would have to be organised, interpreted, chopped up, and put together again, according to the particular way in which they were being used. He dwelt in particular upon the question of doing arithmetic in floating-point form, and showed how the mere addition of two floating-point numbers required a whole instruction table. He wrote some tables of this kind. MULTIP, for instance, would have the effect of multiplying two numbers which had been encoded and stored in floating-point form, encoding and storing the result. His tables made use of the ‘very powerful’ feature of the machine, for he had it assemble bits of the necessary instructions for itself, and then execute them.

  But if a simple operation like multiplying floating-point numbers would require a set of instructions, then a procedure of any useful scale would involve putting many such sets of instructions together. He envisaged this not as a stringing together of tables, but as a hierarchy, in which subsidiary tables like MULTIP would serve a ‘master’ table. He gave a specific example of a master table called CALPOL which was to calculate the value of a fifteenth-order polynominal in floating-point. Every time a multiplication or addition was required, it had to call upon the services of a subsidiary table. The business of doing this calling up and sending back of subsidiary tables was something which itself required instructions, as he saw:

  When we wish to start on a subsidiary operation we need only make a note of where we left off the major operation and then apply the first instruction of the subsidiary. When the subsidiary is over we look up the note and continue with the major operation. Each subsidiary operation can end with instructions for the recovery of the note. How is the burying and disinterring of the note to be done? There are of course many ways. One is to keep a list of these notes in one or more standard size delay lines … with the most recent last. The position of the most recent of these will be kept in a fixed TS [short delay line] and this reference will be modified every time a subsidiary is started or finished. The burying and disinterring processes are fairly elaborate, but there is fortunately no need to repeat the instructions involved each time, the burying being done through a standard instruction table BURY, and the disinterring by the table UNBURY.

  Perhaps he drew the imagery of burying and unburying from the silver bar story.* This was an entirely new idea. Von Neumann had thought only in terms of working through a sequence of instructions.

  The concept of a hierarchy of tables brought in further applications of program modification. Thus he imagined ‘keeping the instruction tables in an abbreviated form, and expanding each table whenever we want it’ – the work being done by the machine itself, using a table called EXPAND. The further he progressed with this idea, the more he saw that the ACE could be used to prepare, collate, and organise its own programs. He wrote:

  Instruction tables will have to be made up by mathematicians with computing experience and perhaps a certain puzzle-solving ability. There will probably be a good deal of work of this kind to be done, for every known process has got to be translated into instruction table form at some stage. This work will go on whilst the machine is being built, in order to avoid some of the delay between the delivery of the machine and the production of results. Delay there must be, due to the virtually inevitable snags, for up to a point it is better to let the snags be there than to spend such time in design that there are none (how many decades would this course take?) This process of constructing instruction tables should be very fascinating. There need be no real danger of it ever becoming a drudge, for any processes that are quite mechanical may be turned over to the machine itself.

  It is not surprising that he looked forward to the process of writing instruction tables as ‘very fascinating’. For he had created something quite original, and something all of his own. He had invented the art of computer programming.* It was a complete break with the old-style calculators – of which, in any case, he knew little. They assembled adding and multiplying mechanisms, and then had the job of feeding in a paper tape to make them work in the right order. They were machines to do arithmetic, in which the logical organisation was a rather tiresome burden. The ACE was quite different. It was to be a machine to play out programs ‘for every known process’. The emphasis was placed on the logical organisation of the work, and the hardware arithmetic added only to short-cut the more frequently used constituent operations.

  On desk calculators, the figures 0 to 9 would appear visibly in the registers and the keyboard, and the operator would be led to feel that in some way the calculator had the numbers themselves stored within it. In reality, it had nothing but wheels and levers, but the illusion would be strong.
The illusion carried over to the big relay calculators, the Aiken and Stibitz machines, and to the ENIAC. Even the EDVAC proposals carried the feeling that the pulses in the delay lines would somehow actually be numbers. But the Turing conception was rather different, and took a more abstract view. In the ACE, one might regard pulses as representing numbers, or as representing instructions. But it was really all in the mind of the beholder. The machine acted, as he put it, ‘without understanding’, and in fact operated not on numbers nor on instructions, but on electronic pulses. One could ‘pretend that the instruction was really a number’, because the machine itself knew nothing about either. Accordingly, he was free in his mind to think about mixing data and instructions, about operating on instructions, about tables of instructions being inserted by other instructions of ‘higher authority’.

  There was a reason for his facility to take this liberated approach. Ever since he first thought about mathematical logic, he was aware of mathematics as a game played with marks on paper, to be manipulated by chess-like rules, regardless of their ‘meaning’. This was the outlook that the Hilbert approach encouraged. Gödel’s theorem had cheerfully mixed up ‘numbers’ and ‘theorems’, and Computable Numbers had represented instruction tables as ‘description numbers’. His proof of the existence of unsolvable problems depended upon this mixing up of numbers and instructions, by treating them all alike as abstract symbols.* It was therefore a small step to regard instructions, and instruction tables, as grist to the ACE’S own mill. Indeed, since so much of his war work had depended upon indicator systems, in which instructions were deliberately disguised as data, there was no step for him to make at all. He saw as obvious what to others was a jump into confusion and illegality.

  This vision of the ACE’S function was also tied in with the imitation argument. The ACE would never really be ‘doing arithmetic’, in the way that a human being would. It would only be imitating arithmetic, in the sense that an input representing ‘67 + 45’ could be made to guarantee an output representing ‘112’. But there were no ‘numbers’ inside the machine, only pulses. When it came to floating-point numbers, this was an insight of practical significance. The whole point of his development was that the operator of the ACE would be able to use a ‘subsidiary table’ like MULTIP, as if it were a single instruction to ‘multiply’. In actual fact, it would have the effect of much shunting and assembling of pulses inside the machine. But that would not matter to the user, who could work as if the machine worked directly on ‘floating-point numbers’. As he wrote, ‘We have only to think how this is to be done once, and then forget how it is done.’ The same would apply if the machine were programmed to play chess: it would be used as if it were playing chess. At any stage it would only be outwardly imitating the effect of the brain. But then, who knew how the brain did it? The only fair use of language, in Alan’s view, was to apply the same standards, the standards of outward appearance, to the machine as to the brain. In practice, people said quite nonchalantly that it was ‘doing arithmetic’; they should also say it was playing chess, learning, or thinking, if it could likewise imitate the function of the brain, quite regardless of what was ‘really’ happening inside. Even in his technical proposals, therefore, there lay a philosophical vision which was utterly beyond the ambition of building a machine to do large and difficult sums. This did not help him to communicate with other people.

  Although he had shifted the emphasis from the building of a machine to the construction of programs, there was nothing nebulous about his engineering plans for the ACE. The delay lines, he wrote,

  have been developed for RDF purposes to a degree considerably beyond our requirements in many respects. Designs are available to us, and one such is well suited to mass production. An estimate of £20 per delay line would seem quite high enough.

  He did in fact make a visit to the Admiralty Signals Establishment to see T. Gold, who was working there on delay lines. His plan was for two hundred mercury delay lines, each with a capacity of 1024 digits. But the figures, dimensions, costs, and the choice of mercury as the medium, were not taken off the radar engineers’ shelf. He worked out the physics himself. On the basis of his calculation, mercury was only marginally to be preferred to a mixture of water and alcohol, which he observed would have the same strength as gin. He rather hankered after using gin, which would come cheaper than mercury. However, he did not propose doing the development work himself. He wanted this to be done by the Colossus engineers, at the Post Office Research Station. Flowers was already familiar with delay lines, having been shown Eckert’s model in October 1945.

  As for the engineering of the logical control and arithmetical circuits (‘LC and CA’), he wrote:

  Work on valve element design might occupy four months or more. In view of the fact that some more work needs to be done on schematic circuits such a delay will be tolerable, but it would be as well to start at the earliest possible moment….

  In view of the comparatively small number of valves involved the actual production of LC and CA would not take long; six months would be a generous estimate.

  A great many of the ‘schematic circuits’ were already planned out in the report. He included a detailed design of the arithmetical circuits, making use of (and extending) von Neumann’s notation. Perhaps he had the pleasure of drawing upon his experience in designing a binary multiplier before the war. There was also another feature of the design which might well have harked back to an earlier experience. There was to be a facility for plugging in special circuits, if these were required, for operations over and above the arithmetical and Boolean functions that were permanently incorporated in the machine. This idea was rather at variance with the principle of putting as much as possible into the instructions, but it might be appropriate if some exceedingly efficient special-purpose circuit were at hand. This had been the case, for instance, with the Bombes. Here the steps which depended upon relay clicks were slow by electronic standards. But the steps which depended upon electricity flowing through the internal Enigma wirings were effectively instantaneous. These would have taken longer to achieve by means of an instruction table played out on an electronic computer. Alan’s design allowed for such short-cuts to be taken, if desired. But no one could possibly have guessed that he was writing on the basis of such experience with mechanical methods.

  Nor was it planned out only at the logical level of circuit diagrams. There were many pages also on the specific electronic equipment required. One section owed a direct debt to the Delilah, another unknown aspect of his expertise:

  Unit delay. The essential part of the unit delay is a network, designed to work out of a low impedance and into a high one. The response at the output to a pulse at the input should preferably be of the form indicated in Fig. 50,* i.e. there should be maximum response at time 1µs after the initiating pulse, and the response should be zero by a time 2µs after it, and should remain there. It is particularly important that the response should be near to zero at the integral multiples of 1µs after the initiating pulse (other than 1µs after it).

  A simple circuit to obtain this effect is shown on Fig. 51a…. It differs from the ideal mainly in having its maximum too early. It can be improved at the expense of a less good zero at 2µs by using less damping, i.e. reducing the 500 ohm resistor. It is also possible to obtain altogether better curves with more elaborate circuits.

  He also considered the practical requirements of the project as a whole:

  It is difficult to make suggestions about buildings owing to the great likelihood of the whole scheme expanding greatly in scope. There have been many possibilities that could helpfully have been incorporated, but which have been omitted owing to the necessity of drawing a line somewhere. In a few years time however, when the machine has proved its worth, we shall certainly want to expand and include these other facilities, or more probably to include better ideas which will have been suggested in the working of the first model. This suggests that whatever size of buildin
g is decided on we should leave room for building-on to it.

  He had learnt from the mushrooming of Bletchley. He proposed a total of 1400 square feet for the machine and its accessory equipment, and estimated the total capital cost of a machine with two hundred delay lines at £11,200. Changes would have to be made as they went along, but his plans allowed for that: the main thing was to get started.

  His February 1947 talk would expand on how the machine would ‘prove its worth’, by giving

  a picture of the operation of the machine. Let us begin with some problem which has been brought in by a customer. It will first go to the problems preparation section where it is examined to see whether it is in a suitable form and self-consistent, and a very rough computing procedure made out.

  He gave a specific example of a problem, namely the numerical solution of a differential equation involving Bessel functions. (This would be a very typical problem arising in applied mathematics and engineering.) He explained how the instruction table for the Bessel function would be already ‘on the shelf’, and so would one for the general procedure for solving a differential equation. So

  The instructions for the job would therefore consist of a considerable number taken off the shelf together with a few made up specially for the job in question. The instruction cards for the standard processes would have already been punched, but the new ones would have to be done separately. When these had all been assembled and checked they would be taken to the input mechanism, which is simply a Hollerith card feed. They would be put into the card hopper and a button pressed to start the cards moving through. It must be remembered that initially there are no instructions in the machine, and one’s normal facilities are therefore not available. The first few cards that pass in have therefore to be carefully thought out to deal with this situation. They are the initial input cards and are always the same. When they have passed in a few rather fundamental instruction tables will have been set up in the machine, including sufficient to enable the machine to read the special pack of cards that has been prepared for the job we are doing. When this has been done there are various possibilities as to what happens next, depending on the way the job has been programmed. The machine might have been made to go straight on through, and carry out the job, punching or printing all the answers required, and stopping when all of this has been done. But more probably it will have been arranged that the machine stops as soon as the instruction tables have been put in. This allows for the possibility of checking that the content of the memories is correct, and for a number of variations of procedure. It is clearly a suitable moment for a break. We might also make a number of other breaks. For instance, we might be interested in certain particular values of the parameter a, which were experimentally obtained figures, and it would then be convenient to pause after each parameter value, and feed the next parameter value in from another card. Or one might prefer to have the cards all ready in the hopper and let the ACE take them in as it wanted them. One can do as one wishes, but one must make up one’s mind.

 

‹ Prev