Techâ—Źâ—Źâ—Źâ—Źâ—ŹDifficulty 4 of 5

How can a scratched CD or a distant spacecraft fix errors nobody ever saw?

A CD can lose a 2.5 mm stripe of data to a scratch and still play perfectly, thanks to a trick with polynomials from 1960.

â–¶ Start the story

They send extra data computed so cleverly that the missing or wrong parts can be rebuilt. Every error-correcting scheme adds redundancy. The simplest, a parity bit, can tell that something went wrong but not where, so the data has to be sent again. Reed–Solomon codes, invented by Irving Reed and Gustave Solomon in 1960, can find and repair the damage on the spot, without asking the sender for anything.

The trick is to turn the message into a curve. Picture a message of two numbers as a straight line: two numbers are enough to pin down a line. Instead of sending just those two numbers, you send four points on that line. If any two points are lost, the other two still pin down the same line. If one point arrives wrong, it sticks out: the other three still line up, and the odd one can be fixed. Real Reed–Solomon codes do the same with polynomials, curvier cousins of lines, over many points.

The rule of thumb is precise. Add t extra check symbols and the code can repair up to t symbols if it knows where the damage is, or t/2 if it has to find the damage too. That is why a QR code reader treats an unreadable patch as a known gap: known gaps are twice as cheap to fix.

Error correction with a straight line
  1. Step 1: Message as a line

    Two numbers are enough to define a straight line.

  2. Step 2: Send extra points

    Send four points on the line instead of two.

  3. Step 3: Lose two? Fine

    Any two surviving points still define the same line.

  4. Step 4: One wrong? Spot it

    Three points still line up; the odd one is the error.

A CD layers two such codes and shuffles the data so that a scratch is spread thinly over many blocks. The result can fully correct bursts of up to 4,000 bits, about 2.5 mm of disc. The same idea protected the pictures sent home by the Voyager probes from 1977.

Two versions of the Mona Lisa side by side: on the left, speckled with white missing pixels, black false pixels and a white stripe; on the right, clean.
The Mona Lisa as received by a NASA spacecraft, with errors from Earth's atmosphere (left), and after Reed–Solomon correction (right).Photo: Xiaoli Sun, NASA Goddard · Public domain

Quiz me

0/3

  1. 1.In the straight-line picture of Reed–Solomon coding, why can one wrong point be found and fixed?
  2. 2.Why can a Reed–Solomon code repair twice as many erasures as unknown errors?
  3. 3.How does a CD survive a scratch that wipes out thousands of bits in a row?

Recap

Add t check symbols: fix t gaps you can see, or t/2 errors you have to find.

Surprising fact · Error correction was born from Richard Hamming's frustration at a computer that gave up on his jobs every weekend.

Sources (5)

No source, no claim. Every fact in this lesson (29 claims) cites at least one of these.

  1. [1]Reed–Solomon error correction · Wikipedia
  2. [2]Error detection and correction · Wikipedia
  3. [3]Hamming code · Wikipedia
  4. [4]Lunar Reconnaissance Orbiter · Wikipedia
  5. [5]Voyager program · Wikipedia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗