108 Part 1 ½ Fundamentals Section 3 ½ Computers of Historical Significance

Table 1

 Decimal value of function bits An early notation Modern mnemonic Explanation of operation 0 s, C JMP S Absolute indirect unconditional jump: set the control register equal to the contents of address S.~ 1 c + s, C JRP S Relative indirect unconditional jump: add the contents of address S to the control register.~ 2 -s, A LDN S Load negative: set the accumulator equal to the negated contents of address S. 3 a, S STO S Store: copy the contents of the accumulator to address S. 4 or 5» a-s, A SUB S Subtract: set the new value of the accumulator equal to the former contents minus the contents of address S. 6 Test CMP Compare against zero: the value in the accumulator is tested. If it is less than zero, one is added to the control register thus causing the next sequential instruction to be skipped. 7 Stop STP Stop: cease automatic mode, and await manual commands from the operator's keyboard.

~ Note that +1 was always added to the control register at the end of every order, so the programmer used JMP and JRP to point to
an instruction one before the line he intended to jump to.
» To economise on logic elements only partial decoding of the function bits was carried out.

an 8-bit (extendable to 16-bit) flip-flop register known as the staticisor. This staticised function bits (F) and operand addresses (8) during the execution of an order, and then staticised the address of the next order during the instruction-fetch phase. An interesting anomaly was that numbers were stored with the least significant digit on the left-a system which makes sense to engineers if not to mathematicians!

As has been noted, two's complement was used to represent negative numbers, though the now familiar rules for addition! subtraction and the formation of the complement of a number were not implemented in the usual way. The main emphasis of the project at this time was to prove the practicability of the Williams Tube for realising the stored-program concept and so the arithmetic logic was kept as simple as possible. The subtractor was the only arithmetic facility provided, it being preferred to an adder because a subtractor can be used without alteration to form complements and to perform additions whereas the converse is not true. As may be seen from Fig. 1 an operand entered the accumulator by being fed through the subtractor; this "subtract from zero" thus complemented the operand before it reached the accumulator. The effect of a positive load could be programmed in two orders by performing a negative load and then subtracting the contents of the accumulator from a zero operand. An addition of two quantities p, q was programmed by a four-order sequence as follows:

subtract q

store the resulting (-p -q)

load negative to achieve (+p +q)

The order code of the the prototype had provision for eight functions, specified as in Table 1.

Three demonstration programs were run on the prototype machine, the first one involving determination of the highest factor of an integer by a method which would give a long run, the result of which could be easily checked. To quote [Williams and Kilburn 1948], "the highest proper factor of 218 was found by trying in a single routine every integer from 218- 1 downward, the necessary divisions being done not by long division, but by the primitive process of repeated subtraction of the divisor. Thus about 130,000 numbers were tested, involving some 3.5 million operations. The correct answer was obtained in a 52-minute run. The instruction table in the machine contained 17 entries."

The original program was written by Tom Kilburn. G C Tootill, an engineer on loan to Manchester from TRE from mid-1947 to mid-1949, also wrote programs for the prototype and a notebook kept by him over the period 4th June to 28th November 1948 has survived. From entries in this notebook it seems that Kilburn's program was first run on Monday 21st June.

References

Kilburn ; Williams and Kilburn ; Williams and Kilburn [19491; Williams, Kilburn, and Tootill .