Describe parity check (odd and even), checksum and echo check

Resources | Subject Notes | Computer Science

Methods of Error Detection - IGCSE Computer Science

Methods of Error Detection

Error detection methods are crucial in computer systems to ensure the integrity of data transmitted or stored. These methods help identify if errors have occurred during the process. This section will describe three common methods: parity check (odd and even), checksum, and echo check.

Parity Check

Parity check is a simple error detection technique used to detect single-bit errors in data transmission. It works by adding an extra bit, called the parity bit, to the data. The parity bit is set to either 0 or 1 based on the parity of the data bits.

Odd Parity Check

In an odd parity check, the parity bit is set so that the total number of 1s in the data (including the parity bit) is odd.

  • If the number of 1s in the data is even, the parity bit is set to 1.
  • If the number of 1s in the data is odd, the parity bit is set to 0.

Even Parity Check

In an even parity check, the parity bit is set so that the total number of 1s in the data (including the parity bit) is even.

  • If the number of 1s in the data is odd, the parity bit is set to 1.
  • If the number of 1s in the data is even, the parity bit is set to 0.

Example (Odd Parity):

Data: 101101

Number of 1s: 4 (even)

Parity bit: 1 (to make the total number of 1s odd)

Transmitted data: 1011011

Example (Even Parity):

Data: 101101

Number of 1s: 4 (even)

Parity bit: 0 (to make the total number of 1s even)

Transmitted data: 1011010

Checksum

A checksum is a more sophisticated error detection method than parity check. It involves calculating a value from the data and adding this value to the data. The receiver then performs the same calculation and compares the result with the received checksum. If the checksums match, it is assumed that no errors have occurred.

Checksums are typically calculated using algorithms like the sum of the data bytes or more complex mathematical operations.

Step Operation
1 Sum the data bytes (or use a checksum algorithm)
2 The result of the sum is the checksum value
3 The checksum is appended to the data

Echo Check

Echo check is a simple error detection method used in serial communication. The sender sends the data, and the receiver immediately retransmits the data back to the sender. If the received data matches the original data, it is assumed that no errors have occurred. If they don't match, an error is detected.

Echo check is a basic method and is not as reliable as parity check or checksum for detecting errors.

Diagram:

Suggested diagram: Sender sends data -> Receiver echoes data back to sender. Comparison of original and echoed data determines error.