Tap code

The tap code is a cipher, commonly used by prisoners to communicate with one another. The method of communicating is usually by "tapping" either the metal bars or the walls inside the cell, hence its name. It is a very simple cipher, not meant to avoid interception, since the messages are sent in cleartext.

United States prisoners of war during the Vietnam War are most known for having used the Tap Code.

Design
The original tap code is based on a 5×5 grid of letters, representing all the letters of the Latin alphabet except K (C is used to represent K). Each letter was communicated by tapping two numbers: the first designated the row (horizontal) and the second designated the column (vertical). The letter "X" was used to break up sentences. The tap code requires the listener to only discriminate the timing of the taps to isolate letters. For example, to specify the letter "A", one would tap once, pause, and then tap once again.

Or to communicate the word "WATER" the cipher would be the following (the time between each pair of numbers is smaller than the one between two different letters):

..... .. . .  .... ....  . .....  .... ..   (5,2)  (1,1)   (4,4)    (1,5)     (4,2)     W      A       T        E         R

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.

By comparison, Morse code is harder to send by tapping or banging because Morse requires the ability to create two different sounding taps. A Morse novice would also need to keep a cheat sheet until he remembers every letters code, which his captors would likely confiscate. Tap code can be easily decoded in one's head by mentally using the table.

Zanzibar Land Uprising
During Operation Intrude F014, Dr. Drago Pettrovich Madnar used a modified version of the tap code to communicate his radio frequency to Solid Snake from his prison cell. This version used a 5x7 grid in order to accomodate numbers.

Trivia

 * Although Roy Campbell uses the tap code to communicate his change of radio frequency to Snake, this is most likely non-canon since FOXHOUND would employ a more sophisticated cipher.
 * The tap code was included in the original MSX2 manual for Metal Gear 2: Solid Snake. Its use in the game is an attempt at preventing videogame piracy, since one must own the original game to have a copy of the manual.
 * Of the two occurences of tap code in MG2, only Pettrovich's radio frequency is required for completing the game, and is given in the manual for Metal Gear Solid 3: Subsistence (in which the game was re-released). It does not give the tap code table itself, nor the frequency for Campbell.