A digital channel may change transmitted bits because of thermal noise, impulse noise, interference, fading, attenuation, timing error or intersymbol interference. A channel encoder maps k information bits to an n-bit codeword; the added n−k bits are redundancy used to identify or repair invalid received patterns.
Error-control taxonomy: detection identifies corruption, FEC adds redundancy for local correction, and ARQ uses feedback and retransmission.
Error detection decides only that the received word is invalid, so the receiver discards, flags or requests retransmission. Error correction locates the most likely error pattern and rebuilds a valid codeword locally. No finite code corrects an unlimited number of arbitrary errors.
A single-bit error flips exactly one bit, e.g. 10110110→10100110. Multiple random errors corrupt several separated positions. A burst error spans from the first to the last corrupted bit; its burst length counts any correct bits in between:
A lower code rate means more redundancy and potentially stronger protection, but more bandwidth or lower net information rate. The receiver exploits the algebraic structure of valid codewords to decide plausibility and, for a correcting code, the nearest valid word.
Data is arranged in rows and columns; a parity bit is added to each row and a parity row across columns (the column set is the Longitudinal Redundancy Check, LRC). A single flipped data bit fails exactly one row and one column, and their intersection locates — hence corrects — the bit.
C1
C2
C3
C4
Row parity
R1
R2
R3
Col. parity
Two-dimensional (row/column) even parity; the LRC is the bottom row.
Some rectangular patterns with an even number of changes in every affected row and column remain undetected.
A checksum treats data as fixed-width words. Internet-style checksums use one’s-complement arithmetic with end-around carry.
Checksums are simple to implement in software and detect many common error patterns, but a well-designed CRC provides stronger guaranteed burst-error detection.
CRC interprets a bit string as a polynomial over GF(2), where addition and subtraction are both XOR. Let D(x) be the data, G(x) the agreed generator of degree r, R(x) the remainder (degR<r) and T(x) the codeword.
Because subtraction equals addition in GF(2), T(x) is exactly divisible by G(x).
CRC flow: the message is shifted by xr, divided mod-2 by the generator g(x), and the remainder is appended as the frame-check sequence; the receiver re-divides and a zero remainder indicates no detected error.
The Hamming distance between equal-length words is the number of positions in which they differ (the weight of their XOR); e.g. d(101100,100110)=2. The minimum distancedmin is the smallest distance between any two distinct codewords.
Turning one valid codeword into another needs ≥dmin changes; for correction the radius-t decoding spheres must not overlap. Hamming (7,4) has dmin=3, so it corrects one error (or detects up to two if used only for detection). Reliable simultaneous double-error detection needs an added overall parity bit (SECDED).
Hamming code is a linear block code for single-error correction.
An r-bit syndrome has 2r possible values. The all-zero value represents the no-error state, and a distinct nonzero value must identify each of the m+r possible single-bit error positions. Thus at least m+r+1 syndrome states are required.
For m=4, r=3 suffices since 23=8≥4+3+1. Parity bits occupy power-of-two positions 1,2,4; data occupy 3,5,6,7.
Hamming (7,4) bit layout: parity P1,P2,P4 at power-of-two positions 1,2,4; data D1 – D4 at 3,5,6,7. Each parity bit covers the positions whose binary index includes its weight.
Adding one overall parity bit yields SECDED (Single-Error Correction, Double-Error Detection): the ordinary syndrome locates a single error while the overall parity separates single from double errors.
The transmitter sends structured redundancy so the receiver corrects errors without asking for a resend. Examples: Hamming/BCH block codes, Reed–Solomon, convolutional, turbo and LDPC codes. FEC suits large round-trip delay, absent feedback and continuous real-time delivery (satellite, broadcast, deep-space).