Parity Generator and Checker
Parity bit 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.
Parity bit
Types of parity bit There are two variants of parity bits Even parity bit 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. Example of even parity is 00000000, 11010001
Odd parity bit 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, keeping the entire set of bits (including the parity bit) odd. Example of Odd parity is 10000000, 01010001
Odd and Even parity An even parity bit will be set to "1" if the number of 1's + 1 is even An odd parity bit will be set to "1" if the number of 1's +1 is odd.
8 bits including parity bit Parity bit table 7 bits of data (number of 1s) 8 bits including parity bit Even Odd 0000000 (0) 00000000 10000000 1010001 (3) 11010001 01010001 1101001 (4) 01101001 11101001 1111111 (7) 11111111 01111111
Parity generator and checkers Sender Receiver n-bit code Parity Generator (n+1)-bit code Checker Error
Even parity generator and checker for 3-bit codes X Y Z P E
Solution Use 3-bit odd function to generate even parity bit Use 4-bit odd function to check for errors in even parity codes Operation: (X,Y,Z) = (0,0,1) gives (X,Y,Z,P) = (0,0,1,1) and E = 0 If Y changes from 0 to 1 between generator and checker, then E = 1 indicates an error
The End ….. Thank you….