Tuesday, December 23, 2008

Concept of Parity Bits

Fortunately,few communication systems experience frequent experience.More important,the interference on a long distance communication circuit may be so small that modems can handle all problem automatically.Despite the low probability of error,scientists and engineers who design networks understand that transmission errors do occur,and provide hardware and software mechanisms to detect and correct such problems.But now a days most RS-232 circuits use the different mechanism to ensure that each character arrives intact.This mechanism is known as Parity Check mechanism,this mechanism requires the sender to compute an additional bit,called a parity bit,and to attach it to each character before sending.After all bits of a character arrives,the receiver removes the parity bit,performs the same computation as the sender,and verifies that result agrees with the value of the parity bits.The parity computation chosen is such that if one of the bits in the character is damaged in transit,the receiver's computation will not agree with the parity bit and the receiver will report that an error occurred.

There are two forms of parity,even or odd.Both the sender and receiver must agree on which form is being used.In either form,the computation of the parity bit for a given character is straightforward.To achieve even parity,the sender sets the parity bit to 0 or 1 whichever will make the total number of 1 bits(including parity bit)an even number.Thus,when using even parity ,the parity bit for 0100101 is 1 because the character contains an odd number of 1 bits,and the parity bit for 0101101 is 0 because the character already contains an even number of 1 bits.Similarly to achieve odd parity,the sender chooses a parity bit such that it makes the total number of one in the character is odd.If all bits from the character arrive intact,the receiver's computation of parity will agree with the sender's.If interference changes one of the bits during transmission,the receiver's computation will not agree with the sender's and the receiver will report a parity error.

No comments: