/ˈɛrər kəˈrɛktɪŋ koʊd/

noun … “Detect and fix data errors automatically.”

Error-Correcting Code (ECC) is a method used in digital communication and storage systems to detect and correct errors in transmitted or stored data. ECC adds redundant bits to the original data according to a specific algorithm, allowing the system to recover the correct information even if some bits are corrupted due to noise, interference, or hardware faults. This is crucial for maintaining data integrity in memory, storage devices, and network transmissions.

Key characteristics of Error-Correcting Code include:

  • Redundancy: extra bits are generated from the original data to enable error detection and correction.
  • Error detection: the code can identify that one or more bits have been altered.
  • Error correction: based on the redundant bits, the system can reconstruct the original data.
  • Algorithms: includes Hamming codes, Reed-Solomon codes, and Low-Density Parity-Check (LDPC) codes.
  • Applications: widely used in ECC RAM, SSDs, wireless communication, and satellite transmissions.

Workflow example: Correcting a single-bit error using Hamming code:

data = 1011
encoded = encode_hamming(data)        -- Adds parity bits
received = 1111                        -- One bit corrupted during transmission
corrected = decode_hamming(received)   -- Detects and corrects the error

Here, the redundant parity bits in the encoded data allow the receiver to detect the single-bit error and restore the original data accurately.

Conceptually, Error-Correcting Code is like sending a message with extra spelling hints: even if some letters are smudged or lost, the recipient can reconstruct the intended message reliably.

See LDPC, Turbo Codes, Memory, Flash, Communication.