Codes and CiphersIntroduction
In the early 2000s, the Colombian government was fighting a civil war against groups of insurgents, who were hiding in camps in the South American rainforest. Occasionally, soldiers were captured by these rebels, and then had to spend months or even years in captivity.
It is easy to lose hope when you’ve been chained up in a hostage camp for such a long time, unable to see your family, and guarded by armed guerilla forces. However, in 2010, there was reason to be hopeful: the army was approaching, and planning to rescue them shortly.
Unfortunately, it seemed impossible to tell the prisoners that lp was coming, without also alerting their capturers – that is, until Colonel Jose Espejo came up with an ingenious idea. With his team, he wrote a new pop song, embedded a secret message in the chorus, and then played it thousands of times over the radio.
To the rebels, it sounded just like meaningless music, but to the prisoners listening in, it was a message of hope. See if you can spot the message – it starts around 1:30.
There are many other examples in our world, where we want to communicate with others, but we can’t use our voices or text. Maybe your friend lives across the street from you. At night, you secretly talk to each other using flashlights – without waking up your family by shouting.
For example, one short flash might mean “hello” or “yes”. One long flash might mean “how are you?”, and two short flashes might mean “good night”. Can you come up with any other signals you might need?
However, even if you agree many different signals for different words or questions, it will be difficult to have more complex conversations, or to talk about new topics…
In the early 19th century, the only way to transmit messages across long distances was my mail or by messenger. Companies like the “Pony Express” ran delivery routes with couriers riding on horses, but it could still take days or even weeks to send a message between distant cities.
This all changed in 1837, with the invention of the
The first commercial telegraph was developed by William Forthergill Cooke and Charles Wheatstone, and used compass needles to point at different letters on a display.
One year later, the inventor
Pressing a button at one end of the telegraph line closes an electronic circuit. This means that current is flowing, which triggers a buzzing sound at the other end of the telegraph line.
To send more complex messages, Morse represented every letter in the alphabet using a unique sequence of short beeps (called dits or dots) and long beeps (called dahs or dashes):
For example, to transmit the letter E, we just have to send one
Now we can send any message by first converting its letters into Morse code, and then tapping out the corresponding dots and dashes on the telegraph.
One of Morse’s goals was to keep the messages as short as possible. This is why common letters like E and T have a very short code, while uncommon letters like J or Q have much longer codes.
Morse code quickly became popular all around the world. Trained operators can send around 25 words per minute, which corresponds to six dots or dashes every second!
The most famous Morse code signal is “SOS”, which indicates that you have an emergency and need help. It consists of three dots, followed by three dashes, followed by three more dots. Try writing other words or sentences in this box, and watch how they are encoded as Morse code:
Morse code was also what the Colombian army used to send a message to the hostages. Translated from Spanish, the message was 19 PEOPLE RESCUED. YOU’RE NEXT. DON’T GIVE UP. Listen to the song once more, and see if you can hear the dots and dashes in the background:
If you don’t know Morse code, this may just sound like part of the music – but the hostages were soldiers who had been trained in Morse code, and recognized it in the song when they heard it on the radio. A few days later, they were rescued and safely returned home.
It turns out that there were many other examples throughout history, where Morse code has been used to communicate secret (or not so secret) messages:
Codes and Information
Wherever we look, we are surrounded by
But this is only the beginning, and there is a huge variety of codes that can be used for different purposes, or to encode different kinds of information. In this course, we will explore some of the most important and most interesting ones.
Codes are not a recent invention – they were used by ancient cultures, many thousands of years ago.
For example, guards along the Great Wall of China used smoke to warn each other about potential attacks. Different tribes of indigenous peoples in North American each had their own signalling systems: they created columns of smoke by burning damp grass, which allowed them to communicate over long distances.
Smoke signals are even used today, for example as a distress signal at sea. And when a new Pope is elected by the College of Cardinals, the outcome of each vote is indicated by black or white smoke.
There are many other examples where words or letters are not the best way to express information. Here are some other codes you might have heard of:
Many letters sound very similar – especially when spoken over the phone or radio, with loud background noise. That’s why the military, police, pilots, and many others use the NATO Phonetic Alphabet when they have to spell names. Here, every individual letter is replaced with a unique word:
For example, saying “Mike–Alpha–Tango–Hotel–Sierra” would spell the word
Ships can use Maritime Signal Flags, which are hung from their masts, to communicate with other ships within sight range.
All flags have different colours or patterns, and represent a different letter:
For example, if you see the flags on a passing ship, you should
Flag Semaphore is another way to communicate using flags, which was used long before the invention of the telegraph. In this case, all flags are the same, but holding them in different positions indicates different letters:
The Beatles wanted to use Semaphore to spell the word “HELP” on the cover of their album with the same name.
However, they didn’t like the way these specific letters looked – so they just chose four random letters instead! As you can see, they ended up spelling the word
The Genetic Code
Codes even appear inside our own body! The
A strand of DNA consists of billions of these nucleotides, which contain the instructions for the development and functioning of our body. We can represent them using sequences of the letters A, T, C and G.
Similar to Morse code, every three consecutive nucleotides correspond to a specific
The genetic code has space for
Finally, remember that the same symbol can mean completely different things within different codes. For example, the letter C can be represented by “Charlie” in the NATO Phonetic Alphabet, it could be the maritime flag , or it can represent Cytosine if placed within a strand of DNA letters.