Repetition codes use triple modular redundancy (TMR) or N-modular redundancy to correct errors. Each bit is repeated N times, and majority voting recovers the original data. Can correct up to (N-1)/2 bit errors per N-bit group. Simple but inefficient, widely used in critical systems like spacecraft.
| Property | Value |
|---|---|
| Category | Error Correction |
| Sub-category | Linear Codes |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | John von Neumann |
| Year | 1956 |
| Origin | πΊπΈ United States |
| Source | algorithms/ecc/repetition.js |
| Parameter | Supported values |
|---|---|
| Block sizes | 1 byte (8 bits) to 1048576 bytes (8388608 bits) |
| Flag | Value |
|---|---|
supportsErrorDetection |
Yes |
supportsErrorCorrection |
Yes |
Status: π Educational Only
No vulnerabilities are recorded for this implementation.
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Triple repetition: bit 0
| Field | Value |
|---|---|
repetitionCount |
3 |
input |
00 |
expected |
000000 |
Vector 2 β Triple repetition: bit 1
| Field | Value |
|---|---|
repetitionCount |
3 |
input |
01 |
expected |
010101 |
Vector 3 β Triple repetition: 1011 pattern
| Field | Value |
|---|---|
repetitionCount |
3 |
input |
01000101 |
expected |
010101000000010101010101 |
Vector 4 β Triple repetition: byte pattern
| Field | Value |
|---|---|
repetitionCount |
3 |
input |
0100000101000100 |
expected |
010101000000000000010101010101000000010101000000 |