What is Punched Paper Tape, and How to Read It

The strange link between the NSA, Queen Victoria, and a mechanical orchestra

Statue of Queen Victoria
K Mitch Hodge / Unsplash

To most people who can even remember what punched paper tape is, it’ll seem like a relic of yesteryear. But as we’ll see, that’s not strictly the case. What is punched paper tape? It is a very old way to encode programs and data on long strips of paper so that they could be stored, transported, and read back into computers. So why are we still talking about it today?

What is Punched Paper Tape?

Punched paper tape was used as a computer storage media from the 1950s onward, probably hitting its heyday in the first half of the 1970s. It used long reels of paper tape that had holes punched in them, typically with five or eight holes across the width of the strip. They were about one inch wide (25mm). Each line of holes represented a character or operational code (op-code) in some form of encoding, usually in binary. When the tape was fed through a reader the information on the tape was interpreted by the computer and reassembled into the program or data.

Of course, long strips of paper are fragile and must be kept dry. But reels of paper tape are cheap to produce, light, easy to transport, and not affected by magnetism. Shorter runs of paper tape were sometimes used in a concertina fashion, with lengths of the paper tape folded back over itself, repeatedly. The stack of punched paper was fed through the tape reader and hand-folded back into a neat stack.

The paper tapes could be toughened to a degree, but that led to a dilemma. The tougher you make the paper the more you reduce its flexibility. Some paper tapes I’ve seen employed quite a heavyweight paper with a waxy finish in an effort to make them more robust and at least a little waterproof. Some of the more expensive paper tapes were actually a sandwich of paper, a stretched polyester film, and paper.

Where Did Punched Paper Tapes Come From?

Machines being fed information from perforated paper or card were in use as long ago as the early 1700s when punched cards were used to control automated looms. The punched cards were joined together in a long flexible belt that was fed through the loom control machinery to dictate the pattern that was woven. Effectively, they behaved like a clunky punched paper tape. Genuine punched paper tape was introduced In 1725.

In the late 19th and early 20th centuries waxed paper rolls were used in pianola or self-playing pianos. Self-playing instruments didn’t stop with pianos, however. It was possible, if you were rich enough, to have a machine called an orchestrion built for you. There are very few of these left in the world, and even fewer still in operation.

Many years ago I was lucky enough to see one working (sadly it is now in need of restoration) in Kinloch Castle on the Isle of Rum, off the West coast of Scotland. It was ordered by Queen Victoria, but she died in 1901 before it was completed. It was bought by a wealthy baronet who had it installed in his Castle. On his private island. I did say rich, right?

The music was encoded onto large paper rolls with a maximum of 108 holes per line of data. The orchestrion “read” the punched paper pneumatically. There were 108 pipes behind the roll, one for each possible hole. They were constantly trying to suck air into the machine.

If the paper had no hole in a certain position, that pipe couldn’t suck in air. If there was a hole, air was drawn in through the pipe which inflated a small bellows. This triggered a series of actuators that worked upon the various brass, keyboard, woodwind, and percussion instruments. Some holes represented musical notes, some holes represented registers and keys, and other holes represented the different instruments. Hearing it play Wagner’s Ride of the Valkyries whilst wondering if it was going to shake itself to bits was quite an experience.

Physically Reading the Tape

Back in the world of IT, punched tape readers have used a variety of techniques through the decades to read the data from the tapes. The earliest schemes were electro-mechanical. Levers or rods were either permitted to move or prevented from moving depending on the presence or absence of a hole. Later models used electrical contacts that would complete a circuit only when a hole in the tape was beneath the contact.

Later models used photo-electrical assemblies. Light is shone onto one side of the paper tape and sensors on the other side detect the light that comes through the perforations. Timing was everything, of course. Along with the data holes, the paper tape has another set of holes called sprocket holes.

A sprocket hole is present on every line of the tape, and are much smaller than the data holes. These sprocket holes mesh with a sharply cogged wheel. A sprocket wheel can be active and help propel the tape through the sensor, or it can be passive in which case it is turned by the paper moving over it. The sprocket holes were off-center on the paper tape. On a five-hole tape, the sprocket holes are between data holes two and three, and on an eight-hole tape, they are between data holes three and four.

This helps you to determine which way up the paper tape is. Usually, the manufacturer would print the word “top” every 20 inches or so (0.5 meters) along the length of the tape. Printed arrows indicated the required direction of travel through the reader. But not always. Sometimes they were completely blank. These would get scribbled on quickly to avoid mistakes, which was especially easy with folded concertina tapes that weren’t on spools.

Each sprocket hole lined up exactly with the center of the data holes on each line. When the sprocket wheel moved forward one “click” the system knew it was time to take another reading. It wasn’t “looking out for flashes” and trying to capture them, it knew when to take a reading. This meant that the tape could move through the read assembly at almost any speed and the readings would be taken at the correct instant for each line.

Booting Computers from Punched Paper Tape

As well as holding programs and tape, many of the mainframe and minicomputers of the day were booted from tape. Some of them, like the DEC PDP/11 range, didn’t even know they were a computer when they were power cycled. For all it knew, it was a toaster.

By toggling switches on the front panel you could set up instruction values and memory locations, op-code by op-code, punching them into memory one at a time. Once your short bootstrap program was entered into RAM like this, you could run it. It would allow you to read a tape. By that I mean it would read one particular tape, called the absolute loader. When the absolute loader tape was loaded you could use it to load other tapes.

By the end of that process, if all was, well… it knew it was a PDP/11.

The Coding Used on the Tape

Because of the different architectures and word sizes in use, the codes used to punch data onto the tapes varied from computer manufacturer to manufacturer. Many schemes used one data hole per line as a parity check bit. On an eight-hole tape, you’d have seven holes left for encoding data and four holes on a five-hole tape.

With a parity bit, on an eight-hole tape, you have seven bits to encode with. 1111111 in binary is 127 in decimal, meaning you have 128 different codes that can be punched into the tape—if you take 0000000 as the first code. These codes can be assigned to binary data values, op-codes, or they could be assigned to values representing letters.

Rarely would the computers of this period use plain ASCII, even though that standard had been available from 1967. It wasn’t even possible to encode ASCII on five-hole tapes. These were restricted to a very limited character set, and capital letters only. Even with an eight-hole tape, each manufacturer would add their own twist to the encoding, so pure ASCII was a scarcity.

To give you an idea of the code on the tape, if they were using ASCII, this is what “PAPER” would look like, using the seven data bits of an eight-hole tape.

P 1010000 
A 1000001 
P 1010000 
E 1000101 
R 1010010

Of course, to keep you on your toes, some systems reversed the bit order. In such a scheme, hole seven held bit one. Other encoding variants used Gray Code. This is written in binary, but only one bit changes at a time. This principle is used to aid error detection.

1 0000001
2 0000011
3 0000010
4 0000110
5 0000111
6 0000101

The Original Bit Bucket

Some tape readers were standalone devices, connected to the main computer by a harness of cabling. These readers were often used with concertina or fan-folded paper tape. It was rare to see them used with spools of paper tape. Although you could, of course, unspool the paper tape loosely into a container like a cardboard box let the reader whip through the length of the tape, and let it stream out the other side into another handy box.

Computer cabinets that incorporated paper tape readers had a feed spool and a take-up spool. The take-up spools were powered and pulled the tape through the tape reader head, across a platen that held the photo-electric assembly and the sprocket wheel.

With each revolution of the take-up spool more tape was transferred to it. So the diameter of the tape on the wheel grew progressively larger through the reading process. The amount of tape pulled through for one revolution of the take-up spool was much larger at the end of the run than it was at the beginning. So the paper tape was being pulled through at a steadily increasing rate.

This is where the sprocket wheel came into its own. Regardless of the speed of the tape, every time the sprocket wheel moved forward one click the system knew it was time to take a reading, making it a self-clocking system.

That didn’t stop some computer manufacturers going to great lengths to try to maintain a fast but constant transfer rate from one spool to the other. As the diameter of the tape on the take-up spool increased, the revolution speed of that spool was slowed down. The feed spool was also driven and that sped up as the take-up spool slowed down. Even the sprocket wheel was driven.

It never worked properly. If it got even slightly out of synchronization, different elements of the feed chain would be moving at different speeds and the paper tape was subjected to strains it couldn’t cope with. After all, it was only paper. It frequently snapped, or the sprocket wheel acted like a mini table-saw and cut the tape into two long strips. One of which had three holes in it and the other had five holes in it.

The workaround was to take off the take-up spool and let the tape fly out of the read assembly. A nimble young apprentice (yours truly) stood armed with a clean plastic dustbin trying to catch the cascading tape in it. He was then given the empty feed spool so that he could hand-wind the tape back onto it.

We had table-top splicing kits with integral punches to repair broken tapes. It was entirely possible, but tedious. Sellotape saved the day on more than one occasion.

What Has This Got to Do With Cyber Security?

For some, this is a trip down memory lane. For others, punched paper tapes are still a part of their day job. Specifically—and no doubt surprisingly—in the National Security Agency (NSA), one of the intelligence agencies of the US Department of Defense.

The NSA is phasing out paper tapes and will do so within 12 months. The final production run is going to happen this year. At their peak use, the NSA was creating millions of paper tapes per year. They were having it delivered in 5000 feet rolls—that’s almost a mile (1.5 kilometers)!

The tapes the NSA creates contain cryptographic keys or seed values for cryptography algorithms. These were distributed to whoever required them—such as the UK’s General Communications Headquarters (GCHQ)—in tamper-proof plastic containers. You have to destroy the container to remove the tape so it is obvious if the key or seed value is compromised.

Needless to say, the demise of paper tapes as a core element in the distribution and management of their cryptographic keys will see the NSA adopting digital methods.

It’s remarkable to think that some of the closest guarded secrets in the modern world are still relying on a medium that saw its birth in weaving looms in the 18th century, almost 300 years ago.