Morse code: chart, translator and mnemonics
Morse code replaces each letter with a short series of short and long signals. A short signal is called a dot and a long one a dash. The letter A is a dot and a dash, .-, and the letter E is just a single dot. The signal can be a beep, a flash of a torch, a tap on a radiator pipe or the wave of a flag. Anything that can be short and long will do.
The whole trick is that common letters were given short codes and rare ones long codes, so an ordinary message is sent quickly.
Morse code is not a cipher but a code. It hides nothing, it only converts a message into another form. Anyone with the chart can read it. The difference between encoding and encryption is explained in the article Cryptography. Today you will meet Morse code among radio amateurs and on radio beacons for aircraft, scouts use it in every camp game, and people who cannot speak or move spell out words with it by blinking.
Translator into Morse code and back
Type any text and the translator turns it into Morse code. It leaves out accents (č is sent as c). In the Czech notation there is a slash after every letter, two after a word and three at the end of the message; in the international notation letters are separated by a space. We go through both notations in detail below.
The default text, “Sraz u chaty v sobotu v 9”, is Czech for “meet at the cabin on Saturday at 9”.
And the other way round: paste in a message written in Morse code and the translator will read it. It recognises both notations, and it also accepts · for a dot and – or — for a dash. If it meets a group of dots and dashes that means no letter (for example because of a typo), it prints # in its place.
Morse code chart
We give the letters according to the international standard published by the International Telecommunication Union (ITU). CH is missing from the standard; we have added it to the chart because Czech uses it (and Germans write it the same way).
| character | code | character | code | character | code |
|---|---|---|---|---|---|
| A | .- |
I | .. |
R | .-. |
| B | -... |
J | .--- |
S | ... |
| C | -.-. |
K | -.- |
T | - |
| D | -.. |
L | .-.. |
U | ..- |
| E | . |
M | -- |
V | ...- |
| F | ..-. |
N | -. |
W | .-- |
| G | --. |
O | --- |
X | -..- |
| H | .... |
P | .--. |
Y | -.-- |
| CH | ---- |
Q | --.- |
Z | --.. |
All the digits have five dots or dashes:
| digit | code | digit | code |
|---|---|---|---|
| 1 | .---- |
6 | -.... |
| 2 | ..--- |
7 | --... |
| 3 | ...-- |
8 | ---.. |
| 4 | ....- |
9 | ----. |
| 5 | ..... |
0 | ----- |
You do not need to learn the digits one by one; it is enough to notice the pattern. One starts with one dot, two with two dots, three with three and dashes fill the rest up to five, so three is ...--. Five is five dots in a row. From six on it flips round: six starts with one dash, seven with two, and so on, and the rest are dots. Zero is made of five dashes.
The most common punctuation according to the ITU:
| character | code | character | code |
|---|---|---|---|
| full stop . | .-.-.- |
slash / | -..-. |
| comma , | --..-- |
bracket ( | -.--. |
| colon : | ---... |
bracket ) | -.--.- |
| question mark ? | ..--.. |
quotation marks | .-..-. |
| apostrophe ' | .----. |
equals sign = | -...- |
| hyphen - | -....- |
plus + | .-.-. |
| at sign @ | .--.-. |
The exclamation mark and the semicolon are missing from the standard. Some charts give codes for them, but the receiver may not know them, so it is better to replace them with a full stop or a comma. The @ sign was added only in 2004, so that email addresses could be sent. And anyone who makes a mistake while sending sends eight dots, ........, as an error signal and starts again.
Mnemonics for remembering Morse code
Czech children learn Morse code through words. Each letter has a word or short phrase that begins with it (only Q has “kvílí orkán”, “the hurricane wails”, because there are hardly any Czech words beginning with Q). Each syllable is one signal: a syllable with a long vowel (á, é, í, ó, ú, ů, ý) is a dash and a syllable with a short vowel is a dot. For example “a-kát” (a kind of tree): the first syllable has a short a, which is a dot, and the second a long á, which is a dash. So A is .-. Similarly “blýs-ka-vi-ce” (“lightning”) is one long syllable and three short ones, -..., which is B.
These mnemonics are a Czech custom and work only in Czech, because they depend on Czech vowel length and Czech words.
| letter | mnemonic | code |
|---|---|---|
| A | a-kát | .- |
| B | blýs-ka-vi-ce | -... |
| C | cí-lov-ní-ci | -.-. |
| D | dá-la-va | -.. |
| E | erb | . |
| F | Fi-li-pí-ny | ..-. |
| G | Grón-ská zem | --. |
| H | hra-cho-vi-na | .... |
| CH | chvá-tá k nám sám | ---- |
| I | i-bis | .. |
| J | jas-mín bí-lý | .--- |
| K | krá-ko-rá | -.- |
| L | lu-pí-ne-ček | .-.. |
| M | má-vá | -- |
| N | ná-rod | -. |
| O | ó náš pán | --- |
| P | pa-pír-ní-ci | .--. |
| Q | kví-lí or-kán | --.- |
| R | ra-rá-šek | .-. |
| S | se-ke-ra | ... |
| T | tón | - |
| U | u-če-ný | ..- |
| V | vy-u-če-ný | ...- |
| W | Wal-trův vůz | .-- |
| X | Xé-no-kra-tés | -..- |
| Y | ý se ztrá-cí | -.-- |
| Z | zná-má že-na | --.. |
Other charts have different words (“dálnice”, “holubice”, “sobota”, “trám”…). On the internet there are also some that do not follow the rule. Before you learn a mnemonic, count the syllables in it.
Mnemonics are handy for a camp game, where a message is decoded with a pencil in hand. Telegraphists and radio amateurs learn differently, though: straight from the sound. They pronounce a dot as “di” and a dash as “dah”, and remember the letter A as “di-dah”, not as a word that first has to be recalled and then split into syllables.
How Morse code is written
On paper it must be clear where one letter ends and the next begins. For example .-. is R, but it could just as well be A followed by E (.- and .). So letters need a separator. Two notations are used.
The international notation separates letters with a space and words with a slash:
.--- . / - --- is JE TO (Czech for “it is”).
The Czech notation, as scouts and hikers know it, puts a slash after every letter. After the last letter of a word there are two slashes instead of one, and at the end of the message three:
.---/.//-/---/// is also JE TO.
A slash is easy to see even on a scribbled note or in chalk on a wall, whereas a space between two dots is easily lost.
Accents are left out: č is sent as c, ř as r, ů as u. It does not matter, since “sraz u chaty” can be read without the accents. The one Czech peculiarity is CH, which has its own signal ----. So before a game, agree whether CH is written as a single character or as C and H. The word “chata” (Czech for “cabin”) is ----/.-/-/.-/// in Czech notation, four characters, whereas in the international notation it would be five, -.-. .... .- - .-.
The Morse code tree
We can draw Morse code as a tree. We start from the starting point at the top. Every dot means a step down to the left, every dash a step down to the right. When the code ends, we stop and we are at the letter we are looking for.
The orange path leads to the letter R: left (dot), right (dash), left (dot), that is .-.. On the way we passed E and A, because E is . and A is .-. The tree also helps with decoding. If you hear a dot, a dash, a dot, run your finger down the branches and you end up at R.
How many letters fit in the tree? On the first level there are two places, E and T. From each place two paths lead on, so on the second level there are four places, on the third eight and on the fourth sixteen. The numbers beside the levels on the right of the picture are powers of two:
These are arrangements with repetition: there are as many codes of length four as there are ordered quadruples that can be made from two symbols, that is 24 = 16.
That is enough for the 26 letters of the English alphabet, with four places to spare, all on the fourth level: the letters take up 12 places out of 16. Czech has filled one of them with the letter CH; the remaining three are dashed in the picture and are left free in the international alphabet. Other languages put their own letters in them. For the ten digits there is no room in the first four levels, which is why they have five dots and dashes. The fifth level has 25 = 32 places, so ten digits fit in comfortably.
Timing and the SOS signal
On paper we make do with dots, dashes and slashes. But when sending by sound or light there are no slashes, and everything depends on the length of the signal and the length of the silence. These are measured in units, with the length of a dot taken as one unit:
- a dot lasts 1 unit,
- a dash lasts 3 units,
- the gap between dots and dashes inside one letter lasts 1 unit,
- the gap between letters lasts 3 units,
- the gap between words lasts 7 units.
How long a unit is depends on how fast someone sends. What matters are the ratios. For radio amateurs a dot lasts a tenth of a second or less; a beginner with a torch at camp finds a dot of about half a second and a dash of about a second and a half comfortable. The picture shows the message TO JE (Czech for “that is”): in the orange sections the signal sounds, and below the axis are the gaps. Grey marks gaps inside letters, blue gaps between letters, and red the gap between words.
The whole message lasts T (3) + gap between letters (3) + O (11) + gap between words (7) + J (13) + gap between letters (3) + E (1), 41 units in total. The letter O is three dashes and two gaps between them, 3 + 1 + 3 + 1 + 3 = 11, and J is a dot and three dashes, 1 + 1 + 3 + 1 + 3 + 1 + 3 = 13.
The most famous message in Morse code is the distress signal SOS: three dots, three dashes, three dots. It is not sent as three letters S, O, S, though. It is one continuous character ...---... with no gaps between the letters, so it cannot be mistaken for anything else. The animation shows how SOS flashes on a torch and how the timeline underneath fills up unit by unit.
As a single character SOS lasts 23 units: nine signals make 3 · 1 + 3 · 3 + 3 · 1 = 15 units and the eight gaps between them add another eight. If it were three letters, the two gaps between them would last three units instead of one and the total would be 23 + 2 · 2 = 27 units.
Why does E have just a dot?
Look at the chart again. E is ., T is -, but Q is --.- and Y is -.--. The lengths are not random: the letters that appear most often in text were given the shortest codes. In English text about 12.7% of all letters are E and 9.1% are T, whereas Z is only about 0.07% (more about this in the article Frequency analysis). The picture orders the letters by frequency, with the code under each one, coloured by length: red for one signal, orange for two, blue for three, green for four.
According to the traditional story, Alfred Vail, Morse’s partner, came up with this in a print shop: he counted the pieces of type the printers had in stock and gave the shortest codes to the most common ones.
How much does this save? If all the letters were equally common, a code would have an average of
Computers use the same idea, short codes for common things, when they make files smaller, for example Huffman coding.
A short history
The telegraph and its code were devised from the 1830s by the American painter Samuel Morse together with Alfred Vail. Historians mostly credit Vail with the alphabet of dots and dashes, but it bears Morse’s name. The first famous message was sent on 24 May 1844 from Washington to Baltimore and read “What hath God wrought”. The present international form of the code was adopted by the telegraph conference in Paris in 1865.
The SOS distress signal has been in use since 1908. It is not an abbreviation; people only made up “Save Our Souls” for it later. At sea, Morse code was used until 1 February 1999, when it was replaced by a satellite system. Radio amateurs still send it today, because it gets through even where a voice would be lost in the noise.