Introduction to Data Communications
Previous 20c. Parity Bits Next

20c. Parity Bits

In asynchronous communications, a simple error checking method is used: Parity Checking. There are 3 types of Parity Bits: Even, Odd and None. None means that there is no Parity Checking and the Parity Checking is disabled!

Even Parity Generation

Even Parity counts the number of 1s in the data to see if the total is an even number. If the number of 1s is an even number then the Parity bit is set to 0. If the number of 1s is an odd number, then the Parity bit is set to 1 to make the total number of 1s an even number. The Even Parity Bit is used to make the total number of 1s equal to an even number.

Data Even Parity Bit
0100 1010
1
3 x 1s in Data: 3 is an odd number, Parity Bit = 1
0111 1110
0
6x 1s in Data: 6 is an even number, Parity Bit = 0
1010 1010
?
What should the parity bit be?

Even Parity Checking

When a data with even parity is received. The number of 1s in both the data and the parity bit are counted. If the number of 1s is an even number than the data is good data, if it is an odd number than the data is corrupted.

Data Even Parity Bit
0100 1010
1
4 x 1s in data and parity bit = Good data
0111 1110
1
7 x 1s in data and parity bit = Bad data
1010 1010
0
Is this good or bad data?


Odd Parity Generation

Odd Parity is the opposite of Even Parity. Odd Parity counts the number of 1s in the data to see if the total is an odd number. If the number of 1s is an odd number then the Parity bit is set to 0. If the number of 1s is an even number, then the Parity bit is set to 1 to make the total number of 1s an odd number. The Odd Parity Bit is used to make the total number of 1s equal to an odd number.

Data Odd Parity Bit
0100 1010
1
3 x 1s in Data: 3 is an odd number, Parity Bit = 0
0111 1110
0
6x 1s in Data: 6 is an even number, Parity Bit = 1
1010 1011
?
What should the parity bit be?


Introduction to Data Communications
Previous Table of Contents Next