Learning path

Full curriculum

Full curriculum

Unit content

Hamming distance and error-control coding

A channel code maps $k$ information bits to an $n$-bit transmitted codeword, adding structured redundancy.

The code rate is

$$R_c=\frac{k}{n}.$$

For two equal-length binary strings, the Hamming distance $d_H$ is the number of bit positions in which they differ.

A code's minimum distance $d_{min}$ is the smallest Hamming distance between any pair of distinct valid codewords.

If

$$d_{min}\ge s+1,$$

then any pattern of up to $s$ bit errors can be detected. If

$$d_{min}\ge 2t+1,$$

then up to $t$ bit errors can be corrected by choosing the nearest valid codeword.

Increasing minimum distance generally requires more redundancy and therefore lowers code rate. Error-control coding trades transmission rate and decoding complexity for greater reliability by making valid transmitted sequences farther apart.