Thursday, September 16, 2010

What is Parity Bit?

From Wikipedia, the free encyclopedia
7 bits of data
(number of 1s)
8 bits including parity
even odd
0000000 (0) 00000000 10000000
1010001 (3) 11010001 01010001
1101001 (4) 01101001 11101001
1111111 (7) 11111111 01111111

A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is even or odd. Parity bits are used as the simplest form of error detecting code.

There are two variants of parity bits: even parity bit and odd parity bit. 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. 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.

No comments:

Post a Comment