Close up of the crt output

Programming of Manchester Baby

The Baby's instruction format had a three-bit operation code field, which allowed a maximum of eight (2^3) different instructions. In contrast to the modern convention, the machine's storage was described with the least significant digits to the left; thus a one was represented in three bits as "100", rather than the more conventional "001".

Baby's instruction set

Binary code Original notation Modern mnemonic Operation
000 S, Cl JMP S Jump to the instruction at the address obtained from the specified memory address S (absolute unconditional jump)
100 Add S, Cl JRP S Jump to the instruction at the program counter plus (+) the relative value obtained from the specified memory address S[a] (relative unconditional jump)
010 -S, C LDN S Take the number from the specified memory address S, negate it, and load it into the accumulator
110 c, S STO S Store the number in the accumulator to the specified memory address S
001 or 101 SUB S SUB S Subtract the number at the specified memory address S from the value in accumulator, and store the result in the accumulator
011 Test CMP Skip next instruction if the accumulator contains a negative value
111 Stop STP Stop

The awkward negative operations were a consequence of the Baby's lack of hardware to perform any arithmetic operations except subtraction and negation. It was considered unnecessary to build an adder before testing could begin as addition can easily be implemented by subtraction, i.e. x+y can be computed as -(-x-y). Therefore, adding two numbers together, X and Y, required four instructions:

LDN X // load negative X into the accumulator

SUB Y // subtract Y from the value in the accumulator

STO S // store the result at S

LDN S // load negative value at S into the accumulator

Programs were entered in binary form by stepping through each word of memory in turn, and using a set of 32 buttons and switches known as the input device to set the value of each bit of each word to either 0 or 1. The Baby had no paper-tape reader or punch.

Close up of the crt output

First Program

Three programs were written for the computer. The first, consisting of 17 instructions, was written by Kilburn, and so far as can be ascertained first ran on 21 June 1948. It was designed to find the highest proper factor of 2^18 (262,144) by trying every integer from 2^18 - 1 downwards. The divisions were implemented by repeated subtractions of the divisor. The Baby took 3.5 million operations and 52 minutes to produce the answer (131,072). The program used eight words of working storage in addition to its 17 words of instructions, giving a program size of 25 words.

Geoff Tootill wrote an amended version of the program the following month, and in mid-July Alan Turing — who had been appointed as a reader in the mathematics department at Manchester University in September 1948 — submitted the third program, to carry out long division. Turing had by then been appointed to the nominal post of Deputy Director of the Computing Machine Laboratory at the university, although the laboratory did not become a physical reality until 1951.