Skip to content

0478 · Unit 2 · Paper 1: Computer systems

Data transmission.

0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Packets and packet switching

§2.1 · Types and methods of data transmission

A network carries data for many users at once, so a large file is not sent in one piece. It is broken down into small, numbered packets, and each one makes its own way to the receiver.

Packet structure

A packet travels alone, so it has to carry its own address and its place in the file.

Header· destination address· packet number· originator’s (source) addressPayload· the actual data being sentTrailer· error-checking data· end-of-packet marker

1 · Header

Destination address · packet number · originator’s address

2 · Payload

The actual data being sent

3 · Trailer

Error-checking data · end-of-packet marker

Packet switching: each packet finds its own route

Follow one colour from Sender to Receiver: each line is one packet’s route through the routers K to Q.

SenderKLMNPQReceiverpacket 1: K → M → Ppacket 2: L → N → Qpacket 3: K → N → PK–Q = routers
SenderKLMNPQReceiverPacket 1: K → M → PPacket 2: L → N → QPacket 3: K → N → P
1
The data is split into packets. A header with the destination, packet number and originator’s address is added to every one.
2
Each packet is sent independently. At every router, the destination address is read and the router forwards the packet towards its destination along an efficient route.
3
Packets can take different routes, so they may arrive out of order.
4
When all the packets are in, the receiver sorts them by packet number. A missing packet can be requested again.

Example

Sent: 1 · 2 · 3
Arrive: 2 · 1 · 3
Reordered: 1 · 2 · 3

Packet 1 is delayed at a busy router, so packet 2 arrives first.

Your turn

1 A file is sent as 5 packets numbered 1 to 5. They arrive in the order 3, 1, 2, 5, 4. What does the receiver do?

2 Name two items in a packet header.

3 What does a router read to decide where to forward a packet?

  1. 1
    It sorts the packets by packet number into 1, 2, 3, 4, 5. If one is missing, it asks for that packet again.
  2. 2
    Any two of: destination address, packet number, originator’s (source) address.
  3. 3
    The destination address.
Tick what you can do now
Exam focusThe router controls the route a packet takes. The destination address says where it is going; the packet number is used to put packets back in order. Use “originator’s address” for the sender.
Practise with m26/12 Q4; s26/12 Q3(e)
1 / 6
0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Serial, parallel and USB

§2.1 · Types and methods of data transmission

Bits cross a cable in one of two ways. Serial sends one bit at a time down one wire. Parallel sends several bits at once down several wires.

A USB cable is thin, yet old printer cables were wide, flat ribbons with a wire for every bit. Serial sends one bit at a time down one wire; parallel sends several bits at once down several wires.

Serial or parallel: how many bits at once?

Describe each one, and choose the right one for a long or a short link.

ABSerial · one wire10110100bits travel one after anotherABParallel · multiple wires10110100bits of a byte travel at the same time
ABSerial · one wire10110100bits travel one after anotherABParallel · multiple wires10110100bits of a byte travel at the same time
Serial: one bit after anotherAB10110100One wire carries the sequenceParallel: multiple bits at onceAB10110100One wire for each bit of the byte

Serial

  • One bit at a time down a single wire.
  • Cheaper: fewer wires. Less interference (crosstalk).
  • Bits arrive in order, so it is reliable over long distances.
  • At the same bit rate per wire, transfers fewer bits per second than parallel.

Parallel

  • Multiple bits at once: each bit of a byte has its own wire.
  • At the same bit rate per wire, faster: several bits travel at the same time.
  • More wires: more expensive; crosstalk between wires.
  • Bits can arrive out of step (skew), so only for short distances.

USB: a serial interface

USB is the serial link most people plug in every day. Give a benefit and a drawback of it, linked to the device.

USB: universal serial bus

  • A standard interface: it sets the rules for sending data along the cable.
  • Data goes by serial transmission: one bit after another on a single wire, so bits arrive in order.
  • The cable can also carry power.

Benefits

  • Universal: one standard port and cable for many kinds of device
  • Plug and play: the device is recognised and its driver installed automatically
  • Backward compatible; versions offer different data transmission speeds
  • Supplies power, so it can run or charge a keyboard or webcam

Drawbacks

  • Cable length is limited (about 5 m), and a cable restricts how far a handheld device can move
  • At the same bit rate per wire, serial data transfer is slower than parallel
Your turn

1 A byte is sent in parallel. How many wires carry the data?

2 A sensor is joined to a computer by a 40 m cable. Should the link be serial or parallel? Give one reason.

3 Give two benefits of USB.

  1. 1
    8 wires: one for each bit.
  2. 2
    Serial: over a long distance, bits stay in order. Parallel bits can arrive out of step (skew).
  3. 3
    Any two of: one standard port for many devices; plug and play; backward compatible; supplies power.
Tick what you can do now
Exam focusExplain serial by how it works: bits go one at a time, in order, along a single wire. Tie each USB benefit to the device in the question (a webcam powered by the port). A speed claim needs a reason: the speed is enough for the data the device sends.
Practise with s26/11 Q4(c); m26/12 Q3(c); w25/12 Q5(c)(iii) (older paper)
2 / 6
0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Direction of transmission

§2.1 · Types and methods of data transmission

A sensor only ever reports, but a phone call needs both people talking. So as well as how many bits travel at once (serial or parallel), every link has a direction: which way data can travel.

Simplex, half-duplex or full-duplex: which direction?

Name the direction from a description, and give an example use of each.

DirectionExample useAdvantageDisadvantage
Simplex
one way only
sensor → computer; computer → monitorsimple and cheapno reply or acknowledgement possible
Half-duplex
both ways, one at a time
walkie-talkie; a card reader and a till taking turnstwo-way on a single channelcannot send and receive at the same time
Full-duplex
both ways at once
phone or video callno delay between sending and receivingneeds a link that carries both directions at once

Simplex

Data travels one way only: a sensor sends readings without receiving a reply.

Half-duplex

Both devices can transmit, but take turns. Each must wait while the other sends.

Full-duplex

Both devices can transmit at the same time: each can send while receiving.

“Serial full-duplex” means one bit at a time and both directions at once.

Choose and justify a method

To justify, name the method and give a reason for each part that fits the scenario.

ScenarioMethodWhy serial or parallelWhy this direction
A river-level sensor sends readings to a flood office 3 km awaySerial
simplex
A long link: serial keeps the bits in order. Small readings need no extra speed.The office never replies, so one direction is enough.
Inside a camera, an image sensor passes photos to a processor a few centimetres awayParallel
simplex
A short path: little skew. A photo has many bits, so sending several at once is faster.Data flows one way.
A café till sends an amount; a card reader returns a payment resultSerial
half-duplex
Short messages: serial is fast enough.Both devices send, but they take turns.
Offices in different cities hold a video meetingSerial
full-duplex
A long link: serial keeps the bits in order.Both sides send and receive at the same time.

Serial simplex

A river-level sensor sends readings to a flood office 3 km away

  • Serial: A long link: serial keeps the bits in order. Small readings need no extra speed.
  • Simplex: The office never replies, so one direction is enough.

Parallel simplex

Inside a camera, an image sensor passes photos to a processor a few centimetres away

  • Parallel: A short path: little skew. A photo has many bits, so sending several at once is faster.
  • Simplex: Data flows one way.

Serial half-duplex

A café till sends an amount; a card reader returns a payment result

  • Serial: Short messages: serial is fast enough.
  • Half-duplex: Both devices send, but they take turns.

Serial full-duplex

Offices in different cities hold a video meeting

  • Serial: A long link: serial keeps the bits in order.
  • Full-duplex: Both sides send and receive at the same time.
Your turn

1 A baby monitor sends sound to a parent unit and never receives anything. Which direction is this?

2 Two engineers use walkie-talkies and take turns to speak. Which direction is this?

3 A weather station on a mountain, 20 km from its base, sends temperature readings and never receives. Name the method and justify it.

  1. 1
    Simplex: one way only.
  2. 2
    Half-duplex: both ways, but one at a time.
  3. 3
    Serial simplex. The link is long, so serial keeps the bits in order. Readings are small, so parallel speed is not needed. The base never replies, so one direction is enough.
Tick what you can do now
Exam focusWhen both are requested, name serial or parallel and simplex, half- or full-duplex. Give a reason for each part. Link the reasons to distance, amount of data and whether data must return.
Practise with m26/12 Q7(a)–(b); s26/11 Q4(b); s26/13 Q2(c); m25/12 Q2(d)(ii) (older paper)
3 / 6
0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Error detection: parity checks

§2.2 · Methods of error detection

Interference (for example electrical noise) can corrupt data during transmission: bits can be lost, gained or changed. The receiver must check what arrives.

Crackle on a phone line is noise you can hear. On a data cable the same interference can flip a bit, and nothing looks wrong: bits can be lost, gained or changed. So how does the receiver know what arrived is right?

Parity bit: make the number of 1s even or odd

  1. 1
    Before sending, both devices agree to use even or odd parity.
  2. 2
    The sender sets the parity bit (the first, left-most bit here) so that the byte has an even or odd number of 1s, as agreed.
  3. 3
    The receiver counts the 1s in every byte. A count that breaks the agreed parity means an error is detected.
Even parity110101115 ones in the data → parity bit 1 → 6 ones in total (even)Odd parity010101115 ones in the data → parity bit 0 → 5 ones in total (odd)

Parity block: check each byte and each column

One parity bit can tell you a byte is wrong, but not which bit. Checking the columns as well finds it.

P1234567check
Byte 111011000✓ even
Byte 211111001✓ even
Byte 301101101✗ odd
Byte 411000011✓ even
Parity byte10001011✓ even
check✓✓✓✓✓✗✓✓
1
Each byte has a parity bit (P): this checks the rows.
2
A parity byte is added at the end: each of its bits checks one column.
3
Received data, even parity: byte 3 has an odd number of 1s, and so does data column 5.
4
For a single-bit error, the failing row and column cross at the flipped bit. Its position is known, so it can be corrected.

At the receiver: two bytes, even parity agreed

001110104 ones: even → accepted001111105 ones: odd → error detected

The faulty byte has to be sent again: ARQ arranges this with acknowledgements and a timeout.

Limitation

  • Two bits in the same byte change, or two bits swap places (transposition).
  • The number of 1s still matches the agreed parity, so the error is not detected.
  • A parity check shows that a byte is wrong, but not which bit, unless a parity block is used.
Your turn

1 Even parity is agreed. What parity bit is added to 1101001?

2 Even parity is agreed. The receiver gets 01101011. Is an error detected?

3 Two bits in a byte change in transit. Why can parity not detect this?

  1. 1
    1101001 has 4 ones, which is even, so the parity bit is 0.
  2. 2
    01101011 has 5 ones, which is odd, so yes, an error is detected.
  3. 3
    The number of 1s is still even (or odd) as agreed, so the byte looks correct.
Tick what you can do now
Exam focusCount the 1s, not the denary value. The parity bit can be 0 or 1: it makes the total number of 1s even (or odd). To explain what parity misses, say why: two flipped bits, or two bits that swap places, leave the number of 1s even or odd as it was.
Practise with s26/12 Q4(a)–(b); m26/12 Q7(c)(i)
4 / 6
0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Checksum, echo check and check digit

§2.2 · Methods of error detection

Counting 1s is not the only way to catch an error. Each of these checks compares two things that should match; if they differ, the data is sent again or the number is typed again.

Each check compares two things. If they differ, the data is sent again or the number is typed again.

Checksum: compare a value calculated from the data

Follow the three values from Sender to Receiver. One changed on the way, so the two totals disagree.

SenderReceiver23914data46checksum23 + 9 + 14 = 46data + checksum sent together238144623 + 8 + 14 = 4545 ≠ checksum 46 → error detectedrequest to resend→ resends the data
Sender23914data46checksum23 + 9 + 14 = 46data + checksum2381446Receiver23 + 8 + 14 = 4545 ≠ checksum 46 → error detectedRequest to resend: the sender resends the data
  1. 1
    The sender runs an agreed algorithm on the data (the figure adds the values) to get a checksum value.
  2. 2
    The checksum is sent along with the data.
  3. 3
    The receiver runs the same algorithm on what arrived.
  4. 4
    Two different values mean the data changed on the way: an error is detected and the data is sent again.

Before sending, the sender runs an agreed algorithm on the data (the figure adds the values) to get a checksum value and sends it along with the data. The receiver runs the same algorithm on what arrived. Two different values mean the data changed on the way: an error is detected and the data is sent again.

Echo check: compare the data itself

Here the receiver does no checking at all: it sends the data straight back, and the sender compares the two copies.

SenderReceiver10111010original1 · data sent10011010received2 · copy sent back (the echo)10011010echo3 · Sender compares: 10111010 ≠ 10011010 → error detected → data is sent again.
Senderoriginal10111010Receiver1 · data100110102 · echoecho1001101010111010 ≠ 10011010Sender compares: mismatch → error detected → resend
  • Limitation: if the copies differ, the sender cannot tell whether the error happened on the way there or on the way back.
  • Every echo returns a full copy of the data, so traffic doubles.

Limitation: if the copies differ, the sender cannot tell whether the error happened on the way there or on the way back. Every echo returns a full copy of the data, so traffic doubles.

Check digit: detect errors in data entry

1
An algorithm calculates a check digit from the other data digits. It is appended to the number, for example as the last digit of an ISBN or product barcode.
2
The complete number is typed or scanned. The computer recalculates the check digit from the other data digits using the same algorithm.
3
It compares the recalculated digit with the check digit entered. If they differ, an entry error is detected and the number needs to be entered again.
printed4729051830645typed4729081830645check digit ↑Recalculated from the 12 digits typed: 66 ≠ check digit 5 → entry error: type it again
printed4729051830645typed4729081830645check digit ↑Recalculated from the 12 digits typed: 66 ≠ check digit 5 → entry error
Your turn

1 The sender adds the values 12, 7 and 20 to make a checksum. The receiver gets 12, 9 and 20 and adds them. What happens?

2 In an echo check, who compares the data?

3 Which check finds a typing mistake in a barcode number?

  1. 1
    Checksum 39. The receiver’s total is 41. They differ, so an error is detected and the data is sent again.
  2. 2
    The sender, by comparing the echo with the original.
  3. 3
    A check digit.
Tick what you can do now
Exam focusParity checks, checksums and echo checks detect errors after transmission. A check digit detects errors in data entry. In an echo check, the sender does the comparison.
Practise with s26/13 Q2(d); m26/12 Q9(a); w25/11 Q2(d) (older paper)
5 / 6
0478 · Unit 2 · Data transmission
Revisionbyexamplicity

Resending data (ARQ) and encryption

§2.2 · §2.3 · Acknowledgements, timeouts and keys

A check can find an error, but the damaged data still has to be sent again. Data can also be intercepted on the way and read by the wrong person. ARQ deals with the first problem, and encryption with the second.

Automatic repeat query (ARQ): confirm data arrived without error

  • The receiver checks each packet (e.g. with a parity check or checksum) and reports with an acknowledgement.
  • The sender starts a timeout with each packet. What it does when the time runs out depends on the method.

The receiver checks each packet (e.g. with a parity check or checksum) and reports with an acknowledgement. The sender starts a timeout with each packet; what it does when the time runs out depends on the method.

Time runs down each diagram. Follow the arrows between Sender and Receiver, and watch what happens to packet 2.

ARQ with positive acknowledgement

SenderReceiverpacket 1 · start timerP1✓no error → positive ACKACKpacket 2 · restart timerP2✗error found: no ACK senttimeouttimeout → resend packet 2P2✓positive ACKACK

ARQ with negative acknowledgement

SenderReceiverpacket 1 · start timerP1✓no NACK by timeout → continuepacket 2P2✗error → negative ACKNACKresend packet 2 · restart timerP2✓Timeout ends with no negative ACK→ packet treated as received

Encryption: intercepted data cannot be understood

  • Encryption uses an algorithm and a key (a string of characters or numbers) to turn plaintext into ciphertext.
  • It does not stop data being intercepted; it stops anyone without the right key from understanding it.

Encryption uses an algorithm and a key (a string of characters or numbers) to turn plaintext into ciphertext. It does not stop data being intercepted; it stops anyone without the right key from understanding it.

Follow each one from Plaintext to Plaintext and see which key is used at each step: one shared key, or two different ones.

SenderReceiverSymmetricPlaintextMEET AT 9encryptCiphertextXq7#Lp2RzCiphertextXq7#Lp2Rzintercepted: cannot be understooddecryptPlaintextMEET AT 9secret keysecret keyAsymmetricPlaintextMEET AT 9encryptCiphertextk3V@9fQw!Ciphertextk3V@9fQw!intercepted: cannot be understooddecryptPlaintextMEET AT 9public keyprivate key
SymmetricSenderPlaintextMEET AT 9encryptCiphertextXq7#Lp2Rzintercepted: unreadableReceiverCiphertextXq7#Lp2RzdecryptPlaintextMEET AT 9secret keysecret keyShare the secret key securely.AsymmetricSenderPlaintextMEET AT 9encryptCiphertextk3V@9fQw!intercepted: unreadableReceiverCiphertextk3V@9fQw!decryptPlaintextMEET AT 9public keyprivate keyThe receiver keeps its private key secret.

Symmetric or asymmetric

Say which key encrypts, which decrypts, and how the key is shared.

Symmetric: the same key encrypts and decrypts, so it must be shared securely: anyone who intercepts both the key and the ciphertext can decrypt the data. Asymmetric: the public key can be given to anyone and encrypts; only the matching private key, kept secret by its owner, can decrypt.

Symmetric

  • The same key encrypts and decrypts, so it must be shared securely.
  • Anyone who intercepts both the key and the ciphertext can decrypt the data.

Asymmetric

  • The public key can be given to anyone and encrypts.
  • Only the matching private key, kept secret by its owner, can decrypt.
Your turn

1 A sender uses positive acknowledgement. No ACK arrives before the timeout. What does the sender do?

2 What is the difference between plaintext and ciphertext?

3 In asymmetric encryption, which key encrypts and which decrypts?

  1. 1
    It resends the packet.
  2. 2
    Plaintext can be read by anyone; ciphertext cannot be understood without the key.
  3. 3
    The public key encrypts; the matching private key decrypts.
Tick what you can do now
Exam focusDescribe ARQ as a sequence. Positive: check → ACK, or none → timeout → resend. Negative: check → negative ACK → resend. SSL uses encryption; asked for a method of encryption, name symmetric or asymmetric.
Practise with m26/12 Q7(c)(ii); s26/13 Q2(e); s26/12 Q4(c); s24/11 Q9(b)(i) (older paper)
6 / 6