World Library  
Flag as Inappropriate
Email this Article

Tap code

Article Id: WHEBN0003554669
Reproduction Date:

Title: Tap code  
Author: World Heritage Encyclopedia
Language: English
Subject: Smithy code, Polybius square, Knock three times, Reihenschieber, Slidex
Publisher: World Heritage Encyclopedia

Tap code

Roman alphabet tap code
1 2 3 4 5
1 A B C/K D E
2 F G H I J
3 L M N O P
4 Q R S T U
5 V W X Y Z
The tap code table

The tap code, sometimes called the knock code, is a way to encode text messages on a letter-by-letter basis in a very simple way. The message is transmitted using a series of tap sounds, hence its name.

The tap code has been commonly used by prisoners to communicate with each other. The method of communicating is usually by tapping either the metal bars, pipes, or the walls inside a cell.


  • Design 1
  • History 2
  • References 3
  • External links 4


The tap code is based on a Polybius square using a 5×5 grid of letters representing all the letters of the Latin alphabet, except for K, which is represented by C.

The listener only needs to discriminate the timing of the taps to isolate letters.

Each letter is communicated by tapping two numbers

  • the first designating the row
  • the second designating the column

For example, to specify the letter "B", one taps once, pauses, and then taps twice.

Or to communicate the word "water", the cipher would be the following (the pause between each number in a pair is smaller than the pause between letters):

5, 2
1, 1
4, 4
1, 5
4, 2
····· ··
· ·
···· ····
· ·····
···· ··

The letter "X" is used to break up sentences, and "K" for acknowledgements.

Because of the difficulty and length of time required for specifying a single letter, prisoners often devise abbreviations and acronyms for common items or phrases, such as "GN" for Good night, or "GBU" for God bless you.[1]

By comparison, Morse code is harder to send by tapping or banging because it requires the ability to create two differently sounding taps (representing the dits and dahs of Morse code). A Morse code novice would also need to keep a "cheat sheet" until he or she remembers every letter's code, which the captors would likely confiscate. Tap code can be more easily decoded in one's head by mentally using the table. For example, if you hear four knocks, you can think A...F...L...Q. Then after the pause, you hear three knocks and think Q...R...S to arrive at the letter S.


The origins of this encoding go back to the Polybius square of Ancient Greece. As the "knock code", a Cyrillic script version is said to have been used by nihilist prisoners of the Russian czars.[2] The knock code is featured in Arthur Koestler's classic 1941 work Darkness at Noon.[3]

United States prisoners of war during the Vietnam War are most known for having used the tap code. It was introduced in June 1965 by four POWs held in the Hỏa Lò Prison "Hanoi Hilton" prison: Captain Carlyle "Smitty" Harris, Lieutenant Phillip Butler, Lieutenant Robert Peel, and Lieutenant Commander Robert Shumaker.[1] Harris had heard of the tap code being used by prisoners in World War II[4] and remembered a United States Air Force instructor who had discussed it as well.[1]

In Vietnam, the tap code became a very successful way for otherwise isolated prisoners to communicate.[4] POWs would use the tap code in order to communicate to each other between cells in a way which the guards would be unable to pick up on. They used it to communicate everything from what questions interrogators were asking (in order for everyone to stay consistent with a deceptive story), to who was hurt and needed others to donate meager food rations. It was easy to teach and newly arrived prisoners became fluent in it within a few days.[5][6] It was even used when prisoners were sitting next to each other but not allowed to talk, by tapping on anothers' thigh.[6] By overcoming isolation with the tap code, prisoners were able to maintain a chain of command and keep up morale.[4]


  1. ^ a b c : The Tap Code"Return with Honor".  
  2. ^ David Kahn, The Codebreakers - The Story of Secret Writing. 1967. ISBN 978-0-684-83130-5.
  3. ^ Koestler, Arthur, Darkness at Noon (1941). Translated by Daphne Hardy. See page 19 of the Bantam Publishing paperback, 1981 printing for more info.
  4. ^ a b c Staff Sgt. Jason Tudor (1998-03-18). "Vets, Flyers discuss ideology, time in POW camps".  
  5. ^   pp. 211–212.
  6. ^ a b   pp. 171–172, 187–188.

External links

  • Online Tap Code Encoder/Decoder
  • Russian Prison Tap Codes
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.