Tuesday, 23 February 2016

Parity Bit

Parity Bit
  • parity bit, or check bit is a bit added to the end of a string of binary code that indicates whether the number of bits in the string with the value one is even or odd
  • Parity bits are used as the simplest form of error detecting code.

Even Parity Bit  
  • In the case of even parity, for a given set of bits, the occurrences of bits whose value is 1 is counted. 
  • If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1's in the whole set(including the parity bit) an even number. 
  • If the count of 1's in a given set of bits is already even, the parity bit's value remains 0.

Odd Parity Bit.
  • In the case of odd parity, the situation is reversed. 
  • For a given set of bits, if the count of bits with a value of 1 is even, the parity bit value is set to 1 making the total count of 1's in the whole set(including the parity bit) an odd number. 
  • If the count of bits with a value of 1 is odd, the count is already odd so the parity bit's value remains 0.

7 bits of data (count of 1bits) 8 bits including parity
Even Odd
0000000 0 00000000 00000001
1010001 3 10100011 10100010
1101001 4 11010010 11010011
1111111 7 11111111 11111110

No comments:

Post a Comment

: