- Parity Bit is a bit added to the end of string of binary code.
- Indicates whether the number of bits in the string with the value one is even or odd.
7 bits of data | (count of 1 bits) | 8 bits including parity | |
---|---|---|---|
even | odd | ||
0000000 | 0 | 00000000 | 00000001 |
1010001 | 3 | 10100011 | 10100010 |
1101001 | 4 | 11010010 | 11010011 |
1111111 | 7 | 11111111 | 11111110 |
- Parity bits are used as the simplest form of error detecting code.
There are two variants of parity bits:
1.Even parity bit.
2.Odd parity bit.
In even parity, occurrences of bits whose values is 1 is counted.
- If the count is odd, the parity bit value is set to 1, making 1 bit's count to even.
- If the count is even, the parity bit value remains 0.
In odd parity, the situation is reversed.
- If the count is even, the parity bit value is set to 1.
- If the count is odd, so its already odd and parity bit remains 0.
0 comments: