Error-correcting codes are used to improve the reliability of transmission over noisy channels. The main idea is to add some well-structured redundancy, which helps the receiver to recover the transmitted data, despite of the noise introduced by the channel.
In this webdemo, we are interested in the following linear block codes.
The repetition code is the simplest error-correcting code, in which every symbol is repeated $n$ times, where $n$ is the codeword length.
Example for $n=2$:
The repetition code has a minimum hamming distance $d_{min}=n$.
Odd length repetition codes (i.e., $n$ is odd) are perfect codes.
Code 2:Code rate $r=\frac{k}{n}=\frac{1}{2}$.
The valid codewords are:
\begin{align*} M_{code2}= \left(\begin{array}{cc|cc} 0 &0&0&0\\ 0&1&1&0\\ 1&0&1&1\\ 1&1&0&1 \end{array} \right) \end{align*}Thus the encoding rule can be expressed as $\mathbf{c}=(\mathbf{u},u_1 \oplus u_2,u_1$).
Code 3:
Code rate $r=\frac{k}{n}=\frac{1}{2}$.
The valid codewords are:
\begin{align*} M_{code3}= \left(\begin{array}{ccc|ccc} 0&0&0&0&0&0\\ 0&0&1&0&1&1\\ 0&1&0&1&0&1\\ 0&1&1&1&1&0\\ 1&0&0&1&1&0\\ 1&0&1&1&0&1\\ 1&1&0&0&1&1\\ 1&1&1&0&0&0 \end{array} \right) \end{align*}Thus the encoding rule can be expressed as $\mathbf{c}=(\mathbf{u},u_1 \oplus u_2,u_1 \oplus u_3,u_2 \oplus u_3$).
Code 4 ((8,4) extended Hamming code):
We first describe the (7,4) Hamming code in the following
The main parameters of the (8,4) extended Hamming code can be summarized as follows
Hamming codes are "perfect codes".