Start here: packets
- Data sent over a network is split into small pieces called packets. Each packet travels on its own and is put back together at the other end.
- A packet has three parts. The header holds the destination address, the source address and the packet number. The payload is the data itself. The trailer marks the end of the packet and can hold an error check.
- Packet switching: each packet can take a different route through the routers on the network. Packets may arrive out of order, so the packet numbers are used to put them back in the right order. A missing packet is asked for again.
Ways of sending data
- Serial transmission sends one bit at a time down a single wire. It is reliable over long distances.
- Parallel transmission sends several bits at once down several wires. It is fast over short distances, but over long ones the bits can arrive at slightly different times (skew), which causes errors.
- Simplex sends data in one direction only. Half-duplex sends both ways, but only one way at a time. Full-duplex sends both ways at the same time.
- USB (universal serial bus) is a serial connection. Benefits: it is a standard every computer has, devices are recognised automatically, it can power and charge devices, and newer versions still work with older ones. Drawbacks: cables only work over a few metres, and older versions are slow.
Checking for errors
- Interference, such as electrical noise, can change bits during transmission, so the receiver checks the data.
- Parity check: the sender adds a parity bit so the number of 1s is even (even parity) or odd (odd parity). If the count is wrong when the data arrives, there is an error. A parity block checks every row and every column, so the bit that is wrong can be found where the faulty row and column cross.
- Checksum: the sender works out a value from the data and sends it too. The receiver works it out again. If the two don't match, the data is sent again.
- Echo check: the receiver sends the data straight back, and the sender compares it with the original.
- Check digit: an extra digit worked out from the other digits, such as the last digit of an ISBN or a barcode. It catches typing mistakes, such as two digits swapped.
- Automatic repeat query (ARQ): the receiver sends a positive acknowledgement when the data is correct, or a negative one if it isn't. If the sender hears nothing before a timeout, it sends the data again.
Exam tip
- When asked to compare methods, say what each one does and one weakness: a parity check misses an error if two bits flip, and an echo check doubles the data sent.
Common mistakes
- Saying parallel is always faster. Over long distances serial is better.
- Mixing up the check digit, which catches input errors, with the checksum, which checks data after it has been sent.
Key terms
- Packet
- A small piece of data sent across a network, with a header, a payload and a trailer.
- Packet switching
- Sending packets by different routes and putting them back in order when they arrive.
- Parity bit
- An extra bit that makes the number of 1s odd or even, so errors can be spotted.
- Checksum
- A value worked out from the data, sent with it, and worked out again by the receiver.
- Echo check
- Sending the received data back to the sender to compare with the original.
- Check digit
- A digit worked out from the other digits in a number, used to catch input errors.
- Full-duplex
- Data is sent in both directions at the same time.
- Skew
- Bits sent in parallel arriving at slightly different times.
Quick questions on Data transmission and error checking
- What does a packet's header contain?
- The destination address, the source address and the packet number
- Why do packets have a packet number?
- So they can be put back in the right order
- Which method sends one bit at a time down a single wire?
- Serial transmission
- What problem affects parallel transmission over long distances?
- Skew: bits arrive at slightly different times
- A walkie-talkie lets people talk both ways, but only one at a time. What is this?
- Half-duplex
- Using even parity, what is the parity bit for 1110000?
- 1: There are three 1s, so another 1 makes the count even.
- What does a parity block let you do that a single parity bit doesn't?
- Find which bit is wrong
- In an echo check, what does the receiver do?
- Sends the data back to the sender to compare
- Where would you find a check digit?
- At the end of an ISBN or barcode
- In ARQ, what happens if the sender gets no acknowledgement before the timeout?
- It sends the data again
Data transmission and error checking: exam-style questions and mark schemes
Which part of a packet holds the error check? [1 mark]
Answer: Trailer
Describe how packet switching is used to send a file across the internet. [4 marks]
- The file is split into packets (1)
- Each packet has a header with the destination address and packet number (1)
- Packets may take different routes through routers (1)
- They are put back in order at the destination using the packet numbers (1)
- Missing packets are requested again (1)
Explain how a checksum is used to detect errors in transmitted data. [3 marks]
- The sender calculates a value from the data (1)
- The value is sent with the data (1)
- The receiver recalculates the value from the data it receives (1)
- If the two values are different, there is an error and the data is sent again (1)
How to answer them: exam technique and command words.