Computer Science – Methods of error detection | e-Consult
Methods of error detection (1 questions)
Parity checking is a simple error detection technique used in data transmission to identify if a single-bit error has occurred. It works by adding an extra bit, called the parity bit, to a block of data. The parity bit is set to either 0 or 1 to make the total number of 1s in the data block either even (even parity) or odd (odd parity).
Even Parity: The parity bit is set to 0 if the number of 1s in the data block is even, and to 1 if the number of 1s is odd.
Odd Parity: The parity bit is set to 1 if the number of 1s in the data block is odd, and to 0 if the number of 1s is even.
When the data is received, the receiver recalculates the parity bit using the same method. If the recalculated parity bit does not match the received parity bit, it indicates that an error has occurred during transmission. The receiver can then request retransmission of the data.
Example (Even Parity): Consider the data '10110'. Counting the 1s, we find there are three 1s (an odd number). Therefore, the parity bit would be set to 1 to make the total number of 1s even. The transmitted data becomes '101101'.