Methods of Error Detection – IGCSE Computer Science (0478)
Objective
Explain why it is necessary to check for errors after data transmission and become familiar with the error‑detection techniques required by the Cambridge IGCSE syllabus (Section 2.2). You should also be able to relate these techniques to other parts of the syllabus (encryption, data representation, transmission media, etc.).
Why Check for Errors?
- All transmission media – copper cables, fibre‑optic links, wireless, storage devices – are vulnerable to noise, interference, attenuation and hardware faults.
- Corrupted data can produce wrong results, cause system crashes, or create security risks (e.g., a wrong password being accepted).
- Detecting errors allows the system to request a retransmission, discard the faulty data, or take other corrective action, thereby ensuring reliability and integrity.
Common Types of Transmission Errors
- Single‑bit error – only one bit in the data unit is altered.
- Multiple‑bit error – two or more bits are altered (they may be separated).
- Burst error – a consecutive sequence of bits is corrupted; the burst length is the distance between the first and last erroneous bits.
Core Error‑Detection Techniques (Syllabus 2.2)
1. Parity Check (odd / even)
- A single parity bit is added so that the total number of
1s in the transmitted word is either even (even parity) or odd (odd parity).
- Example – even parity (7‑bit data):
Data: 1011001 → number of 1s = 4 (even) → parity bit = 0 → transmitted word = 10110010
- If the received word contains the wrong parity, an error is flagged.
- Detects any odd number of bit errors but cannot locate or correct them.
2. Check‑digit
A check‑digit is a single decimal digit (or character) calculated from the other digits of a number. It is used in bar‑codes, ISBNs, credit‑card numbers, etc.
- ISBN‑10 example (weights 10 down to 1):
Number: 0 306‑40615‑?
Calculation: (10×0)+(9×3)+(8×0)+(7×6)+(6×4)+(5×0)+(4×6)+(3×1)+(2×5)+(1×?) ≡ 0 (mod 11)
Solving gives ? = 2. Full ISBN: 0‑306‑40615‑2.
- The receiver recomputes the check‑digit; a mismatch indicates an error.
3. Checksum
- Data is divided into equal‑length binary words (commonly 8‑bit). All words are added using binary addition with “end‑around carry”.
- The one’s‑complement of the final sum is transmitted as the checksum.
- Example (8‑bit words):
Data words: 11010101, 01100110, 10101010
Sum (with end‑around carry) = 00111101
Checksum = 11000010 (one’s complement).
Receiver adds the three data words and the checksum; a result of all 0s means no error.
4. Automatic Repeat Request (ARQ)
ARQ is a protocol that uses acknowledgements to ensure reliable transmission.
- Positive ACK – receiver sends an acknowledgement (ACK) when a frame is received correctly.
- Negative ACK (NAK) – receiver sends a NAK when an error is detected, requesting retransmission.
- If the sender does not receive an ACK within a set timeout, it automatically retransmits the frame.
- ARQ can be combined with any detection method (parity, checksum, etc.) to decide whether a retransmission is needed.
Extended Error‑Detection Methods (Optional – not required for the exam)
Two‑Dimensional Parity (Block Check)
Data is placed in a rectangular array. A parity bit is added for each row, each column, and one overall parity bit. The intersecting row and column of a wrong parity locate a single‑bit error.
Cyclic Redundancy Check (CRC)
CRC treats the data as a binary number and divides it by a fixed generator polynomial. The remainder (the CRC) is appended to the data.
Simple CRC‑8 example (generator 100000111)
- Append eight
0s to the data: 11010011101100 00000000.
- Perform binary division (XOR) by
100000111. The remainder is 10110101.
- Transmit the data followed by the remainder:
1101001110110010110101.
- The receiver repeats the division; a remainder of
00000000 means no error.
Hamming Code (Error Detection & Correction)
Parity bits are placed at positions that are powers of two (1, 2, 4, 8,…). They allow detection of up to two‑bit errors and correction of a single‑bit error.
For a 4‑bit data word d3 d2 d1 d0 the 7‑bit transmitted code is
p1 p2 d3 p4 d2 d1 d0, where each parity bit covers a specific set of positions. The syndrome formed by recomputed parity bits points to the erroneous bit.
Quick‑Reference Boxes for Frequently Missed Syllabus Points
Two’s‑Complement Representation
Used for signed integers. To obtain the two’s‑complement of an n-bit number:
- Invert all bits (one’s complement).
- Add 1 to the result.
Example (8‑bit): Decimal –13 → binary of 13 = 00001101 → invert = 11110010 → add 1 = 11110011. Thus 11110011 represents –13.
Logical Shift Operations
- Logical left shift (<<): bits move left, 0s fill the rightmost positions. Equivalent to multiplication by 2 (if no overflow).
- Logical right shift (>>): bits move right, 0s fill the leftmost positions. Equivalent to integer division by 2 (floor).
- Used in low‑level programming and when implementing certain error‑detection algorithms.
USB – A Common Transmission Method
Universal Serial Bus (USB) is a serial communication standard used for peripherals (keyboard, mouse, flash drives, etc.).
- Supports both high‑speed data transfer (up to 5 GB/s for USB 3.2) and power delivery.
- Uses packet framing with built‑in error detection (CRC‑5 for token packets, CRC‑16 for data packets).
- Relevant for the syllabus when discussing “transmission media” and “error‑detection techniques”.
Digital Currency & Blockchain (Optional)
Blockchain is a distributed ledger where each block contains a list of transactions and a cryptographic hash of the previous block.
- Ensures data integrity – any change to a transaction alters the hash, breaking the chain.
- Used in cryptocurrencies (e.g., Bitcoin) and can be mentioned when discussing “security of data transmission”.
Artificial Intelligence (AI) – Basic Concepts
- Expert system: uses a knowledge base and inference engine to make decisions; often employs “if‑then” rules – a good link to logical reasoning.
- Machine learning: algorithms that improve performance through experience (e.g., classification, clustering). Not required for the exam but useful for “emerging technologies”.
- Both illustrate how reliable data transmission underpins intelligent systems.
Comparison of Core Techniques
| Method |
Detects |
Corrects? |
Typical Overhead |
Common Use (IGCSE) |
| Parity bit (odd/even) |
Any odd number of bit errors |
No |
1 extra bit per data unit |
Simple serial links, early storage media |
| Check‑digit |
Single‑digit transcription errors (most common mistakes) |
No |
1 extra digit/character |
ISBN, bar‑codes, credit‑card numbers |
| Checksum |
Many multiple‑bit errors (but not all) |
No |
One word‑size (e.g., 8‑bit) per block |
IP, TCP/UDP headers, file‑transfer protocols |
| ARQ (with any detection method) |
Errors identified by the chosen detection technique |
Yes – by retransmission |
Control messages (ACK/NAK) + possible timeout delay |
Reliable data links, FTP, HTTP |
Brief Overview of Encryption (Syllabus 2.3)
Encryption protects data while it is being transmitted, ensuring that only authorised parties can read it.
- Symmetric encryption – one secret key is shared by sender and receiver (e.g., AES). Fast, but the key must be exchanged securely.
- Asymmetric encryption – a public key and a private key pair (e.g., RSA). Data encrypted with the public key can only be decrypted with the matching private key. Solves the key‑distribution problem but is slower.
- In practice the two are combined: asymmetric encryption safely exchanges a symmetric session key, then the symmetric key encrypts the bulk of the data.
Key Take‑aways
- All transmission media are prone to errors; detection is essential for reliable communication.
- The IGCSE syllabus requires knowledge of parity, check‑digit, checksum, and ARQ (plus optional methods such as CRC and Hamming).
- Understanding each technique’s strengths, weaknesses, and overhead helps you choose the right method for a given application.
- Encryption, while a separate topic, works hand‑in‑hand with error detection to provide both integrity (no errors) and confidentiality (no unauthorised reading) of transmitted data.
- Remember the quick‑reference points for two’s‑complement, logical shift, USB, blockchain and basic AI – they often appear in other parts of the syllabus.