← Signals & codes

A code study edition

English ↔ Tap code

A Dream Within a Dream · knocked through the wall

Edition: complete · every letter as row and column knocks · unreviewed project draft

The tap code is a way to spell through a wall with knocks. American prisoners of war in North Vietnam used it for years to talk between cells they were forbidden to speak from. Each letter is two groups of knocks, its row and its column in a five-by-five grid. Here the whole poem is set in the code, and the panel turns anything you type into knocks.

Knock it out

•• ••• •• ••••

Each dot is one knock. A short gap splits row from column; a longer one ends the letter. Try your own name.

486letters, each a row and a column
85different words to practise
1965the code starts spreading among prisoners in Hanoi
2,811knocks to send the whole poem

Part one / The poem

The poem, line by line

Every letter of Poe's poem as its row and column. Spaces separate letters, and a slash separates words. Punctuation has no knock, so it is dropped. Select a line number for its study note.

LineEnglish · sourceTap code · row and column
Take this kiss upon the brow! 44 11 13 15 / 44 23 24 43 / 13 24 43 43 / 45 35 34 33 / 44 23 15 / 12 42 34 52
And, in parting from you now, 11 33 14 / 24 33 / 35 11 42 44 24 33 22 / 21 42 34 32 / 54 34 45 / 33 34 52
Thus much let me avow — 44 23 45 43 / 32 45 13 23 / 31 15 44 / 32 15 / 11 51 34 52
You are not wrong, who deem 54 34 45 / 11 42 15 / 33 34 44 / 52 42 34 33 22 / 52 23 34 / 14 15 15 32
That my days have been a dream; 44 23 11 44 / 32 54 / 14 11 54 43 / 23 11 51 15 / 12 15 15 33 / 11 / 14 42 15 11 32
Yet if hope has flown away 54 15 44 / 24 21 / 23 34 35 15 / 23 11 43 / 21 31 34 52 33 / 11 52 11 54
In a night, or in a day, 24 33 / 11 / 33 24 22 23 44 / 34 42 / 24 33 / 11 / 14 11 54
In a vision, or in none, 24 33 / 11 / 51 24 43 24 34 33 / 34 42 / 24 33 / 33 34 33 15
Is it therefore the less gone? 24 43 / 24 44 / 44 23 15 42 15 21 34 42 15 / 44 23 15 / 31 15 43 43 / 22 34 33 15
All that we see or seem 11 31 31 / 44 23 11 44 / 52 15 / 43 15 15 / 34 42 / 43 15 15 32
Is but a dream within a dream. 24 43 / 12 45 44 / 11 / 14 42 15 11 32 / 52 24 44 23 24 33 / 11 / 14 42 15 11 32
I stand amid the roar 24 / 43 44 11 33 14 / 11 32 24 14 / 44 23 15 / 42 34 11 42
Of a surf-tormented shore, 34 21 / 11 / 43 45 42 21 / 44 34 42 32 15 33 44 15 14 / 43 23 34 42 15
And I hold within my hand 11 33 14 / 24 / 23 34 31 14 / 52 24 44 23 24 33 / 32 54 / 23 11 33 14
Grains of the golden sand — 22 42 11 24 33 43 / 34 21 / 44 23 15 / 22 34 31 14 15 33 / 43 11 33 14
How few! yet how they creep 23 34 52 / 21 15 52 / 54 15 44 / 23 34 52 / 44 23 15 54 / 13 42 15 15 35
Through my fingers to the deep, 44 23 42 34 45 22 23 / 32 54 / 21 24 33 22 15 42 43 / 44 34 / 44 23 15 / 14 15 15 35
While I weep — while I weep! 52 23 24 31 15 / 24 / 52 15 15 35 / 52 23 24 31 15 / 24 / 52 15 15 35
O God! Can I not grasp 34 / 22 34 14 / 13 11 33 / 24 / 33 34 44 / 22 42 11 43 35
Them with a tighter clasp? 44 23 15 32 / 52 24 44 23 / 11 / 44 24 22 23 44 15 42 / 13 31 11 43 35
O God! can I not save 34 / 22 34 14 / 13 11 33 / 24 / 33 34 44 / 43 11 51 15
One from the pitiless wave? 34 33 15 / 21 42 34 32 / 44 23 15 / 35 24 44 24 31 15 43 43 / 52 11 51 15
Is all that we see or seem 24 43 / 11 31 31 / 44 23 11 44 / 52 15 / 43 15 15 / 34 42 / 43 15 15 32
But a dream within a dream? 12 45 44 / 11 / 14 42 15 11 32 / 52 24 44 23 24 33 / 11 / 14 42 15 11 32

Part two / How it works

Five rows, five columns

The alphabet goes into a five-by-five grid, with K sharing C's square. Each letter is two groups of knocks: first its row, then its column.

12345
1ABC/KDE
2FGHIJ
3LMNOP
4QRSTU
5VWXYZ

1 · Row, then column

Knock the row number, pause, then knock the column number. In print the two groups are written as a two-digit pair.

H → •• ••• → 23

2 · K borrows C

Twenty-six letters will not fit twenty-five squares, so K is sent as C. Readers tell them apart from the word around them.

kiss → 13 24 43 43

3 · Pause between letters

A longer pause ends each letter. In this edition letters are separated by spaces and words by a slash.

dream → 14 42 15 11 32

4 · Shorten everything

Knocking is slow, so prisoners cut words down. GN was good night and GBU was God bless you.

GBU → 22 12 45

Practice

Read the knocks

A word from the poem is shown as row-and-column pairs. Pick the English word.

0 of 0 correct

Practice with every word

Every word of the poem

All 85 different words of the poem, in the order they first appear. Decode each pair with the grid, then reveal the English.

Tap code → English

How to practise

  1. Read each pair as row, then column.
  2. Find the letter in the grid above.
  3. Reveal, then find the word in the poem.
  4. Knock a word on a table to a friend and let them write it down.
See the full word list (85 words)
take44 11 13 15line 1 · 1×
this44 23 24 43line 1 · 1×
kiss13 24 43 43line 1 · 1×
upon45 35 34 33line 1 · 1×
the44 23 15line 1 · 6×
brow12 42 34 52line 1 · 1×
and11 33 14line 2 · 2×
in24 33line 2 · 5×
parting35 11 42 44 24 33 22line 2 · 1×
from21 42 34 32line 2 · 2×
you54 34 45line 2 · 2×
now33 34 52line 2 · 1×
thus44 23 45 43line 3 · 1×
much32 45 13 23line 3 · 1×
let31 15 44line 3 · 1×
me32 15line 3 · 1×
avow11 51 34 52line 3 · 1×
are11 42 15line 4 · 1×
not33 34 44line 4 · 3×
wrong52 42 34 33 22line 4 · 1×
who52 23 34line 4 · 1×
deem14 15 15 32line 4 · 1×
that44 23 11 44line 5 · 3×
my32 54line 5 · 3×
days14 11 54 43line 5 · 1×
have23 11 51 15line 5 · 1×
been12 15 15 33line 5 · 1×
a11line 5 · 10×
dream14 42 15 11 32line 5 · 5×
yet54 15 44line 6 · 2×
if24 21line 6 · 1×
hope23 34 35 15line 6 · 1×
has23 11 43line 6 · 1×
flown21 31 34 52 33line 6 · 1×
away11 52 11 54line 6 · 1×
night33 24 22 23 44line 7 · 1×
or34 42line 7 · 4×
day14 11 54line 7 · 1×
vision51 24 43 24 34 33line 8 · 1×
none33 34 33 15line 8 · 1×
is24 43line 9 · 3×
it24 44line 9 · 1×
therefore44 23 15 42 15 21 34 42 15line 9 · 1×
less31 15 43 43line 9 · 1×
gone22 34 33 15line 9 · 1×
all11 31 31line 10 · 2×
we52 15line 10 · 2×
see43 15 15line 10 · 2×
seem43 15 15 32line 10 · 2×
but12 45 44line 11 · 2×
within52 24 44 23 24 33line 11 · 3×
I24line 12 · 6×
stand43 44 11 33 14line 12 · 1×
amid11 32 24 14line 12 · 1×
roar42 34 11 42line 12 · 1×
of34 21line 13 · 2×
surf-tormented43 45 42 21 / 44 34 42 32 15 33 44 15 14line 13 · 1×
shore43 23 34 42 15line 13 · 1×
hold23 34 31 14line 14 · 1×
hand23 11 33 14line 14 · 1×
grains22 42 11 24 33 43line 15 · 1×
golden22 34 31 14 15 33line 15 · 1×
sand43 11 33 14line 15 · 1×
how23 34 52line 16 · 2×
few21 15 52line 16 · 1×
they44 23 15 54line 16 · 1×
creep13 42 15 15 35line 16 · 1×
through44 23 42 34 45 22 23line 17 · 1×
fingers21 24 33 22 15 42 43line 17 · 1×
to44 34line 17 · 1×
deep14 15 15 35line 17 · 1×
while52 23 24 31 15line 18 · 2×
weep52 15 15 35line 18 · 2×
O34line 19 · 2×
God22 34 14line 19 · 2×
can13 11 33line 19 · 2×
grasp22 42 11 43 35line 19 · 1×
them44 23 15 32line 20 · 1×
with52 24 44 23line 20 · 1×
tighter44 24 22 23 44 15 42line 20 · 1×
clasp13 31 11 43 35line 20 · 1×
save43 11 51 15line 21 · 1×
one34 33 15line 22 · 1×
pitiless35 24 44 24 31 15 43 43line 22 · 1×
wave52 11 51 15line 22 · 1×

Background

Talking through walls

An ancient grid

The five-by-five square goes back to the Greek historian Polybius in the 2nd century BC, who described signalling letters by their row and column with torches.

Prison walls

Prisoners in Russian jails knocked a similar code for decades; Arthur Koestler describes one in Darkness at Noon (1940).

The Hanoi Hilton

In 1965 Captain Carlyle “Smitty” Harris taught the code to fellow American prisoners in North Vietnam, and it spread cell to cell for the rest of the war.

Sources

Pages consulted

  • Tap code, Wikipedia
  • Polybius square, Wikipedia
  • Arthur Koestler, Darkness at Noon (1940)
  • Accounts by former POWs of the tap code at Hỏa Lò Prison, Hanoi