Parity Check - Error Detection

  1. Single Parity Check-

 

In this technique,

  • One extra bit called a parity bit is sent along with the original data bits.
  • Parity bit helps to check if any error occurred in the data during the transmission.

Steps Involved-

Error detection using single parity check involves the following steps-

Step-01:

At sender side,

  • Total number of 1’s in the data unit to be transmitted is counted. 
  • The total number of 1’s in the data unit is made even in case of even parity.
  • The total number of 1’s in the data unit is made odd in case of odd parity.
  • This is done by adding an extra bit called the parity bit.

Step-02:

  • The newly formed code word (Original data + parity bit) is transmitted to the receiver.

Step-03:

At receiver side,

  • Receiver receives the transmitted code word.
  • The total number of 1’s in the received codeword is counted. Then, following cases are possible-
  • If total number of 1’s is even and even parity is used, then receiver assumes that no error occurred.
  • If total number of 1’s is even and odd parity is used, then receiver assumes that error occurred.
  • If total number of 1’s is odd and odd parity is used, then receiver assumes that no error occurred.
  • If total number of 1’s is odd and even parity is used, then receiver assumes that error occurred.

 

Parity Check Example-

 

Consider the data unit to be transmitted is 1001001 and even parity is used. 

 

At Sender Side-

  • Total number of 1’s in the data unit is counted.
  • Total number of 1’s in the data unit = 3.
  • Clearly, even parity is used and total number of 1’s is odd.
  • So, parity bit = 1 is added to the data unit to make total number of 1’s even.
  • Then, the code word 10010011 is transmitted to the receiver.









 

At Receiver Side-

  • After receiving the code word, total number of 1’s in the code word is counted.
  • Consider receiver receives the correct code word = 10010011.
  • Even parity is used and total number of 1’s is even.
  • So, receiver assumes that no error occurred in the data during the transmission.

 

Drawbacks Of Single Parity Checking

  • It can only detect single-bit errors which are very rare.
  • If two bits are interchanged, then it cannot detect the errors.


 

 

 

 

2. Two-dimensional Parity check 

Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. Parity check bits are also calculated for all columns, then both are sent along with the data. At the receiving end these are compared with the parity bits calculated on the received data.