← IGCSE Computer Science · Cambridge · GCSE Computer Science revision
⭐ 0
Cambridge IGCSE Computer Science (0478/0984) · Topic 2 Data transmission
Mini-Lesson

Data transmission

4 missions. Guess, learn, then check. Your place is saved.

  1. Mission 1How does a video arrive in order if its pieces take different routes?
  2. Mission 2Parallel sends 8 bits at once. So why is USB serial?
  3. Mission 3One bit flips on the way. How can the receiver even tell?
  4. Mission 4How can you lock a message for someone you have never met?
Mission 1

How does a video arrive in order if its pieces take different routes?

Make a guess: How does a video arrive in order if its pieces take different routes?

Networks · packets and packet switching

Splitting data into packets

PacketsData is split into packetspacket 1packet 2packet 3packet 4Inside one packetHeaderdestination addresssource addresspacket numberPayloadpayload: the data
  • Before data is sent across a network, it is broken into small pieces called packets.
  • Each packet is sent on its own and the receiving computer joins them back together.
  • Small packets share the network's links fairly: no single huge file blocks a link. If one packet is lost or damaged, only that packet needs to be sent again.
Networks · packets and packet switching

Inside a packet

PacketsData is split into packetspacket 1packet 2packet 3packet 4Inside one packetHeaderdestination addresssource addresspacket numberPayloadpayload: the data
  • The header holds the destination address, the source address (the originator's address) and the packet number, used to put the data back in order.
  • The payload is the actual data being carried.
  • The trailer marks the end of the packet and can hold data used to check for errors.
Quick check
?A web page is sent as 40 packets. Which part of each packet lets the receiving computer put the page back together in the right order?
Networks · packets and packet switching

Packet switching

Packet switchingSenderReceiver1234Arrive in order2143Reordered1234by packet number
  • In packet switching, each packet is sent across the network separately.
  • Routers read each packet's destination address and send it on towards its destination, one hop at a time.
  • Each packet may take a different route, depending on which links are free or working.
  • So packets can arrive out of order. Once the last packet arrives, the receiver uses the packet numbers to reorder them.
Your answer
?Four packets arrive in this order. Packet 3: "E GA" · Packet 1: "MEET" · Packet 4: "TE" · Packet 2: " AT TH". Type the original message.
Quick check
?A cable between two routers is cut while a file is being sent. What happens to the packets still to be sent?
Mission check

?How does a video arrive in order if its pieces take different routes?
Mission 2

Parallel sends 8 bits at once. So why is USB serial?

Make a guess: Parallel sends 8 bits at once. So why is USB serial?

Data transmission · methods and USB

One wire or many?

Serial and parallelSerial: 1 wireSenderReceiver01001011Parallel: 8 wiresSenderReceiver01001011
  • Serial transmission sends data one bit at a time down a single wire.
  • Parallel transmission sends several bits at the same time down several wires, e.g. 8 bits on 8 wires.
  • Over the same short distance, parallel can move more data per second.
  • Parallel is used over short distances, e.g. inside a computer or within an integrated circuit.
Data transmission · methods and USB

Why distance changes things

Skew and interferenceParallel over a long cableSendReceive0011000011001111skewstart alignedInterferenceneighbouring wires affect each other
  • Over a long parallel cable, bits sent together arrive at slightly different times. This is skew, and the data can be corrupted.
  • Wires lying side by side can also cause interference with each other.
  • Serial has no skew, so it is more reliable over long distances.
  • Serial cables need fewer wires, so they are cheaper. Serial is slower than parallel over a short distance.
Quick check
?A school wants to link a computer to a printer 20 m away down a corridor. Which method is most suitable?
Data transmission · methods and USB

Which way can data go?

Simplex and duplexSimplexABHalf-duplexABone way at a timeFull-duplexABboth at oncemonitorwalkie-talkiephone call
  • Simplex: data travels in one direction only, e.g. a computer sending data to a monitor.
  • Half-duplex: both directions, but only one direction at a time, e.g. a walkie-talkie.
  • Full-duplex: both directions at the same time, e.g. a phone call.
  • Each one combines with serial or parallel, e.g. "serial half-duplex".
Quick check
?A weather sensor sends readings to a computer. The computer never sends anything back. Which method is this?
Data transmission · methods and USB

The universal serial bus

USBUSB cableserialauto-detects device andloads drivercan supply powermax 5 m (USB 2.0)
  • USB is an industry-standard interface that sends data by serial transmission.
  • Benefits: devices are detected automatically and the right driver is loaded; one standard fits many devices; it can power or charge a device; newer versions are backward compatible.
  • Drawbacks: maximum cable length is limited (5 m for USB 2.0); older versions may stop being supported.
Quick check
?Which of these is a drawback of USB?
Mission check

?Parallel sends 8 bits at once. So why is USB serial?
Mission 3

One bit flips on the way. How can the receiver even tell?

Make a guess: One bit flips on the way. How can the receiver even tell?

Data transmission · error detection

When bits go wrong

Parity bitsdata1010110even parity01010110four 1s: already even, so parity bit 0odd parity11010110five 1s: parity bit 1Sent with even parity, then interferencesent01010110received01110110five 1s: error
  • Interference during transmission can cause data loss, data gain or data change.
  • The receiver never sees the original, so the sender adds extra check data.
  • Parity check: one bit of each byte is a parity bit. Even parity: each byte holds an even number of 1s. Odd parity: an odd number.
  • The receiver counts the 1s. A wrong count means an error, so the data is resent.
Your answer
?A system uses even parity. The parity bit is the leftmost bit. The 7 data bits are 1101011. Write the whole byte that is sent.
Data transmission · error detection

Finding the faulty bit

Parity blockparitybitdata12345678Byte 101001101Byte 210110010Byte 301110001Byte 410101100Parity byte00100010countacrosscount down
  • One parity bit misses errors where two bits change: the count stays even (or odd).
  • A parity block check sends several bytes, each with a parity bit, plus a parity byte: the parity bit for each column.
  • The receiver checks every row and column. The faulty bit is where the failing row meets the failing column, so it can be corrected.
Quick check
?This block was sent with even parity on every row and column (column 1 is the parity bit, the last row is the parity byte). Which bit is wrong?
Received blockparitybitdata12345678Byte 101001101Byte 210110010Byte 301111001Byte 410101100Parity byte00100010
Data transmission · error detection

Checksum and echo check

  • Checksum: the sender calculates a value from a block of data with an agreed algorithm and sends it too.
  • The receiver recalculates it from the data received. Different values mean an error, so the data is resent.
  • Echo check: the receiver sends the data back; the sender compares it with the original and resends if different.
  • Drawback: an echo error may have happened on the way back.
Data transmission · error detection

Automatic repeat query

Automatic repeat querySenderReceivertimepacket 1positive acknowledgement (ACK)packet 2errornegative acknowledgement (NAK)packet 2 resentpositive acknowledgementpacket 3timeoutpacket 3 resentpositive acknowledgement
  • ARQ (automatic repeat query) uses acknowledgements and a timeout.
  • The receiver checks the data, e.g. with a checksum. No error: it sends a positive acknowledgement. Error: it sends a negative acknowledgement and the sender resends.
  • Timeout: if no acknowledgement arrives within a set time, the sender resends automatically.
  • This repeats until the data arrives correctly, or a set number of attempts is reached.
Data transmission · error detection

Check digits

ISBN-13 check digit123456789101112digit978030640615× weight131313131313product9218030612018115Total of products = 93. 93 ÷ 10 leaves remainder 3.Check digit = 10 − 3 = 7, so the ISBN is978-0-306-40615-7.
  • A check digit is a final digit calculated from the other digits. It catches data entry errors.
  • Used in ISBNs (book numbers) and barcodes.
  • On entry the check digit is recalculated and compared. A mismatch shows a mistake, e.g. a wrong or swapped digit.
  • In an exam, the question tells you which check-digit method to use (ISBN-13 is one example).
  • ISBN-13: multiply the 12 digits alternately by 1 and 3, add, take the remainder ÷ 10, and subtract it from 10 (10 gives 0).
Calculate
?Find the ISBN-13 check digit for 978-1-84356-028-?
Mission check

?One bit flips on the way. How can the receiver even tell?
Mission 4

How can you lock a message for someone you have never met?

Make a guess: How can you lock a message for someone you have never met?

Security · encryption

Why encrypt?

EncryptionPlaintext: Meet at 3pmencryptx9#Lq!7vRzCiphertext on the cabledecryptPlaintext: Meet at 3pmeavesdropperx9#Lq!…?
  • Data sent over a network can be intercepted by anyone tapping into the connection.
  • Encryption uses an algorithm and a key to turn plaintext into ciphertext.
  • Encryption does not stop interception. It makes intercepted data meaningless to anyone without the right key.
  • Decryption uses a key to turn the ciphertext back into plaintext.
Quick check
?An attacker intercepts an encrypted file on its way across the internet. What has encryption achieved?
Security · encryption

Symmetric encryption

Symmetric encryptionAnaBenciphertextkey must be shared firsteavesdropper copies the key: can readevery messagesame keysame key
  • Symmetric encryption uses the same key to encrypt and to decrypt.
  • So the sender must get a copy of the key to the receiver before any message can be read.
  • If the key is intercepted while it is being shared, the attacker can decrypt every message sent with it.
  • Sharing the key safely is the big weakness of symmetric encryption.
Security · encryption

Asymmetric encryption

Asymmetric encryptionAnaBenpublic keyprivate keystays with Bencopies of the public keyand anyone elseencryptwith public keyciphertextdecryptwith private key
  • Asymmetric encryption uses two different keys: a matching public key and private key.
  • The public key can be given to anyone. It is used to encrypt messages for its owner.
  • The private key is kept secret by its owner and never sent. Only it can decrypt what the matching public key encrypted.
  • So no secret key ever has to travel across the network.
Quick check
?Ana wants to send Ben a message that only Ben can read, using asymmetric encryption. Which key should Ana encrypt it with?
Quick check
?An attacker copies Ben's public key as it is sent to Ana. What can the attacker now do?
Mission check

?How can you lock a message for someone you have never met?
Recap

Big ideas

  • Data is split into packets; each has a header (destination address, source address, packet number) and a payload.
  • In packet switching, routers send each packet separately, so packets may take different routes and arrive out of order; the receiver reorders them using the packet numbers.
  • A packet also has a trailer that marks its end.
  • Serial: one bit at a time, one wire; reliable over distance, cheaper. Parallel: several bits at once; fast but only over short distances because of skew.
  • Simplex is one way, half-duplex is both ways in turn, full-duplex is both ways at once.
  • USB is serial: automatic detection and drivers, power supply, one standard; limited cable length.
  • Interference causes data loss, gain or change; parity checks, checksums and echo checks detect it after transmission.
  • A parity block (with a parity byte) can locate the exact faulty bit; ARQ uses acknowledgements and a timeout to get data resent.
  • A check digit, recalculated on entry, catches data-entry errors in ISBNs and barcodes.
  • Encryption doesn't stop interception; it makes intercepted data unreadable without the key.
  • Symmetric: one shared key, which must be passed on safely. Asymmetric: encrypt with the receiver's public key, decrypt with their private key.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Data transmission for Cambridge IGCSE Computer Science (0478/0984). 🎉

  1. Mission 1How does a video arrive in order if its pieces take different routes?
  2. Mission 2Parallel sends 8 bits at once. So why is USB serial?
  3. Mission 3One bit flips on the way. How can the receiver even tell?
  4. Mission 4How can you lock a message for someone you have never met?

Your stars: 0 / 0

Next: test yourself in the Verify stage.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to IGCSE Computer Science · Cambridge

Specification points and sources for this lesson are listed at the bottom of the page.

Sources (7)

The specification points and sources behind this lesson.

  1. 1 Cambridge IGCSE 0478 syllabus 2026–2028, 2.1.1 (a)–(c)
  2. 2 Cambridge IGCSE 0478 syllabus 2026–2028 v6, 2.1.2–2.1.3
  3. 3 Cambridge IGCSE 0478 syllabus 2026–2028 v6, 2.2.1–2.2.4 (and 7.5 validation)
  4. 4 Cambridge IGCSE 0478 syllabus 2026–2028 v6, 2.3.1–2.3.2
  5. 5 Lammert Bies, "USB cable length", https://www.lammertbies.nl/?p=426 ("USB 1.1 … maximum cable length of 3 meter", "USB 2.0 specification allows 5 meter")
  6. 6 GS1, "How to calculate a check digit manually", https://gs1.org/how-calculate-check-digit-manually (GTIN-13: weights 1 and 3 from the left, subtract the sum from the nearest equal or higher multiple of ten). Apache Commons Validator, EAN13CheckDigit, https://commons.apache.org/validator/apidocs/org/apache/commons/validator/routines/checkdigit/EAN13CheckDigit.html ("Modulus 10 EAN-13 / UPC / ISBN-13 Check Digit")
  7. 7 /home/claude/cs/work/N7-checks.py