Illustration: A plain prison cell wall of rough plaster and brick, a single small barred window letting in light, a knuckle resting against the wall as if about to tap.
An illustration drawn for this article, not a photograph of the events.

A code remembered in a cell

Captain Carlyle “Smitty” Harris, a US Air Force pilot, was shot down in an F-105 Thunderchief over North Vietnam on 4 April 1965 and taken to Hoa Lo prison in Hanoi, which the prisoners called the Hanoi Hilton. Prisoners there were held in isolation and forbidden to communicate. Harris remembered a code an instructor had described during his Air Force training, a method said to have been used by prisoners of war in the Second World War.

In June 1965 Harris was briefly held in a cell with three other aviators, Navy Lieutenant Phillip Butler, Air Force Lieutenant Robert Peel and Navy Lieutenant Commander Robert Shumaker, and he taught them the code. When the guards separated them into solitary cells, they used it to tap to their neighbours, and from there it spread through the prison system.

How the tap code works

The tap code is not Morse code. It is based on a five-by-five grid of letters, the same principle as a Polybius square, named after the Greek historian who described a similar scheme. The alphabet has 26 letters and the grid has 25 squares, so K is dropped and C is used in its place. The rows read A B C D E, F G H I J, L M N O P, Q R S T U, V W X Y Z.

Each letter is sent as two groups of taps: first the row, then the column, with a short pause between. A is one tap, pause, one tap. B is one tap, pause, two taps. The letter R, in the fourth row and second column, is four taps, pause, two taps.

Why not Morse

Morse depends on the difference between a short signal and a long one. Through a wall, a knock is a knock: it has no length. Prisoners could tap Morse by using spacing to stand in for dots and dashes, but it was hard to keep consistent and easy to misread. Many prisoners did not know Morse well, and learning it in solitary confinement with no way to practise would have been slow. The tap code needed only counting, and anyone could learn the grid in minutes once it was explained.

The grid could also be sent without tapping. Jeremiah Denton, held in the same prisons, is credited with a version in which coughs, sniffs and sneezes stood for the taps, so that prisoners could signal across a courtyard in front of guards. Prisoners also used hand signals when they could see one another. Denton did use true Morse once, in a filmed interview in 1966, by blinking his eyes.

Spreading the code through the prison

Over time the prisoners built a system of abbreviations to save taps. GN meant good night and GBU meant God bless you, which was often tapped to a man brought back from interrogation. The code carried names of new arrivals, instructions from senior officers, news, prayers and lessons. It let prisoners keep track of who was held and who was alive.

In early 1973 North Vietnam released the American prisoners it held, under the arrangement the US military called Operation Homecoming. Many of them later credited the tap code with keeping them sane through long periods of isolation. Harris retired from the Air Force as a colonel.

Start learning the code