Probability of error 0.1 Messages per run 4 Word length 5
How to use this page and how error correcting codes work About this project

This page simulates the transmission model and uses repetition codes to correct noise errors. There are two sections: repetition code and custom code. The language of repetition code consist of same digit words, e.g. for two repetitions its {00, 11}, for three repetitions its {000, 111}.

The decoding algorithm counts the occurences of a certain digit in a word. The majority of digits in a word represents (with high probability) the original bit. 00101 is not a code word per se, but the closes codeword is 00000, hence 0 was probably the original information bit. However, when 0101 is received, the number of ones and zeroes is the same and there is no reason to prefer one digit to the other. In this case the algorithm recognizes that there has been an error, but cannot fix it.

Generally even number of digits can recognize up to n/2 errors and fix n/2-1 of them. 2 repetitions can detect one error, and fix zero, 4 repetitions can detect two errors, fix one and 6 repetitions can detect three errors and fix two. Odd number of digits can detect and fix (n-1)/2 number of errors. E.g. 3 repetitions can fix 1 error, 5 can fix 2.

Bits marked red were unsuccesfully decoded, whilst bits marked orange were decoded, but an error was found.

Repetition code

Repetitions 3 repeat words

Messages dispatched

Noise addition

Decoded message

Correct: 10

Undetected errors: 2

Detected errors: 3

All: 30

Raw success: 50% (detected errors as undetected)

Success: 60% (omitted detected errors)