Wednesday, October 10, 2012

Computer Science - Parity bits error checking

Parity is a technique used in error checking when sending bits. It can detect any odd number of errors. Here we can take the example of sending ASCII characters. Lets say we want to send some data, like the character A, showed as the following

0|1000001

The reason why there is a divider on the first bit is because that bit is used to determine the parity of the sent message. Let us use the example of even parity. Similar to the way it is used in mathematics, parity refers to a form of symmetry, in this case parity maintains the number of even or odd 1s in a given row. If we want to maintain even parity we must keep the above at 0. Lets say we want to send C represented by

1000011

Which means the parity bit should become to maintain even parity

1|1000011

Now we can expand this to increase the amount of errors this can handle. We can check the columns as well as the rows. For example, lets try sending ABC

0|1000001
0|1000010
1|1000011

We then ensure that the columns retain even parity in the number of 1's so


0|1000001
0|1000010
1|1000011
1 1000000

Now we can be safe against 1, 2, and 3 bit errors, but not 4 bit errors. For example if in the B and C codes 4 adjacent 0's turned to 1 we wouldn't be able to tell like so.

0|1000001
0|1011010
1|1011011
1 1000000

However this is the limitation of parity error checking, but as you can see its a simple block error checking mechanism which is why it was one of the first methods implemented. For ease, we have used even error checking but in practice where this is used, odd parity error checking is used.

No comments:

Post a Comment