In: Computer Science
TWO DIMENSIONAL PARITY
We will make a Two Dimensional array from the message bit. After that, according to the even or odd parity, We will fill make the last column and last row of the matrix.
Total Parity Bits – i + j + 1 (Row+Column+1)
Here Parity Bit = 3 + 5 +1 = 9
One point is to be Remember that the Value of (i, j ) should be of message array i.e. inspite of having the value of i = 4, j = 6 (which is of array with parity bits). we will take value of message array i.e i=3, j=5.
Row and column parity bits are known as Redundant Bits i.e i+j+1.
The code that is to be transmitted will be the whole message
included Redundant Bits.
For ex :
Now, this code is transmitted and reaches the receiver side, where the receiver will again form a similar Two Dimensional array.
CASES OCCURS IN TWO DIMENSIONAL PARITY
CASE 1 :
Suppose a bit is in error. Then it can be easily detected and the code is corrected. As shown in fig.
CASE 2 :
When two erroneous bits are detected and corrected. The undesired part is that two other bits also detected as an incorrect bit.
CASE 3 :
When odd no. of error takes place in a particular row or particular column.
CASE 4 :
When even no. of error takes place in a particular row.
CASE 5 :
Where the error is not detected so not corrected.
HAMMING CODES
Hamming code is a liner code that is useful for error detection up to two immediate bit errors. It is capable of single-bit errors.
In Hamming code, the source encodes the message by adding redundant bits in the message. These redundant bits are mostly inserted and generated at certain positions in the message to accomplish error detection and correction process.
Calculating the Hamming Code
The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows:
Here is an example:
A byte of data: 10011010
Create the data word, leaving spaces for the parity bits: _ _ 1 _ 0
0 1 _ 1 0 1 0
Calculate the parity for each parity bit (a ? represents the bit
position being set):
Finding and fixing a bad bit
The above example created a code word of 011100101010. Suppose the word that was received was 011100101110 instead. Then the receiver could calculate which bit was wrong and correct it. The method is to verify each check bit. Write down all the incorrect parity bits. Doing so, you will discover that parity bits 2 and 8 are incorrect. It is not an accident that 2 + 8 = 10, and that bit position 10 is the location of the bad bit. In general, check each parity bit, and add the positions that are wrong, this will give you the location of the bad bit.