Skip to content
KinPilot™Learn & Explore
Menu

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.

D10 visual explanationThe repetition code maps 0 to 000 and 1 to 111. Their Hamming distance is 3. Received 101 contains 2 ones and 1 zeros, so majority decoding chooses 1. The sender bit was 1, encoded 111; 1 positions differ from that sent codeword. The decoded bit is correct. Any one flipped bit can be corrected. Two flips miscorrect under majority decoding, and three flips can turn one valid codeword into the other without an invalid-word warning. This adds redundancy, not secrecy or authentication.Three repeated bits can correct one flipGiven received word101Codeword 000Codeword 1112 differing bits1 differing bitDecode → 1Sender 1 · 1 flip · decoded correctlyRedundancy is not secrecy or authentication.

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.

The received word 101 has a majority of ones and decodes to 1. Compared with the supplied sent codeword 111, it contains one flipped bit, within the code's correction guarantee.

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
← Grades 9–12 topics