Cambridge IGCSE Computer Science Notes

Chapter 2 · Data transmission

2.1 Types and methods of data transmission

When data moves between devices, it has to be organised, routed and transmitted in a form the receiving device can reconstruct correctly. This topic explains data packets and packet switching, the main transmission modes and methods, and how USB provides a standard serial connection between devices.

Data packetsPacket switchingTransmission modesSerial & parallelUSB

What you need to understand

By the end of Topic 2.1 you should be able to describe the structure of a data packet and the role of routers in packet switching; distinguish simplex, half-duplex and full-duplex transmission; compare serial and parallel transmission; and explain how USB connects devices, including the role of automatic detection and device drivers.

2.1.1

Data packets

Data sent over long distances is normally divided into smaller units called data packets or datagrams. The textbook describes these packets as typically being around 64 KiB. Sending smaller packets is easier to control than trying to send one long continuous stream of data, and it allows different packets to take different routes through a network.

Why split data into packets? If one path is busy, faulty or unavailable, packets can be routed along other available paths. The receiver then has to reassemble the packets in the correct order.

Packet structure

A typical packet has three main parts: a header, a payload and a trailer.

Course-book Figure 2.1 showing the header, payload and trailer of a data packet
Course-book Figure 2.1: the main parts of a data packet.

Header

Contains control information needed to deliver and reassemble the packet, including the source IP address, destination IP address, packet sequence number and packet size. A header may also include the total number of packets in the transmission.

Payload

The actual data being carried by the packet. In the textbook example, the payload is usually about 64 KiB.

Trailer

Contains information that marks the end of the packet and an error-checking value so the receiver can detect whether the packet was corrupted in transmission.

What the header does

Error checking in the trailer

The textbook introduces a cyclic redundancy check (CRC) here as the error-checking value carried in the trailer. In the simplified explanation used in this topic, the sender calculates a value from the payload and stores it in the trailer. The receiver recalculates the value after the packet arrives and compares the two results. If they do not match, the packet is treated as damaged and must be sent again.

Exam focus: for a packet-structure question, do not mix up the three parts. The header carries addressing and sequencing information, the payload carries the data, and the trailer identifies the end of the packet and carries error-checking information.

Packet switching

Packet switching is a method in which a message is split into packets and the packets are sent independently across the network. Each stage of the route contains a router. A router reads information in the packet header — especially the destination address — and decides where to send the packet next.

Course-book Figure 2.2 showing a network of routers with several possible routes between two computers
Course-book Figure 2.2: several possible routes exist between the sender and receiver.

Packets do not have to follow the same route. The route selected at each stage depends on what paths are available and how busy different nodes are. The shortest available route is selected, which may not be the shortest theoretical route if parts of the network are busy or unsuitable.

Course-book Figure 2.5 showing packets following different routes and arriving in a different order
Course-book Figure 2.5: packets can follow different paths and arrive in a different order.

What happens at the destination?

  1. The receiving device collects the packets that arrive.
  2. Sequence numbers in the headers are used to restore the correct order.
  3. If a packet is missing or damaged, the system can request that the relevant packet is sent again.
  4. Once the required packets are present and correctly ordered, the original data can be reconstructed.

Benefits and drawbacks of packet switching

BenefitsDrawbacks
No need to reserve one communication line for the whole transmission.Packets can be lost and may need to be re-sent.
Failed, busy or faulty routes can be avoided by re-routing packets.Real-time streaming can be affected by delays, missing packets or packets arriving at different times.
Network usage can be expanded relatively easily.The receiver may need time to put packets back into the correct order.
A high data-transmission rate can be possible.More control information is needed because each packet requires a header and trailer.
Book completeness note: the textbook also explains hopping: a hop number can be reduced each time a packet leaves a router so that a packet that never reaches its destination is eventually deleted rather than circulating indefinitely. The book explicitly marks hopping as included for completeness rather than as syllabus content.
Check packet structure and packet switching.
2.1.2

Data transmission

Data may travel only a short distance, such as from one device to another nearby, or across a global network. The textbook highlights three factors to consider:

These rules are normally governed by a communication protocol.

Simplex, half-duplex and full-duplex

Course-book Figure 2.8 showing simplex, half-duplex and full-duplex transmission modes
Course-book Figure 2.8: the three transmission-direction modes.

Simplex

Data travels in one direction only. The textbook example is data sent from a computer to a printer.

Half-duplex

Data can travel in both directions, but not at the same time. A walkie-talkie is the textbook example: one person transmits while the other receives.

Full-duplex

Data can travel in both directions at the same time. A broadband internet connection is given as an example.

Do not confuse direction with method. Simplex/half-duplex/full-duplex describe the direction and timing of communication. Serial/parallel describe how many bits are transmitted at once.

Serial data transmission

Serial transmission sends one bit at a time along a single wire or channel. The bits travel one after another as a stream.

Course-book Figure 2.10 showing bits travelling one after another from sender to receiver
Course-book Figure 2.10: serial data transmission.

Parallel data transmission

Parallel transmission sends several bits at the same time using several wires or channels. A common classroom example is sending one byte (eight bits) simultaneously along eight separate channels.

Course-book Figure 2.11 showing several bits travelling at the same time on separate channels
Course-book Figure 2.11: parallel data transmission.

Serial versus parallel

FeatureSerialParallel
Bits sent at onceOne bitSeveral bits
Channels/wiresOne data channelSeveral data channels
Best distanceLonger distancesShorter distances
Skew riskLow because bits share one channelHigher over longer distances because separate bits may arrive at different times
HardwareFewer wires; usually cheaperMore wires; usually more expensive
Typical use in this topicUSB and longer-distance linksInternal computer pathways where distances are short
Exam technique: when a question asks for a transmission type, combine the two descriptions if necessary. For example, “one bit at a time in both directions, but not at the same time” is serial, half-duplex.
Check modes and serial/parallel transmission.
2.1.3

Universal serial bus (USB)

USB stands for Universal Serial Bus. It is a standard form of serial communication used to connect peripherals and other devices to a computer. In the textbook's description, USB can support both half-duplex and full-duplex data transmission.

USB cable structure

Course-book Figure 2.12 showing a typical USB cable with red, white, green and black wires
Course-book Figure 2.12: a typical four-wire USB cable.

The standard cable shown in the book has four shielded wires:

Red

Power: +5 V.

Black

Ground.

White

One of the two data signal wires.

Green

The other data signal wire.

What happens when a USB device is connected?

  1. The computer detects that a device is present.
  2. The device is identified.
  3. The appropriate device driver is loaded so the computer and device can communicate.
  4. If the required driver is not already available, the system may prompt the user to install or download it.
Device driver: software that allows the operating system to communicate correctly with a particular hardware device.

USB-C in the supplied textbook

The textbook describes USB-C as a 24-pin symmetrical connector that can be inserted either way round. It also describes support for power delivery and high data rates, and notes backward compatibility with older USB standards when a suitable adaptor is used.

Source note: USB standards continue to develop over time. For this topic page, the description follows the supplied Cambridge course book so that the terminology and values students revise match their source material.

Benefits and drawbacks of USB

BenefitsDrawbacks
Devices can be automatically detected and drivers can be loaded automatically.Standard USB cable length is limited; the book notes that hubs may be required for longer runs.
USB has become an industry-standard connection with wide support.Very old USB standards may not always be supported on newer computers.
One cable can carry data and also supply power to many connected devices.USB data rates can be slower than some dedicated networking technologies.
The protocol can request re-transmission if an error is detected.Different USB versions, connectors and adaptors can create compatibility or performance differences.
Extra ports can be added using USB hubs.A hub shares the connection and does not remove all physical distance or bandwidth limitations.
Backward compatibility allows many older USB devices to continue working.Backward compatibility may require a suitable adaptor or may operate at an older device's lower capability.
Check USB structure and behaviour.

Topic 2.1 revision checklist

Explain why data is divided into packets.
Identify the header, payload and trailer and state what each contains.
Explain the role of packet sequence numbers and error checking.
Describe how routers and packet switching move packets across a network.
Explain why packets may arrive out of order and how they are reassembled.
State benefits and drawbacks of packet switching.
Distinguish simplex, half-duplex and full-duplex.
Distinguish serial from parallel data transmission.
Explain skew and why it affects parallel transmission over longer distances.
Explain how USB connects devices and why device drivers are needed.
Ready for a mixed Topic 2.1 check?
← Topic 1.3 Data storage and file compressionComputer Science contentsTopic 2.2 Methods of error detection →