How the Colossus Computer Processed Binary Streams

During World War II, the Colossus computer was developed at Bletchley Park to decipher high-level German military communications encrypted by the Lorenz SZ40/42 cipher machine. Colossus achieved its unprecedented processing speed by combining high-speed optical paper tape readers with thousands of vacuum tubes to analyze binary data in real time. By reading encrypted text encoded as five-bit binary streams and comparing it against electronically generated pseudo-random key streams, the machine performed rapid Boolean logic operations and statistical counts, making it the world’s first programmable, electronic digital computer.

Binary Data Representation

German teleprinter communications relied on the Baudot-Murray code (CCITT-2), a five-bit standard where every character was represented by a sequence of five binary digits (bits), such as 10110 or 01001. In paper tape format:

Lorenz encryption applied an additive cipher by combining the cleartext binary stream with a pseudo-random key stream generated by its rotating mechanical wheels. This operation used modular addition (Modulo-2), which is functionally identical to the modern Boolean Exclusive-OR (XOR) operation:

To break the cipher, British cryptanalysts needed to identify the starting positions of the Lorenz wheels by testing potential key streams against the intercepted ciphertext tape until statistical anomalies appeared.

Optical Paper Tape Reading

Traditional mechanical tape readers were too slow and fragile to handle the millions of comparisons required for cryptanalysis. Tommy Flowers and his engineering team designed a revolutionary optical tape reader, colloquially known as the “Bedstead.”

  1. Pulleys and Continuous Loops: The intercepted ciphertext was punched onto a paper tape joined into a continuous loop and spun around a system of pulleys at up to 30 miles per hour (5,000 characters, or 25,000 bits, per second).
  2. Photoelectric Sensors: A light source shone through the tape’s five data channels and a central sprocket channel onto photoelectric cells.
  3. Pulse Generation: As holes passed the light source, the photocells generated electrical pulses for 1s and remained quiescent for 0s, converting physical punches directly into synchronized, high-frequency electrical binary signals.

Vacuum Tubes as Logic and Memory

Colossus Mk 1 utilized approximately 1,500 vacuum tubes (thermionic valves), while the Mk 2 version expanded to roughly 2,400. In Colossus, these tubes acted as high-speed electronic switches, bistable memory elements (flip-flops), and logical processors.

Processing the Binary Streams

As the tape spun continuously:

  1. The optical reader fed the five-bit ciphertext stream into the tube-based circuitry.
  2. The internal vacuum-tube registers generated the corresponding sequence of the simulated Lorenz key stream.
  3. The logical circuits calculated XOR and difference (\(\Delta\)) equations between adjacent characters at electronic speeds.
  4. Thyratron-driven electronic counter tubes tracked the statistical frequency of specific binary conditions.
  5. If a counter passed a pre-programmed statistical threshold, the result was sent to an attached electric typewriter, indicating the probable wheel setting for that segment of the ciphertext.

By shifting storage and logical comparison entirely from mechanical components to electronic vacuum tubes, Colossus replaced weeks of manual calculation with hours of automated binary processing.