Grades 9–12 · Computing
What can three-bit repetition correct—and what can it miss?
Repeating a data bit adds redundancy, meaning extra information that can help distinguish some corrupted messages. This three-bit repetition code represents 0 as 000 and 1 as 111. Those two valid codewords differ in all three positions, giving a minimum Hamming distance of three. Hamming distance counts differing bit positions.
In the diagramThree repeated bits can correct one flipGiven received word10Codeword 000Codeword 1112 differing bits1 differing bitDecode → 1Sender 1 · 1 flip · decoded correctlyRedundancy is not secrecy or authentication.
A receiver uses majority decoding: it chooses the bit appearing at least twice in the received triple. The initial received word is 101, with two ones and one zero, so it decodes to 1. In the teaching comparison, the sender transmitted 1 as 111; only the middle position changed.
Every single bit flip can be corrected because the received word remains closer to the original codeword than to the other one. One flip leaves a distance of one from the sent codeword and two from its alternative. This is the code's bounded guarantee, not a promise to undo arbitrary corruption.
Two flips reverse that advantage and majority decoding returns the wrong bit. Three flips transform one valid codeword into the other. A separate validity check can notice a mixed triple, but it cannot distinguish an unchanged valid word from one produced by three flips.
The receiver does not normally know the sender's original bit or the true number of flips. That information is supplied only for explanation here. Redundancy addresses these substitution errors; it does not hide the message, prove who sent it, or guarantee correction of insertions, deletions or larger error patterns.
About this explanation
Starting knowledge: Read binary strings, count unequal positions and distinguish a guarantee from a result in one example.
Sources
- Massachusetts Institute of Technology, 18.310 — Matrix Hamming Codes: Distance and repetition decoding