Exp - 9 Linear Block Code
Exp - 9 Linear Block Code
Apparatus: MATLAB
Theory:
In the linear block codes, the parity bits and message bits have a linear combination, which
means that the resultant code word is the linear combination of any two code words.
Let us consider some blocks of data, which contains k bits in each block. These bits are
mapped with the blocks which has 'n' bits in each block. Here 'n' is greater than 'k'. The
transmitter adds redundant bits which are 'n−k' bits. The ratio k/n is the code rate. It is
denoted by 'r' and the value of 'r' is r < 1.
The n−k bits added here, are parity bits. Parity bits help in error detection and error
correction, and also in locating the data. In the data being transmitted, the left most bits of the
code word correspond to the message bits, and the right most bits of the code word
correspond to the parity bits.
CODE:
disp('Messages:');
x