Colossus: we connect a PicoScope to the world’s first computer

Pico PC-based oscilloscopes are often used to display signals from computers, so when the opportunity arose to connect one of our scopes to the world’s first computer we decided to take a closer look.

Britain’s Best Kept Secret

Situated about 50 miles to the north west of London at Bletchley Park is the former WW2 code breaking centre (also known as Station X). It was here that a dedicated team of talented mathematicians (including Alan Turing) worked to break the German Enigma codes and also the more complex codes used by Hitler and his high command.

The number of people working at Bletchley Park grew throughout the war to a point where there were literally thousands of people working around the clock decoding and analysing messages. Despite the number of people involved, the German high command had no idea that their security had been compromised and believed that their codes were unbreakable.

The success of the code breakers was one of the key factors in the Allied victory, many historians believing that it shortened the war by up to 2 years, saving thousands of lives.

After the war, all trace of what occurred at the park was burned or destroyed. Such was the culture of secrecy at Bletchley Park that no word of what happened began to emerge until the mid 1970’s. To this day, many people who worked there are still reluctant to talk about it.

During the war, many ingenious aids and machines were developed at Bletchley Park to aid the breaking of codes. One of these was Colossus — the world’s first electronic computer.

(For many years the honour of being the world’s first electronic computer was given to the American ENIAC. In recent years, however, both the UK and US governments have declassified and released papers giving more information about Colossus. In the light of this historians have been forced to reconsider and most now agree that Colossus was in fact the world’s first electronic computer.)

The German Codes

During WW2, the Germans relied mostly on the Enigma machine to encode messages. Enigma traffic was first broken before the war in Poland, and continued to be broken throughout much of the war at Bletchley. (A new film based on the Robert Harris book ‘Enigma’ financed by Mick Jagger and starring Kate Winslet has completed filming and is due for release next year.) The German Army High Command, however, did not rely on Enigma, but on a more complex system based on encoded teleprinter traffic using a machine developed by the Lorenz company.

The Lorenz machine worked with teleprinter punched hole paper tape shown above (32 symbol baudot code). The message was encoded by combining the original with a sequence of obscuring characters using modulo 2 addition (exclusive NOR in boolean terms). At the receiving end the message was decoded by once again adding the same sequence of obscuring characters.

Had the sequence of obscuring characters been truly random it would have been impossible to break the code, but luckily for the code breakers, the sequence was generated by rotating mechanical wheels and was a repeating pseudorandom sequence — if this sequence could be unravelled the code could be broken.

Working at Bletchley, Brigadier John Tiltman and the Cambridge graduate Bill Tutte exploited mistakes made by German radio operators and began to reconstruct the pseudorandom sequence and discover how the Lorenz encoding machine worked. This was completed in 1942 and the Post Office Research Labs at Dollis Hill were asked to build a machine to replicate the operation of a Lorenz machine (at this time they had not even seen a picture of a Lorenz machine). With this machine (known as ‘Tunny’) the code began to be broken. The problem was the time taken to work out the correct settings. This was a manual and laborious task that often took weeks or even months for a single message, so long in fact that by the time it was decoded the information was useless.

Brief History of Colossus

Max Newman, the famous mathematician devised, an automated way to find the Lorenz machines’ settings. This involved having two loops of paper tape. The first contained the message to be decoded and the second contained the repeating pseudorandom sequence. The idea was that each time the loop of tape containing the message was fed through the machine, the second tape was moved on by one position. In this way each possible setting was tested and a score recorded for each. The setting with the highest score was hopefully the one required for the ‘Tunny’ machine to decode the message.

TRE at Malvern were approached to develop a machine to implement the idea. This machine was based on mechanical relays and known as ‘Robinson’ (as in Heath Robinson). Although Robinson worked, it was unreliable. In particular the mechanical tape reader had problems keeping the two tapes in synchronisation at the operating speed of 1000 characters per second.

Newman, looking to solve the problems with Robinson, was put in touch with Tommy Flowers, a talented electronics engineer working for the Post Office at Dollis Hill.

Tommy Flowers’ design solved the problems of Robinson in an innovative way. Rather than using paper tape to store the pseudorandom sequence, Flowers replicated it electronically using a huge array of valves. This saved using two tapes and solved the synchronisation problems. The use of valves for digital switching was also a groundbreaking step which offered a huge increase in operating speed over mechanical relays (valves at the time were regarded by most as unreliable components used for amplifying analog signals.)

Design of Colossus started in March 1943 and the first unit was operational at Bletchley Park in January 1944. Colossus was immediately successful, and the Colossus – Tunny combination allowed ‘high grade’ German codes to be decoded in hours. This proved immensely useful during the D-Day landings. The parallel design of Colossus made it incredibly fast even by today’s standards, a modern Pentium PC programmed to do the same decoding task taking twice as long to break the code.

A total of 10 Colossi were built, the design being improved and upgraded throughout the rest of the war. These machines were used to decode tens of thousands of intercepted messages and made a huge contribution to the Allied victory.

At the end of the war, to keep their existence secret the 10 Colossi were dismantled and all the technical drawings and diagrams were burned. Their existence was to remain a secret for nearly 30 years.

The Colossus Rebuild Project

As already mentioned, information about what happened at Bletchley began to leak out in the 1970’s. In the early 1990’s a campaign was started to save what remained of the park from demolition (for housing). One of the campaigners was Tony Sale who went on to become the first curator of the Bletchley Park Museum. (Tony Sale, worked for many years with M.I.5 including a period as technical assistant to Peter Wright, of “Spycatcher” fame)

In 1993 Tony Sale collected all the information available on Colossus, which amounted to a few wartime photos, some fragments of circuit diagrams and some interviews with some of the surviving design engineers. Armed with this information he decided to rebuild a Colossus.

The rebuild project started in 1994 at Bletchley Park, on the site of the original Colossus number 9 computer. By June 1996 Tony Sale and his team were ready to switch–on (albeit only working at a 2 bit level rather than the full 5 bits). The switch on was performed by HRH the Duke of Kent on the 6th June 1996. Present also was Dr Tommy Flowers, the original designer.

Work continues to this day, and the rebuild can be seen during the museum open days (see links at the end).

For readers wanting more information on the rebuild, Tony Sale has an excellent website.

PicoScope and the Optical Tape Reader

One of the problems with ‘Robinson’, the forerunner of Colossus, was the tape reader. This read the tape containing the coded message in the ‘conventional’ manner, which involved mechanically driving the tape through the reader using the centre row of punched holes. This limited the speed to 1000 characters per second, as above this the tape would rip apart.

For Colossus an optical tape reader was designed by Dr Arnold Lynch in 1942 that could read at 5000 characters per second. This used an optical system to read not just the 5 bits of data, but also the row of holes that normally were used to mechanically drive the tape. The signals from this row were used as the clock pulse to synchronise the whole computer (in the same way as a modern computer is synchronised to a master clock). The benefit of this system is that the tape could be run on low–friction wheels and the speed of operation was not critical.

In the photograph of the Colossus rebuild right, the tape reader can be seen on the right. A bright light is shone through the tape and focused onto hard vacuum photocells, one for each bit of data and one for the clock pulse. The photocells used in the rebuild (see below) are original Colossus parts and are treated with care as the team only has one spare.

Before the light hits the photocells, it is ‘shaped’ by passing through an optical mask (supported by the wooden frame on the left). This helps ensure the signals produced by the valves are of a uniform square shape. The black tape on the top of the photocells is a modern addition to prevent pickup of the overhead fluorescent lights!

The Colossus rebuild at Bletchley is housed in a room with windows at one end for public viewing. Unfortunately, this makes the photocells difficult to see as they are at the far end of the room. To improve visitors’ understanding of what is happening at the tape reader, it was decided to capture the signals from the photocells and display them on a PC–based oscilloscope. A PC-based oscilloscope was chosen as the large colour display from the monitor makes it ideal when several people want to see the data at the same time.

When the technical team at Pico volunteered to help display the signals, we thought the task would be a simple one. After all, we are used to connecting our oscilloscopes to computers with clock speeds 1000’s of times faster than Colossus — of course we were wrong and the task proved a bit more involved than we expected. Our original idea was to place a PC and a PicoScope PC–based oscilloscope in the public viewing area and run the analog signal from the valves down a long cable to the scope’s inputs. The problem we found was that the extra capacitance from the leads prevented the valves from operating correctly. To solve this problem one of the Pico technicians (David Sabine) built a high input impedance, low–capacitance buffer amplifier.

The buffer amplifier (on the right) takes signals from the photodiodes and transmits them along about 30 feet of cable to the PC–based scope on the right. Power is also fed back up the cable to power the buffer amplifier.

In the photo to the right, the buffer amplifier can be seen in place next to the optical tape reader. The cables are taken up through the roof void, across and down to the computer with the PC-based scope. Once connected up, the system worked first time. The top trace (blue) shows the clock pulse (from the narrow holes on the tape) and the bottom trace (red) shows one of the data streams from the tape. Below the scope display we have switched on one of PicoScope’s automated measurements to display the frequency of the clock signal. As you can see this is very close to the 5000 characters per second the tape reader was designed to run at.

More Information

For more information on the Colossus rebuild project, visit www.codesandciphers.org.uk
If you are interested in visiting Bletchley Park (a good day out) visit www.bletchleypark.org.uk