**1 Answer**

written 19 months ago by |

**Solution:**

As seen from the second Parity Code example, it is possible to use a table to hold all the codewords for a code and to look up the appropriate codeword based on the supplied data word Alternatively, it is possible to create codewords by addition of other codewords.

This has the advantage that there is now no longer the need to hold every possible codeword in the table.

If there are k data bits, all that is required is to hold k linearly independent codewords, i.e., a set of k codewords none of which can be produced by linear combinations of 2 or more codewords in the set.

The easiest way to find k linearly independent codewords is to choose those which have '1‘ in just one of the first k positions and '0‘ in the other k-1 of the first k positions.

For example for a (7,4) code, only four codewords are required,

$ \begin{array}{lllllll}\\ 1 & 0 & 0 & 0 & 1 & 1 & 0 \\\\ 0 & 1 & 0 & 0 & 1 & 0 & 1 \\\\ 0 & 0 & 1 & 0 & 0 & 1 & 1 \\\\ 0 & 0 & 0 & 1 & 1 & 1 & 1\\ \end{array} $

So, to obtain the codeword for data word 1011, the first, third, and fourth codewords in the list are added together, giving 1011010.

Since codewords are given by summations of the ai vectors, then to avoid 2 data words having the same codeword the ai vectors must be linearly independent.

Sum $(\bmod 2)$ of any 2 codewords is also a codeword, i.e., Since for datawords $\mathrm{d} 1$ and $\mathrm{d} 2$ we have $\mathrm{d}_3=\mathrm{d}_1+\mathrm{d}_2$ So,

$ \begin{aligned} &\mathrm{c}_3=\sum_{i=1}^k d_{14} \mathrm{a}_i=\sum_{i=1}^k\left(d_{1 t}+d_{2 u}\right) \mathrm{a}_t=\sum_{i=1}^k d_{1 t} \mathrm{a}_t+\sum_{i=1}^k d_{2 i} \mathrm{a}_i \\ &\mathrm{C}_3=\mathrm{C}_1+\mathrm{C}_2 \end{aligned} $