The Parity Bit
A number or character can be stored as a pattern of bits. In storage or retrieval, or in
transmission, error can occur. To ensure that all the bits of a byte are correctly transmitted, a
special signal bit is sometimes used, called a parity bit.
This means that instead of storing a byte of data with 8 bits, 9 are used instead.
There are two types of parity bits:
1. Even parity bit
2. Odd parity bit.
Even Parity
When using even parity, the parity bit is set to 1 if the number of ones in a given set of bits
(not including the parity bit) is odd, making the entire set of bits (including the parity bit) even.
Odd Parity
When using odd parity, the parity bit is set to 1 if the number of ones in a given set of bits (not
including the parity bit) is even, making the entire set of bits (including the parity bit) odd.
In other words, an even parity bit will be set to "1" if the number of 1's + 1 is even, and an odd
parity bit will be set to "1" if the number of 1's +1 is odd.
Examples:
8 bits including parity
7 bits of data
(number of 1s)
even odd
0000000 (0) 00000000 10000000
1010001 (3) 11010001 01010001
1101001 (4) 01101001 11101001