/en-tutor-prep-igcse-cs-error-detection-encryption/
/en-tutor-prep-igcse-cs-error-detection-encryption/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

IGCSE Computer Science: Error Detection and Encryption — Tutor Prep Guide

IGCSE Computer Science: Error Detection and Encryption — Tutor Prep Guide

  • 2026-11-27

Students can say data is checked, but not which method catches what and which errors slip through. This chapter uses values the class computes so each blind spot is visible.

Objectives — Students can: (1) name the three forms of transmission error, data loss, data gain and data change, with an example of each; (2) work out the even and odd parity bits for 1011001 and state that parity only catches an odd number of bit errors; (3) compute the checksum 219 for [130, 45, 200, 100] and state that two errors can cancel each other; (4) verify the check digit 7 of ISBN 9780306406157 with alternating weights of 1 and 3; (5) name the three tools of ARQ, positive acknowledgement, negative acknowledgement and timeout, and distinguish symmetric from asymmetric encryption.

01 Prerequisites (3-minute check)

If any of these fails, fix it before the lesson starts.

Skill Quick check Pass mark
Binary and parity How many 1s are in 1011001? 4, an even number
Remainders What is the remainder when 475 is divided by 256? 219
Weights What is 1 times 3 plus 2 times 1? 5, multiply first then add

02 Lesson flow (60 minutes)

Time Stage Tutor does Student does
0-8 min Three forms of error One example each of loss, gain and change Says interference flips bits
8-24 min Parity Add even and odd parity to 1011001 0 and 1
24-36 min Parity byte and block Four rows plus column parity, then locate one error Says a single bit error can be located
36-46 min Checksum, echo, check digit 475 by 256; ISBN weights 1 and 3 Checksum 219, check digit 7
46-54 min ARQ Positive, negative and timeout scenarios Says a timeout also means resend
54-60 min Symmetric and asymmetric One key against two keys 100 users need 4,950 keys against 200

03 Teaching script (read it out)

Scene 1: Errors happen, so start with parity

Start with where errors come from: electromagnetic noise on a cable, a loose connector, a weakening wireless signal. Errors take three forms. Data loss means bits disappear and everything after them shifts along. Data gain means extra bits appear. Data change means a bit flips from 0 to 1 or from 1 to 0. The third is the most common: the letter A is 01000001, and one flipped bit gives 01000011, the letter C, so the meaning changes.
Parity counts the 1s in a byte. 1011001 has 4 ones, an even number. Even parity appends 0 so the total stays even; odd parity appends 1 so the total becomes odd. The receiver recounts and reports an error if the parity does not match the agreed convention.
State the blind spot precisely. Flipping the second bit of 1011001 from 0 to 1 gives 1111001, where the count rises from 4 to 5, so parity flips and the error is caught. But if two bits change, the count of ones may stay even and parity misses it. Parity therefore only detects an odd number of bit errors, and on its own it says that something is wrong, not where.
Locating needs a parity byte and a parity block. Take four rows of eight bits, add one parity bit per column to get the column parity 10001000, and one parity bit per row to get the row parity [0, 1, 1, 0]. If the fourth bit of the third row changes, that row parity fails and that column parity fails, and the intersection identifies the faulty bit, so it can be corrected rather than only detected.

Students flip bit five of a byte and state which row and which column will report, and why the intersection is the faulty position.

Scene 2: Checksum, echo check, check digit

A checksum covers a whole block. Add all the bytes, divide by 256, keep the remainder and send it with the data. Example: [130, 45, 200, 100] adds to 475, and 475 divided by 256 leaves 219, so 219 is sent as the checksum. The receiver adds the received data bytes again, takes the remainder and compares it with the checksum that arrived. If one byte changes from 45 to 46 the total becomes 476 and the remainder 220, which differs from 219, so the error is caught. But two changes can cancel: 45 to 46 together with 200 to 199 leaves the total at 475 and the remainder at 219, so nothing is detected. That is the same blind spot as parity.
An echo check is the simplest of all: the receiver sends the data straight back and the sender compares it with the original. Nothing has to be calculated, but the data travels twice so the transfer is slower, and the return journey can also corrupt, which hides the error completely if both directions fail the same way.
A check digit is for data entry rather than transmission. It is an extra digit calculated from the others. For ISBN 9780306406157 the first twelve digits are multiplied alternately by 1 and 3 and added to give 93; the check digit must make the total divisible by 10, so it is 7 and the total is 100. Typing 1 instead of 0 in the fourth position gives 96, which is not divisible by 10, so the error is caught at once. Bar codes use the same idea. The alternating weights also catch a swap of two adjacent digits, because the two weights differ and the total must change.

Give a twelve-digit number, ask for its check digit, then change one digit and ask why the error is caught.

Scene 3: ARQ, then symmetric and asymmetric encryption

ARQ confirms delivery after the event and uses three tools. A positive acknowledgement means the packet arrived intact. A negative acknowledgement means it arrived damaged. A timeout means the sender waited and heard nothing. All three lead to a retransmission, so a missing reply is handled exactly like a damaged packet.
Do the efficiency arithmetic. Of 1,000 packets, 2 per cent are lost, which is 20 packets, so 1,020 transmissions are needed. With stop and wait, a packet of 1,500 bytes is 12,000 bits and takes 12 milliseconds on a 1 Mbit/s link; with a round trip of 50 milliseconds each cycle is 62 milliseconds, so only 16.1 packets per second get through. That is 193.5 kbit/s, just 19.4 per cent of the link. Stop and wait is slow because the sender spends most of its time waiting, not sending.
Finish with encryption. Data passes through equipment that does not belong to the sender, so anyone intercepting it must be unable to read it. Symmetric encryption uses one key for both directions. It is fast, but 100 people communicating in pairs would need 4,950 keys, each of which must reach the other party safely; that is the key distribution problem. Asymmetric encryption gives each person a pair of keys, a public key that anyone may hold and a private key kept secret. Data encrypted with the public key can only be decrypted with the private key, so 100 people need 200 keys in total. Asymmetric operations are slow, so real systems mix the two: asymmetric encryption exchanges a one-off symmetric key, and the bulk data then travels under symmetric encryption, which is what HTTPS does.
Give key length a meaning: a 40-bit key has only 1,099,511,627,776 combinations, and at a billion attempts per second it falls in 18.3 minutes, while a 128-bit key has 2 to the power 128 combinations and would take about 1.1e+22 years at the same rate.

Students explain why not everything uses asymmetric encryption, mentioning speed, and describe the two stage HTTPS approach.

04 Question types and worked steps

Type Example Steps Answer
Parity Even parity for 1011001 Count the 1s and make the total even or odd Even gives 0, odd gives 1
Checksum Send [130, 45, 200, 100] Add all bytes, divide by 256, send the remainder Checksum 219
Check digit Verify ISBN 9780306406157 Alternate weights of 1 and 3, total divisible by 10 Check digit 7, total 100
ARQ and encryption What happens when a packet is lost Positive, negative and timeout all resend; compare one key with two 1,020 transmissions, 4,950 keys against 200
Sanity check (teach this): Sanity checks: (1) parity only catches an odd number of bit errors; (2) parity alone says an error exists, only a parity block says where; (3) a checksum is the remainder, never the total; (4) a checksum misses two errors that cancel; (5) check digit weights must alternate, or a swap of two digits goes unnoticed; (6) the weakness of symmetric encryption is key distribution, not speed; (7) the public key may be published and the private key never leaves its owner.

05 Independent practice (3 questions)

Question Answer What to watch
What is the checksum for the bytes [130, 45, 200, 100]? 219 Check the remainder rather than the total
What is the check digit for ISBN 9780306406157? 7, total 100 Check the weights alternate
What is the difference between receiving a NAK and hearing nothing at all? Both lead to a resend, only the reason differs Check a timeout is not treated as success

06 Common mistakes and what to say

Mistake Student writes Say this
Thinking parity catches everything Parity means the data is safe If two bits flip the count of ones can stay even, so parity misses it; it only covers an odd number of errors.
Writing the total as the checksum Giving 475 as the checksum The checksum is the remainder, and 475 divided by 256 leaves 219, which is what is sent.
Keeping the public key secret The public key must be hidden The public key is meant to be published so anyone can encrypt; the private key is the one that never leaves its owner.
Treating a timeout as success No reply means it worked A timeout is the most common sign of loss and must trigger a resend, or the file arrives with a packet missing.

07 Homework (paper, section and question numbers)

08 Exit check (last 5 minutes)

Question Answer Decision
Three forms of error Loss, gain and change Cannot name them means scene one again
Two blind spots Parity misses even numbers of errors and a checksum can be cancelled Cannot state them means scenes one and two again
One pair of keys Symmetric shares one key, asymmetric encrypts with the public key and decrypts with the private key Getting it backwards means scene three again

09 Tutor FAQ

Can parity correct an error?

A parity block can locate and correct a single bit error, because the row and the column both fail and their intersection gives the bit; a single parity bit only detects.

How does a checksum differ from a check digit?

A checksum covers a block after transmission and is computed from all the bytes, while a check digit covers data entry and is computed from the other digits, as in ISBN and bar codes.

Why not encrypt everything asymmetrically?

Asymmetric operations are far slower and would not carry bulk data, so systems exchange a symmetric key asymmetrically and then use symmetric encryption for the data.

Find a tutor — freeTutor Registration →

A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →