Skip to content

Morse Tree

Dot goes left, dash goes right. Every character is a path, and once you see the tree you stop memorising a table.

 

 

Keyboard: dot on the left arrow or the full stop, dash on the right arrow or the hyphen, back on backspace.

What the shape tells you

Three things become obvious the moment the code is drawn as a tree, and none of them are obvious in a list:

  • E and T sit at the top because they are the most frequent letters. Everything else hangs below them, which is why a text in Morse is shorter than it would be with equal-length codes.
  • Characters above one another are confusable. H is directly below S, and 5 below H - each one element more. That is not a coincidence of the alphabet, it is a property of the tree.
  • The left side fills up faster than the right. Dots are shorter, so dot-heavy characters were given to frequent letters. The tree leans, and the lean is the compression.

Decoding by walking

The tree is not only a picture, it is how a receiving operator actually works - or at least how a machine does. Start at the root, take a step left for every dot and right for every dash, and when the gap comes, read off where you are standing.

Try it with the buttons or the arrow keys. Two dots and a dash, and you are on U. One more dot and you are nowhere: there is no character at that path, which is exactly what an error sounds like.

Frequently asked questions

  • Why do some places in the tree have no character?

    Because not every path was assigned. Around 40 characters live in a tree that has 126 places down to six elements. The empty ones are room that was never needed - and where an error lands.

  • How deep does the tree go?

    Seven levels. Most punctuation marks have six elements; the dollar sign is the only character with seven.

  • Is this how decoders work?

    Essentially, yes. Walking a tree is the fastest way to turn a sequence of elements into a character, which is why it is the standard implementation - including in the decoder on this site.