Self-synchronizing code

Self-synchronizing code is a special kind of line code that is easy to synchronize (having two computers "stay in time with" each other when "communicating"). Code like this happens in telecommunications.

Information on computers is made from binary bits - 0's and 1's (OFFs and ONs). This means that when a computer is being "communicated to", it must "listen" for bits at the correct speed by staying synchronized, or else there will be a misunderstanding. A computer needs to notice misunderstandings immediately, so that wrong things don't happen.

Confusion can happen when two signals combine or misalign, so it's helpful for different "words" in a code to be unique from each other.

Example

  • Imagine a language with the only "letters" being 0 and 1, and no spaces or other symbols.
  • This language only has "words" with exactly two letters.
    • This means that computers "reading" this language would start "reading" the "sentence" at the first two letters, then the next two letters, and so on.
  • Two computers, Alice and Bob, have to say the sentence 1100001100 to each other, and it needs to be understood as 1100001100.
    • Alice says the sentence to Bob correctly.
    • Bob's "sentence" gets de-synchronized on its way to Alice, and the first "letter" gets chopped off. This turns the "sentence" into 100001100.

Code A: self-synchronizing

Imagine the language only has the words 00 and 11.

  • Alice's sentence 1100001100 is heard by Bob as "11, 00, 00, 11, 00", meaning 1100001100.
  • When Bob's sentence 100001100 is heard by Alice as "10, 00, 01, 10, 0", Alice knows there's been a misunderstanding at the very beginning, because "10" is not a word in its "language" code.

Code B is self-synchronizing, because its "words" are very different from each other, and hard to confuse with each other.

Code B: not self-synchronizing

Imagine the language has the words 00, 11, and 10.

  • Alice's sentence 1100001100 is heard by Bob as "11, 00, 00, 11, 00", meaning 1100001100.
  • When Bob's sentence 100001100 is heard by Alice as "10, 00, 01, 10, 0", it doesn't realize there's been a misunderstanding until it hears the third "word" "01". By that time, it's already heard 1000.

Code B is not self-synchronizing, because its "words" are too similar to each other, and easy to confuse with each other.