Parity


 

 

 

 

 

Parity is the name given to the process whereby each word, or series of bits which represent a character, is examined, and the number of 1`s and 0`s is calculated. An additional bit is then added to the word, with the value of this bit depending on whether there is an odd or even number of 1`s or 0`s .

If EVEN parity is required, the additional bit is set to a 0 if there is already an even number of 1`s. If however there is an odd number of 1`s, the additional bit is set to a 1 - this means that the whole word now contains an even number of 1`s.

If ODD parity is required, the additional bit is set to a 0 if there is already an odd number of 1`s. If however there is an even number of 1`s, the additional bit is set to a 1 - this means that the whole word now contains an odd number of 1`s.

Since 7 bits is enough to describe the ASCII character set, the addition of the parity bits brings the transmitted word up to 8 bits.

In the receiver, the number of 1`s is counted in each 8 bit word, and if the number is the required even or odd number, the word is accepted as correct.

If however the number is not the required even or odd number, the receiver rejects the word as having been corrupted.

Obviously, the receiver has to know in advance whether it is expecting odd or even parity.

This process will only detect corruption if an odd number of bits have been reversed, ie, 1, 3, 5.

If an even number of bits have been reversed, ie, 2, 4, 6, the parity will still appear to be correct and the word accepted as correct, even though it is garbage.

 


© 1998 Ron Turner


Return to the data transmission home page