The Alphabet Someone Actually Designed
Look at the Morse code table and one thing stands out immediately:
E ·
T −
A ·−
I ··
N −·
S ···
Versus:
Q −−·−
J ·−−−
Y −·−−
Z −−··
The most common letters in English have the shortest codes. The rarest have the longest. That isn't a coincidence — it's a deliberate design decision made in the 1830s, and it's the same principle that underlies modern data compression.
How the Frequencies Were Determined
The commonly told story is that Alfred Vail, working with Samuel Morse, visited a local newspaper's print shop and counted the type in the compositors' cases. Printers stocked letters in proportion to how often they were used, so the quantity of each letter's type was a ready-made frequency table for English.
Whether the details of that account are exact, the outcome is clear enough in the code itself. E, the most frequent letter in English, gets a single dot — the shortest possible symbol. T, the second most frequent, gets a single dash.
The result is a code where average message length is minimised for English text. A message in Morse is shorter, in transmission time, than it would be with a fixed-length encoding.
The Principle Behind It
This is variable-length encoding, and the underlying idea is one of the foundations of information theory: assign short codes to frequent symbols, long codes to rare ones.
A fixed-length code would need five bits per letter to cover 26 letters. Morse averages considerably less than that for English text, because the common letters — which make up most of any message — use one or two symbols.
Claude Shannon formalised this in 1948, showing that the theoretical minimum average code length relates to the entropy of the source. David Huffman's algorithm, published in 1952, produces a provably optimal variable-length code for a given frequency distribution.
Morse code is a hand-built approximation of what Huffman coding does algorithmically, arrived at over a century earlier by counting type in a print shop.
Where Morse Falls Short of Optimal
It isn't actually optimal, and the reasons are instructive.
It's not a prefix code
A prefix code has the property that no complete symbol is the beginning of another symbol. That property makes a stream self-delimiting — you can decode it without any separator, because the moment you've read a valid code you know it's complete.
Morse fails this badly:
E ·
I ··
S ···
H ····
· is a prefix of ··, which is a prefix of ···. Reading a stream of dots, you can't tell where one letter ends and the next begins.
Morse solves this with timing, not structure. The gap between symbols within a letter is one unit; between letters, three units; between words, seven. The separators carry the information the code itself doesn't.
That's a third symbol in disguise. A truly optimal binary code wouldn't need it — which is precisely why Huffman codes are constructed to be prefix-free.
The unit costs aren't equal
Morse's design treats a dot and a dash as roughly equivalent when assigning codes, but they aren't. A dash is three units of transmission time; a dot is one. Add the one-unit gap after each symbol, and:
Dot = 1 unit signal + 1 unit gap = 2 units
Dash = 3 units signal + 1 unit gap = 4 units
A dash costs twice as much as a dot. Truly optimising for transmission time would weight the assignment accordingly, favouring dots more heavily than the historical code does.
It's optimised for one language
The frequency distribution is English. In German, E is also the most common letter, so it transfers reasonably. In other languages with different distributions, the efficiency gain is smaller. Codes for accented characters were added later and are generally longer.
Timing Is Half the Code
Because Morse isn't self-delimiting, the timing structure carries as much information as the symbols.
The standard ratios, in units:
Dot 1 unit
Dash 3 units
Gap between symbols 1 unit
Gap between letters 3 units
Gap between words 7 units
Everything scales together. "Faster" doesn't mean shortening the dots — it means shortening the unit, which shortens all five values proportionally.
Getting the ratios wrong is the classic beginner error. Sending correct dots and dashes with inter-letter gaps that are too short produces a stream a receiver can't segment. The symbols are right and the message is unreadable.
The Morse Code Translator handles the encoding and decoding:
- Enter text or Morse.
- Convert in either direction.
- Note how the spacing represents letter and word boundaries.
Reading the output alongside the letter frequencies makes the design visible — common letters produce short bursts, rare ones produce long ones.
The Same Principle, Everywhere
Once you recognise variable-length encoding, it turns up constantly.
File compression. ZIP, gzip and DEFLATE use Huffman coding to assign shorter bit sequences to frequently occurring byte values. Same principle, computed from the actual data rather than a general frequency table.
PNG images. The compression stage uses DEFLATE, which includes Huffman coding.
JPEG. Huffman coding is applied to the quantised coefficients.
MP3 and AAC. Huffman coding on the quantised frequency data.
UTF-8. A variable-length encoding for Unicode where ASCII characters take one byte and less common characters take two to four. Optimised on the assumption that ASCII dominates in practice — the same bet Morse made about English letter frequencies.
Keyboard layouts. QWERTY's design goals are disputed, but Dvorak explicitly places common letters on the home row — the same optimisation applied to finger movement rather than transmission time.
Shorthand systems. Pitman and Gregg both use shorter strokes for common sounds.
What Makes It Work at All
The deeper point: variable-length encoding only helps when the frequency distribution is skewed.
If every letter appeared equally often, no assignment of code lengths would beat a fixed-length code. The saving comes entirely from the fact that some symbols are far more common than others.
Natural language is extremely skewed — Zipf's law describes this pattern across words, and letter frequencies follow a similar shape. That skew is what Morse exploited, what Huffman formalised, and what makes text compress so much better than random data.
Random data can't be compressed at all, precisely because it has no skew to exploit.
FAQ
Why is E a single dot? Because it's the most common letter in English. Morse code assigns the shortest symbols to the most frequent letters to minimise average transmission time.
Is Morse code a prefix code? No. Shorter codes are prefixes of longer ones, which is why Morse depends on timed gaps between symbols to mark boundaries.
Is Morse code optimal? Close, but not quite. It isn't prefix-free, and it doesn't fully account for a dash costing three times as much transmission time as a dot.
What's the relationship to Huffman coding? Both assign shorter codes to more frequent symbols. Huffman does it algorithmically and produces a provably optimal prefix code; Morse was hand-built and isn't prefix-free.
Why does timing matter so much? Because the code isn't self-delimiting. The gaps between symbols, letters and words carry the segmentation information the symbols themselves don't provide.
Does the same principle apply to file compression? Yes. ZIP, PNG, JPEG and MP3 all use Huffman coding, which is the same idea applied algorithmically to whatever frequency distribution the data actually has.
The Takeaway
Morse code is one of the earliest practical applications of a principle that now underpins most of the compression on your computer: match code length to symbol frequency. It was arrived at by counting printer's type rather than by any formal theory, which makes it a striking example of the right answer being found a century before anyone proved it was right.
Convert text to Morse code and back free with the Morse Code Translator at sadiqbd.com — no sign-up, instant results.