On the previous page's examples, you could still understand the text, even after it had become corrupted a bit, because English (like all human languages) is redundant. That si whya lot fo txt can stll be read evn when it hs typos.
To protect the information in the computer, or on a CD (music or other data), one similarly introduces redundancy, enabling the computer or your CD player to correct for `typos' as they come along.
The very simplest idea is to make things redundant by repeating every bit. This is illustrated below: you can again type in a short sentence, and it will get translated into binary ASCII; in the window below that translation you see the effect of repeating every bit in this binary sequence. When you now click to simulate random bit flips, it is easy to detect where alterations have taken place: if two consecutive bits that should be equal, are in fact different, then something must have happened to that pair. But you cannot correct the mistake automatically: if a pair has become 10 then there is no way of knowing whether the pair was 11 before or 00.
In an applet below we will try to recover corrupted text in the following way: if the two bits in the pair are different, we will replace them by 00 in the first version and by 11 in the second. Please, input some words in the text window below and press return.
Bit Flipper for Double Code