I had to attend a meeting in Manchester on Tuesday afternoon, so while I was there I took the chance to drop in on Baby, or as it is more properly known, the Small-Scale Experimental Machine, or SSEM for short. Baby was the world's first stored-program electronic digital computer, running its first program on June 21 1948. Now before all you US citizens start getting all uppity and start telling me that ENIAC first ran two years earlier in 1946, the unique and ground-breaking feature of Baby is that the program which it ran was stored electronically and in the same store as the data, making it the first machine with a von Neumann architecture - Baby is therefore the ancestor of every modern computer. ENIAC used decimal arithmetic and was hard-wired - changing the program required a lady with a pair of pliers. And anyway, ENIAC was beaten by the British Colossus (1943), which was both binary and electronic, but not Turing-complete, and in turn Colossus was beaten by the German Z3 machine (1941) which was Turing complete and used binary arithmetic, but was electromechanical.
Right, now we've got the historical arguments sorted, on to the machine itself. The machine was constructed at the University of Manchester by Frederic Williams, Tom Kilburn and Geoff Tootill. During WWII, Williams and Kilburn had both worked at the Telecommunications Research Establishment, which was a cover organisation set up to do work on radar.
The ground-breaking feature of Baby was the Williams-Kilburn tube. This was a cathode ray tube which formed the memory of the machine. Williams and Kilburn had extensive experience of CRTs from their experience of developing WWII radar equipment, and in fact the tubes they used in Baby were from radar equipment. The glass surface of the tube was used as the store - the electron beam was used to write a grid of charged spots on the glass, with different charge levels representing 1 and 0. The values were read off via a metal plate on the outside of the tube. The charges leaked away over time, so the contents had to be refreshed on a regular basis, in a very similar way to modern DRAM. Baby used a 32 x 32 pattern of dots, giving a memory capacity of 32 words each of 32 bits. Williams-Kilburn tubes provided random access to the stored data, unlike the alternative technology of the time, the mercury delay line, which only provided serial access. Baby actually used four tubes, one as the main store (memory), one as the Accumulator, another to hold the address of the current Instruction (CI - Control Instruction) and the instruction itself (PI - Present Instruction). The final tube was used to mirror the contents of the other three, the tube displayed being switchable. The display tube was necessary because the other three tubes had a pick-up plate on the front, and they were also heavily shielded to prevent electrical interference.
The instruction set used bits 0-12 of a 32-bit word to hold the target address, and bits 13-15 to define the operation. The instruction set was very simple with just 7 instructions:
- Jump indirect
- Relative jump indirect
- Take a number from memory, negate it, and load it into the accumulator
- Write the number in the accumulator back to memory
- Subtract a value from the accumulator
- Skip next instruction if accumulator is negative
Note there is no addition operation - you can implement addition using subtraction and negation, but you can't do the inverse. The reason for the limited memory and instruction set is because Baby was intended purely as a technology test-bed. The work carried out fed directly into later machines such as the Manchester Mark 1 and the Ferranti Mark 1. In 1995 the decision was taken to build a complete replica of Baby in time for the 50th anniversary celebrations in 1998 and this effort was successful, with the resulting replica being housed in the Museum of Science and Industry in Manchester. The machine is powered up every Tuesday, hence my visit.
The picture on the left shows the entire machine. The rack on the far left contains the power supplies, the rack on the far right contains the storage CRTs. In the centre is the panel containing the control, switches and display. The remaining racks contain the machine's logic circuits. The photo on the right shows a close-up view of the control rack. At the top is the display CRT - if you look carefully you can see that a program is running, an animation of a ship is visible at the bottom of the tube, sailing from left to right. The knobs to the right of the tube allow you to select the tube which is being displayed. Immediately below is the 'typewriter' which is used to input the program, each switch corresponds to one bit. There are 40 switches, so 8 of them are unused. Below that is a panel containing switches to select the line number in the store to modify (top) and switches to select the Function (opcode) to be executed (bottom). Finally, at the bottom of the picture is a row of control switches used to clear, load, run and stop the program. Click on either picture for a bigger view.
Great pains have been taken with historical accuracy - the people who worked on the original machine were consulted wherever possible, and many hours were spent poring over original notebooks and old photos, identifying the exact placement of component and labelling. The same components as were used in the original machine were used throughout. Even the racks are authentic, even though some of them had to be rescued from someone's garden! The racks are standard Post Office ones with 19 inch mountings - anyone recognise that dimension? ;-) They even went as far as replicating the numbering on the bottom of the racks, although nobody knew what the numbers were, and the chances were that the racks were second-hand in the original machine. My favourite touch is that in the original machine the display CRT (top of the right-hand picture) was propped up on a cardboard valve box as the cutout in the panel was too big - that's been replicated too!
The first program to run on the machine was written by Tom Kilburn, and calculated the highest factor of 218. One of the other early programs written for the machine was a long division routine written by Alan Turing who was working at the National Physical Laboratory at the time, but who was shortly to move to Manchester University.
I asked how reliable the replica was, and remarkably it seems to be very reliable, unlike the original version. It seems that the main reason is that the valves in the replica are mostly 1950s and 1960s vintage, and manufacturing techniques improved rapidly in the period after the war. The machine is run every week, and in the last 10 years only 3-4 valves have failed. More problematic are the old wire-wound resistors, which tend to fail more often.
To coincide with the 50th anniversary there was a programming competition. As a result several simulators are available, along with a programmer's reference manual and example programs. My favourite emulator is David Sharp's, which has a graphical interface that is similar to the real machine. It is written in Java, and I've been working with David to produce a Webstart version (not available yet) as well as trying to improve the visual accuracy of the simulator.
It was fascinating to read some of the documents and papers that have been written about the machine, and to see the machine actually running. Many of the concepts and techniques we still use today such as dynamically refreshed memory and relative jumps first appeared in this machine and it is amazing when you realise just how architecturally similar the SSEM is to modern machines, despite its appearance. I knew that Manchester had played a part in the early history of computing, but until I spent some time reading about the SSEM I hadn't realised just how pivotal that contribution had been.