Computer Science, asked by kuma56r, 11 months ago

please explain nicely. soooooo many points. explain the error checking in computer networks using single and double dimensional parity checking method. please help. may God bles youu. no copying from net.

Answers

Answered by manavjaison
3

Heya friend ,

Here we go :

> Error Detection

While transmitting data over network, some error may occur, and data may get corrupted due to various reasons with the natural disturbances like thunderstorms being one of the most frequent one.

If, for instance, the user is trying to send a data in binary form as 1010110 and the data received by the receiver is 1010100. If you look carefully, the 2nd bit from the right has changed.

This means that the intended data has not reached the receiver node and hence it is an error.

We'll be discussing two of the methods (asked by you) now -

1) Single Dimensional Parity Checking

Before we move on, let's understand what actually a parity is :-

A Parity refers to the additional bit added to the actual data which is intended to be transmitted by the user.

Single Dimensional Parity Checking works as described below :-

For understanding purposes, let's suppose the sample data to be -

11010010 and 11001011

1) We count the number of 1's in the actual data unit.

     > In 11010010, the number of 1's is 4 , which is an even number.

     > In 11001011, the number of 1's is 5, which is am odd number.

2) Adding the extra bit (parity)

We add the parity bit (either 0 or 1) to the actual data which is to be transmitted so that the number of 1's together with the parity bit, becomes even or remains even, i.e.

> for odd number of 1's, we add 1 as the parity bit, and,

> for even number of 1's, we add 0 as the parity bit.

        1 1 0 1 0 0 1 0    0 (0 parity is added because number of 1's is even)

        1 1 0 0 1 0 1 1     1  (1 parity is added because number of 1's is odd)

The data transmitted at the end is along with the parity bit.

3) Now, after transmission, let's check what happens at the receiver node

From the received data, excluding the parity bit, we determine the parity bit once again using the same process, i.e., by calculating the number of 1's in the received data.

If the received parity bit matches with the calculated parity bit, data is considered as CORRECT, otherwise the received data unit is considered as CORRUPTED data and hence is rejected at the receiver node.

Suppose if the received data was -

11010010 and 11001001

> For the received data unit 11010010, recalculating the parity bit from the data unit :-

          1 1 0 1 0 0 1 0   0

The calculated parity bits comes out to be 0 and the received parity bit was 0 too, hence we can see,

the data has NO ERROR !

Now,

> For the received data unit 11001001, recalculating the parity bit from the data unit :-

       1 1 0 0 1 0 0 1   0

The calculated parity bit comes out to be 0 while the received parity was 1 as we saw earlier. Hence,

the data has ERROR !

Advantages of this method -

  1. It is a simple mechanism which is very easy to implement.
  2. It is an inexpensive technique which is used for detecting the error in the data transmission.

Drawbacks of this method -

  1. It can detect only single - bit errors which occur rarely.
  2. If in the data bit, two bits gets interchanged, then the error will not be detected.  

2) Two - Dimensional Parity Checking

This is an enhanced version of single dimensional parity checking technique. It works with multiple data simultaneously.

Let's take the multiple data being sent are :

11000101

01001001

00101101

10111010

1) First of all, we will organize the data units being sent, one below other, so that it appears to be a table of bits, i.e.,

   

1 1 0 0 0 1 0 1

0 1 0 0 1 0 0 1

0 0 1 0 1 1 0 1

1 0 1 1 1 0 1 0

2) Calculate parity bits for each data unit both row - wise and column - wise. Here, in the table, we can see, there are 4 rows and eight columns of bit.

So, we calculate column parity and row parity as we did in the single - dimensional parity checking.

For understanding, let's consider the first and the last column, the first column has two 1's which is already even and hence we add 0 as the parity bit and for the last column we have three 1's which is odd and hence we add 1 as parity bit.

Now, we can calculate the parity bits for all rows and columns. Then the data units will now be transmitted with the row parity bits and column parity bits

The transmitted data will be like -

1 1 0 0 0 1 0 1              0

0 1 0 0 1 0 0 1              1

0 0 1 0 1 1 0 1              0

1 0 1 1 1 0 1 0              1

0 0 0 1 1 0 1 1

3) At the receiver end, after transmission,

The row parity bits and column parity are again calculated and checked using the received data parity bits.

Advantages of this method -

  1. It is more efficient than the single dimensional parity technique.
  2. It can detect multiple bit errors, which is difficult to be detected while using the single bit errors.

Drawbacks of this method -

  1. It cannot detect data having multiple bit errors like - if two bits in one data unit gets corrupted and the two bits at the exact same position in another data unit gets corrupted too so that they do not affect row - and - colomn parities, then such an error will not be detected.
  2. This technique cannot detect the 4-or more-bit errors in most cases.

Thanks !

@Manav

^_^

Similar questions