DEV Community

Malik Moazzam
Malik Moazzam

Posted on

The Secret Code POWs Tapped Through Prison Walls (No Radio, No Ink, Just Knuckles)

 In 1965, US Navy pilot Charles Boyd was shot down over North Vietnam and taken to the prison later nicknamed the "Hanoi Hilton." Guards forbade any talking between prisoners. What they couldn't stop was tapping.

Boyd and fellow POWs used a system that traces directly back to Morse code, adapted into something called "tap code" — a 5x5 grid where letters are represented by a pair of knock counts (row, then column). No dots, no dashes, no equipment. Just knuckles on concrete, or a spoon on a pipe.

Why a Grid Instead of Dots and Dashes

Standard Morse relies on two clearly different signal lengths — short and long. That's easy to send with a key or a flashlight, but nearly impossible to send reliably by tapping, since a "long tap" and a "short tap" sound almost identical through a wall. So POWs (the method is credited to Air Force Captain Carlyle "Smitty" Harris, who'd learned a version of it during survival training) swapped duration-based encoding for count-based encoding: tap, pause, tap-tap = row 1, column 2 = the letter "B."

It's a small but clever engineering trade-off — same underlying goal (compress the alphabet into a physical signal) as Morse code, but re-optimized for a completely different channel with different noise characteristics. Anyone who's worked with signal encoding will recognize the pattern: the "protocol" changes shape depending on the medium, even when the information being sent is identical.

Prisoners used tap code to share names, warn each other about interrogations, and — perhaps most importantly — to simply stay sane and connected during years of isolation. Entire conversations happened one knock at a time, through walls, without guards ever noticing.

Trying It Yourself

If you want to see how the grid system actually maps letters (and how it compares to standard dot-dash Morse), there's a breakdown of it here: Tapping Morse Code — How It Works. You can also cross-reference it against the full Morse alphabet, or run text through a live Morse translator to see the dot-dash version side by side.

Wild that a wartime survival hack from the 1960s and a 19th-century telegraph encoding scheme are, underneath it all, solving the exact same compression problem.

Top comments (0)