Parity bit
7 bits of data | byte with parity bit | |
pair | odds | |
0000 | 00000 | 00001 |
1010001 | 10100011 | 10100010 |
1101001 | 11010010 | 11010011 |
1111111 | 11111111 | 11111110 |
A parity bit is a binary digit that indicates whether the number of bits with a value of 1 in a set of bits is even or odd. Parity bits are the simplest error detection method.
Even parity is a special case of cyclic redundancy check (CRC), where the CRC bit is generated by the polynomial x+1.
Note that this method detects errors, but does not correct them (except in the case that the transmitted word is 1 bit long (which is not usual)). There are two variants of this method, even bit parity and odd parity bit:
In the case of even parity, the number of ones is counted. If the total is odd, the parity bit is set to one and therefore the sum of the previous total with this parity bit would give even. If the one bit count is even, then the parity (even) bit is left at 0, since it is already even.
In the case of odd parity, the situation is the opposite. The bits whose value is one are added, if it gives an odd number of bits, then the parity (odd) bit is zero. And if the sum of the bits whose value is one is even, then the parity (odd) bit is set to one, making the total bit count one odd.
Contenido relacionado
Turbocharger
Polymorphism
Netscape Navigator