Packets, transmission methods and direction

IGCSE Computer Science · Data Transmission

Data packets

Large files are broken into small packets before being sent. Each packet has three parts:

headerthe destination address, the sender's address, and the packet number
payloadthe actual data being carried
traileran error-checking method, and a marker showing the packet has ended

The packet number is the part students forget, and it is essential: packets can arrive out of order, so the receiver needs the numbers to reassemble the file correctly.

Packet switching

Packets travel independently, and each one is routed by whichever path is least congested at that moment. So packets of the same file may take different routes and arrive out of order, and the receiving device reassembles them using the packet numbers.

Advantages: no single line is tied up, so the network is used efficiently; and if one route fails, packets are simply re-routed around the problem.

Disadvantages: packets can arrive out of order or be lost, so they must be reassembled and any missing ones requested again — which adds delay.

Serial and parallel transmission

serialbits are sent one at a time down a single wire
parallelseveral bits are sent simultaneously down several wires

Parallel is faster over short distances, but it has a serious weakness over long ones: the bits travel down slightly different wires at slightly different speeds, so they arrive at different times. This is called skew, and it corrupts the data.

Serial has no skew because there is only one wire. It is also cheaper (fewer wires) and more reliable over distance — which is why almost all long-distance transmission, including USB and network cables, is serial.

So "parallel is faster" is only true over short distances. Over long ones, serial wins.

Direction of transmission

The pair most often confused is half-duplex and full-duplex. Both send in two directions — the difference is only whether they can do it at the same time.

USB

USB is a serial connection. Its advantages: the connector only fits one way so it cannot be plugged in wrongly; it is a universal standard supported by almost all devices; it can supply power as well as data; and it is automatically detected by the operating system.

Its limits: cable length is restricted (long cables cause signal loss), and older USB standards are slower than some alternatives.

“Parallel is faster” is ONLY true over SHORT distances SERIAL — one wire, one bit at a time 1011 ✓ arrive evenly only one wire → NO skew, cheaper, reliable over long distances PARALLEL — many wires, many bits at once 1011 SKEW — arrive at different times the wires have slightly different speeds That is why USB and network cables — every long-distance connection — are SERIAL.
Skew is the technical reason parallel transmission loses over long distances. The longer the distance, the greater the skew, until the receiver can no longer reassemble the bits correctly.

Worked example: choosing serial or parallel, and explaining skew

(a) Explain why almost all long-distance connections use serial transmission, even though parallel transmission can send many bits at once. (b) State three advantages of USB.

Solution

(a) Why serial wins over long distances.

Reason one — skew. Parallel transmission sends several bits at once over different wires. But those wires are not exactly identical: they differ slightly in length, resistance and interference.

Over short distances, that difference is negligible. But the farther the signal travels, the more the difference accumulates, so bits that should arrive together arrive out of step.

This is called skew, and when it becomes large enough, the receiver cannot correctly reassemble which group of bits belongs with which — the data is corrupted.

Serial transmission cannot suffer skew, because there is only one wire and the bits travel one after another in the correct order.

Reason two — cost. Parallel needs many wires. For a cable hundreds of metres or kilometres long, a cost eight or sixteen times higher is unacceptable.

Reason three — crosstalk. Many wires running close together also cause interference with each other, making the problem worse.

Conclusion. The statement “parallel is faster” is only true over short distances — such as inside a computer's circuit board. Over long distances, serial is both cheaper and more reliable, so it is the choice for USB, network cables and every long-distance link.

(b) Three advantages of USB.

One — it cannot be plugged in the wrong way. The connector is designed to fit in only one orientation, so the user cannot plug it in backwards and damage the device.

Two — a widespread standard. Almost every device supports USB, so the same cable can be used for many different computers and peripherals. The operating system also detects it automatically, so no manual installation is needed.

Three — it supplies both power and data. Many devices — mice, keyboards, portable hard drives — need no power supply of their own because they draw power through the USB cable itself.

Limitations worth stating: the cable length is limited because long cables cause signal loss, and older USB standards are slower than some alternatives.

Worked example: packets and packet switching

Describe the three parts of a packet and the contents of each. Then explain how packet switching works, and why the packet number is essential.

Solution

The three parts of a packet.

The header. Contains the destination address so the network knows where to send the packet, the sender's address so the receiver knows who to reply to, and the packet number.

The payload. Contains the actual data being carried — the part of the file's content.

The trailer. Contains the error-checking method so the receiver can check whether the data was corrupted on the way, and an end-of-packet marker.

How packet switching works.

A large file is split into many small packets. Each packet travels independently, and at each network node, the router chooses for it the route that is least congested at that moment.

Consequence: the packets of the same file can take different routes, and because the routes differ in length, they arrive out of order.

Why the packet number is essential.

Without the number, the receiver has no way of knowing which packet comes before which. It would assemble the pieces in the order they arrive, and the resulting file would be jumbled and useless.

With the number, the receiver simply re-sorts them by number and then assembles them — whatever order they arrive in.

The number does a second job too: it lets the receiver know which packet is missing. If packets $1, 2, 4, 5$ are received, packet $3$ has clearly been lost, and the receiver asks for exactly that packet to be resent instead of resending the whole file.

Advantages of packet switching. No line is held exclusively, so the network is used efficiently; and if a route fails, the packets are rerouted around the fault so the connection is not cut.

Common mistake

The claim that parallel transmission is always faster than serial transmission. It sounds very reasonable — sending eight bits at once must be faster than sending them one at a time — and it is true over short distances, for example inside a circuit board. But over long distances the opposite holds. The wires in a parallel cable are not exactly identical in length, resistance and interference. Those small differences accumulate with distance, so bits that should arrive together arrive out of step — a phenomenon called skew. When the skew is large enough, the receiver cannot reassemble the bits correctly and the data is corrupted. Serial cannot suffer skew because there is only one wire, and it is also cheaper (fewer wires) with less crosstalk. That is why USB, network cables and every long-distance link are serial. How to avoid the trap: whenever you compare two methods, also ask “over what distance?”

Key takeaway

A packet has three parts: the header (destination address, sender address, packet number), the payload (data), the trailer (error checking, end marker). Packet switching lets packets take different routes so they arrive out of order — and the packet number is what allows correct reassembly and also detects missing packets. Parallel is only faster over short distances; over long distances it suffers skew, so serial wins. Three directions of transmission: simplex, half-duplex (both directions but not at the same time), full-duplex (both directions at the same time).

← Text, images, sound and compression · All IGCSE Computer Science lessons · Practice IGCSE Computer Science questions (free, instant scoring) · Error checking and encryption →