Information Technology- IT Directory- connecting to knowledge...

Free Directory - Web Content providers


web stats



eXTReMe Tracker
0-9  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

Parity Bit and Error Checking

Errors are caused by noise and other faults during data transmission. Error checking is important in order to avoid mistakes and enhance accuracy of data. In general, error detection techniques involve adding some extra data or redundant data to a message that is being transmitted.  An example of simple error checking technique is the use of parity checking bit.

Parity checking

There are two types of parity checking techniques, these involves the use of the even parity bit or odd parity bit. Data are as a rule divided into groups of set bits, which are usually a set of seven or eight bits.  In even parity checking, an additional bit is added to the number of set bits to make the total number of 1’s in the data (including the parity bit) an even number. Also, for the odd parity checking, an additional bit is added to make the total number of binary 1 in the set of bits an odd number.

Using the Even Parity

When the total number of 1s in a given set of bits (excluding the parity bit) is odd, then the parity bit is set to 1 and added to the given set of bits. This will set the total number of 1s in the bits of data (now including the parity bit) to even. If the total is already even, then the parity bit is set to 0.

Using the Odd Parity

When the total number of 1s in a given set of bits (excluding the parity bit) is even, then the parity bit is set to 1 and added to the given set of bits. This will set the total number of 1s in the bits of data (now including the parity bit) to odd. If the total is already odd, then the parity bit is set to 0.


Examples


Transmission Situation 1 - Number of 1s in a set of data is odd
7 bits of data = 1010001 (number of 1s in this set of data = 3, which is a odd number).


Using the Even Parity
Using even parity, add the parity bit 1 and the set of data becomes:
11010001 (8 bits of data including the parity bit), total number of 1s becomes even.


Using the Odd Parity
Using odd parity, total number is already odd, parity bit is set to 0 and the set of data becomes:
01010001 (8 bits of data including the parity bit).


Transmission Situation 2 - Number of 1s in a set of data is even
7 bits of data = 0000011 (number of 1s in this set of data = 2, which is a even number)


Using the Even Parity
Using even parity, total number of 1s is already even, parity bit is set to 0 and the set of data becomes:
00000011 (8 bits of data including the parity bit)


Using the Odd Parity
Using odd parity, add the parity bit 1 and the set of data becomes:
10000011 (8 bits of data including the parity bit), total number of 1s becomes odd.


A parity bit can detect an odd number of bit errors. The receiver checks each group of data for errors, and if a transmission error is detected, an error message may be sent and the data will have to be discarded totally, the transmission process will have to be repeated.
The parity checking system is a basic error checking system. It can only detect single bits of errors   and cannot correct errors.
Better error checking methods are the CRC (cyclic redundancy checks)/ checksums).

See also:

CRC Error Detection – How CRC Works

Further Reading:

Parity bit   - Wikipedia, the free encyclopedia

Adverts