Ad Banner Placeholder

Cambridge IGCSE Computer Science · 0478

Topic 2: Data Transmission — Part 2

Error Detection

The need for error detection

Errors occur during transmission due to interference on the medium, leading to:

  • Data loss: some data is not received.
  • Data gain: unintended extra data or corruption.
  • Data change: bits are "flipped" (e.g. 0 becomes 1).

Error detection methods

Parity check
A parity bit is added to make the total count of 1s either even or odd.
  • Even parity: parity bit is set so the total number of 1s is an even number.
  • Odd parity: parity bit is set so the total number of 1s is an odd number.
  • Limitation: if an even number of bits flip (e.g. two bits change), the parity check will not detect the error.
  • Parity byte/block check: a whole byte is added to a block of data to check parity across bit positions (columns) as well as rows, allowing for the detection and sometimes correction of bit errors.
Checksum
A value calculated from the data using an algorithm (e.g. the modulo function) is appended to the transmission. The receiver recalculates the checksum using the same algorithm; if the values don't match, an error is detected and retransmission is requested.
Echo check
The receiver sends the data back to the sender ("echoes" it). The sender compares the echo to the original. Disadvantage: inefficient as it doubles network traffic.
Check digit
A single digit calculated from other digits in a set. Used to detect manual data entry errors. Usage: barcodes and ISBN (International Standard Book Numbers).
Automatic Repeat Query (ARQ)
Uses acknowledgments and timeouts. If the receiver detects an error (using parity or checksum), it sends a negative acknowledgment. If the sender receives a negative acknowledgment or no response within a set timeout period, it automatically resends the data until it is confirmed correct.

Worked example: Parity byte / block check

A parity byte is added to a block of data to check parity across bit positions (columns) as well as rows, allowing for the detection and sometimes correction of bit errors.

Scenario: Using even parity for three bytes of data.

Data Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Byte 1 1 1 1 1 0 0 1 1
Byte 2 0 1 0 1 0 1 0 1
Byte 3 1 1 1 0 0 0 0 0
Parity byte 0 1 0 0 0 1 1 0

Explanation: Each bit in the parity byte is set so that the total number of 1s in that specific column is an even number.

Exam Traps

  • Using checksum and check digit interchangeably — check digits detect manual entry errors (ISBN, barcodes); checksums are calculated during transmission.

0/15

Ad Banner Placeholder