2 Data transmission
Key objectives
The objectives of this chapter are to revise: l error detection to include parity checks,
l methods of data transmission: checksum, echo checks and Automatic Repeat
– data packets Requests (ARQ)
– structure of data packets l encryption to include symmetric and
– packet switching asymmetric encryption
– serial, parallel, simplex, half-duplex and
full-duplex
– universal serial bus (USB)
2.1 Types and methods of data transmission
2.1.1 Data packets
Data is broken up into packets before it is transmitted. Data
packets are split up into:
l packet header (containing the IP address of the sending station
and receiving station, the sequence number of the packet, so it can
be reassembled, and packet size, to ensure the receiving station
knows that the whole packet has been received)
l payload (the actual data)
l packet trailer (containing cyclic redundancy check (CRC) (error CRC is found by adding
check) and a way of identifying the end of the data packet). 1-bits and send as a
Data packets allow data to be sent in manageable chunks that can be sent hex value
along the most efficient route from A to B. Routers (known as nodes) are
used to control the path a data packet takes from sending station
to receiving station. This is called packet switching where each
data packet can take a different route; each route taken is
independent of each other. Since data packets take different routes,
they could arrive at their destination in the wrong order. A sequence
number in the packet header allows all the data packets to be
reassembled in the right order at the receiving station. Hop
numbers are added to packet headers to ensure they don’t ‘bounce
around’ from router to router and eventually become effectively lost.
Benefits of packet switching Drawbacks of packet switching
It is illegal to photocopy this page
l There is no need to tie up a single l Packets can be lost and need to be
communication line. re-sent.
l It is possible to overcome failed, l The method doesn’t work well
busy or faulty lines by simply re- with real-time streaming (for
routing packets. example, a live sporting event being
l It is relatively easy to expand transmitted over the internet).
package usage. l There is a delay at the destination
l A high data transmission rate is whilst the packets are being re-
possible. ordered.
Hodder & Stoughton Limited © David Watson and Helen Williams 2022 15
2.1 Types and methods of data transmission
Sample questions and answers
A video conference is taking place between delegates in the USA and
Tips
Mauritius. Packet switching is used to send video and sound data between
delegates. Since this is a ‘describe’
question, it is necessary
Describe: to give all the main
a) the potential problems with sound and video quality facts, features and/or
b) how the problems in part a) could be overcome. [6] characteristics about
video conferencing when
Sample high-level answer using packet switching.
It is important to notice
a) Video conferencing is in real time. Video and audio data is split up into data
the reference to part a)
packets before it is sent over the internet. This means that each data packet in part b) – this means
could potentially follow a different route from delegate to delegate. Data that your answer to
packets could therefore take different times from sender to recipient, or part b) must refer back
some may even become ‘lost’. The arriving packets also need to be reassembled to potential problems
into the correct sequence, which can also cause a time delay. All of this could identified in part a).
lead to gaps in data received, freezing of images, drop out or voice and mouth
‘out of synchronisation’ – this would be caused by audio and video data taking
different times from sender to receiver. Teacher’s comments
b) Since the problems seem to be due to timing issues, the best solution would
be to eliminate these time differences. A single path for all data packets would The first answer shows
resolve this; that could be achieved using a dedicated communication link that the student has
between delegates. realised the connection
between video
conferencing and packet
A mention of circuit switching could also be accepted
switching. They have
here if a candidate has gone outside the syllabus.
correctly referred to
‘lost’ packets or packets
Sample low-level answer out of order as a reason
a) Sometimes you get echo or lag on the sound or it may even drop out on why there can be sound
occasions. The video and sound don’t always synchronise where a person’s lips and vision issues. Their
don’t match with the words heard. Sometimes the image just freezes. solution of using circuit
b) This can be overcome using better cameras and microphones and getting a switching (a dedicated
faster internet connection. route) is the kind of
answer you would expect
from a top-level answer (it
Exam-style questions goes slightly beyond the
syllabus, but would still
1 Explain how packet switching could be used to download some
software from a website. [4]
gain credit).
2 Data being shared between two computers is split up into a number The second answer hasn’t
of data packets prior to transmission. The data packets contain a
made the link between
header and a trailer.
video conferencing and
a) Give three pieces of information found in the header. [3] packet switching. But they
It is illegal to photocopy this page
b) The trailer contains a cyclic redundancy check (CRC).
i) Name another item found in the trailer. [1] have mentioned some of
ii) The following data is being sent in the payload: the problems that can
11110000 00111111 00110011 11001100 11111110 11101110 occur without mentioning
00001100 11011111 11001001 how or why they occur.
Use this data to show how CRC is used to ensure no errors The answer would gain
occurred during data transmission. [3] two of the available marks
c) i) Explain how it is possible for data packets to be lost during in part a). One mark could
their transmission across a network. [2] also be awarded in part
ii) Describe how it is possible to deal with lost packets so that b) for suggesting faster
they don’t cause network problems, such as ‘clogging up’ internet could go some
the system. [2] way to resolving the issue.
16 Cambridge IGCSE™ and O Level Computer Science Study and Revision Guide Second Edition
2 Data transmission
2.1.2 Data transmission
The modes of data transmission are:
l simplex: data can be sent in one direction only (for example,
sending data to a printer)
l half-duplex: data can be sent in both directions, but not at the same
time (for example, using a walkie-talkie to send and receive messages)
l full-duplex: data can be sent in both directions at the same time
(for example, when using a broadband internet connection).
Serial and parallel data transmission Take care, do not use
the word ‘cable’ instead
l Serial data transmission: data is sent one bit at a time down a of wire.
single wire/channel (for example, using a USB connection).
l Parallel data transmission: several bits of data are sent down several
wires/channels at the same time – each wire/channel transmits each bit
(for example, transmitting data using the internal circuits of a computer).
It is important to remember that serial transmission and parallel transmission
can use serial, half-duplex or full-duplex as a method of data transmission.
The table below shows the comparison between serial and
parallel data transmission.
Features of serial transmission Features of parallel transmission
l Less risk of external interference than with l Faster rate of data transmission than serial, which makes it the
parallel. preferred method where speed is important (such as internal
l More reliable transmission over longer connections in a computer).
distances. l Works well over shorter distances.
l Transmitted bits won’t have the risk of l Due to several wires/channels being used, data can become
being skewed. skewed over long distances (no longer synchronised).
l Used if the amount of data being sent is l Easier to program input/output operations when parallel used.
relatively small, since transmission rate is l Preferred method when sending large amounts of data.
slower than parallel. l The most appropriate transmission method if data is time-
l Used to send data over long distances. sensitive.
l Less expensive than parallel due to fewer l Requires more hardware, making it more expensive to
hardware requirements. implement than serial ports.
2.1.3 Universal serial bus
The universal serial bus (USB-A) is a form of serial data transmission. It is the
industry standard. When a USB is used to connect a device to a computer:
l the computer automatically detects the device
l the device is automatically recognised and the appropriate
device driver is loaded.
The following table considers the benefits and drawbacks of the USB system.
It is illegal to photocopy this page
USB benefits USB drawbacks
l Devices plugged into the computer are automatically detected l Standard USB only supports a maximum
and device drivers are automatically loaded up. cable length of 5 m; beyond that, USB
l Connections can only fit one way preventing incorrect hubs are needed to extend the cable
connections being made. length.
l Has become an industry standard. l Even though USB is backward
l Can support different data transmission rates. compatible, very early USB standards
l No need for external power source since cable supplies +5 V power. (V1) may not always be supported by the
l USB protocol notifies the transmitter to re-transmit data if any latest computers.
errors are detected. l Even the latest version 3 (V3) and version
l Relatively easy to add more USB ports if necessary by using USB 4 (V4) USB-C systems have a data
hubs. transfer rate which is slow compared
l Backward compatible. with, for example, Ethernet connections.
Hodder & Stoughton Limited © David Watson and Helen Williams 2022 17
2.1 Types and methods of data transmission
USB-C is the latest type of USB connector, which uses a totally
symmetrical 24-pin USB connection, so it will fit into a USB port
either way round since there is no up or down orientation. USB-C is
actually USB 3.1 but has been named USB-C to distinguish it from
the old format which was known as USB-A.
The main advantages (compared to existing USB-A) of the USB-C
connector are:
l it is much smaller and thinner which suits the current trend in
making devices much thinner
l it offers 100 watt (20 volt) power connectivity which means full-
sized devices can now be charged
l it can carry data at 10 Gigabits per second (10 Gbps); this means
it can now support 4K video delivery
l the USB-C connection is backward compatible (to USB 2.0
and 3.0) provided a suitable adaptor is used.
Sample question and answer
Compare the USB-A and USB-C types of connection. [4]
Tip
Sample high-level answer
Both types of connector are backward compatible and have become the industry Since this is a ‘compare’
question, it is necessary
standard. Since USB cables also supply power, there is no need for an external power
to consider all the
supply. It is easy to add additional USB-A and USB-C ports by using a USB hub.
similarities and all the
The USB-A connector can only fit one way round, whereas the USB-C connector differences between the
is non-orientated. Data transfer rate using USB-C is considerably faster than for two types of connector.
USB-A. Although both types of connector supply power, the USB-C allows 20 V
power connectivity which means it can be used to charge much larger devices.
Sample low-level answer
USB-C is the newer type of USB connection. It is used by some devices like
mobile phones and laptops. Its advantage is the cable works any way round
since both ends are the same. Data access is much faster than with USB-A.
Teacher’s comments
The first answer contains four distinct points citing the similarities and differences
between USB-A and USB-C. This gives the answer a good balance.
It is illegal to photocopy this page
The second answer is much briefer even though four points were made.
l The first point, although true, is not worth a mark.
l The second point is true, but it is not a comparison as asked for
in the question.
l The answer confused a symmetrical connection that allows the
USB-C to fit into a device any way round with having the same
connector on both ends of the cable – which is incorrect.
l Data access isn’t faster, but data transfer is faster.
Overall, no marks were gained even though four points were made.
18 Cambridge IGCSE™ and O Level Computer Science Study and Revision Guide Second Edition
2 Data transmission
Exam-style questions
3 Explain what is meant by the following 4 Four statements about data transmission
four terms: are shown in the following table.
a) Data skewing Tick (✓) the appropriate columns to
b) USB-C connection indicate the method and direction of data
c) Parallel data transmission transmission being described by each
d) Half-duplex data transmission [8] statement. [4]
Transmission method Direction of data transmission
Statement Serial Parallel Simplex Half-duplex Full-duplex
Data is being sent in both directions, one bit
at a time along a single wire, but not at the
same time.
16 bits of data are being sent along 16
individual channels in both directions
simultaneously.
Data is being sent 8 bits at a time down eight
wires in one direction only.
Data is being sent one bit at a time down a
single wire; the transmission occurs in both
directions simultaneously.
2.2 Methods of error detection
2.2.1 The need to check for errors
When data is transferred there is always a risk that the data may be corrupted,
lost or even gained. Errors can occur during data transmission due to:
l electrical interference – can corrupt data
l packet switching – can lead to data being lost or out of synchronisation
l skewing of data – bits arrive at their destination no longer synchronised.
The next section considers methods used to check for errors
following data transmission.
2.2.2 Parity checks, checksum and echo checks
Parity checks
A parity check is a method used to check whether data has been
changed or corrupted following data transmission. Parity can be
even (even number of 1-bits) or odd (odd number of 1-bits). The left-
most bit is reserved for a parity bit.
It is illegal to photocopy this page
If two bits have been changed (for example, 11110000 changed
to 00111100) the parity may stay the same and wouldn’t be
picked up by a parity check. In such cases, another error
detection method, such as a checksum, needs to be carried out.
Parity blocks can be used to determine exactly which bit has
been corrupted or changed following data transmission.
Hodder & Stoughton Limited © David Watson and Helen Williams 2022 19
2.2 Methods of error detection
Worked example
In this example, nine bytes of data have been transmitted. Another byte,
known as the parity byte, has also been sent (this byte consists entirely
of the parity bits produced by the vertical parity check and also indicates
the end of the block of data).
Even parity is being used. The table shows how the data arrived at the
receiving end. And each row and column needs to be checked to see
if they still show even parity.
Parity bit Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
Byte 1 1 1 1 1 0 1 1 0
Byte 2 1 0 0 1 0 1 0 1
Byte 3 0 1 1 1 1 1 1 0
Byte 4 1 0 0 0 0 0 1 0
Byte 5 0 1 1 0 1 0 0 1
Byte 6 1 0 0 0 1 0 0 0
Byte 7 1 0 1 0 1 1 1 1
Byte 8 0 0 0 1 1 0 1 0
Byte 9 0 0 0 1 0 0 1 0
Parity byte 1 1 0 1 0 0 0 1
The table shows:
l byte 8 (row 8) now has incorrect parity (there are three 1-bits)
l bit 5 (column 5) also now has incorrect parity (there are five 1-bits).
First, the table shows that an error has occurred following data
transmission (there has been a change in parity in one of the bytes).
Second, at the intersection of row 8 and column 5, the position of the
incorrect bit value (which caused the error) can be found. The 1- bit at
this intersection should be a 0-bit; this means that byte 8 should have
been:
0 0 0 1 0 0 1 0
which would also correct column five, giving an even vertical parity (now
has four 1-bits).
Checksum
A checksum is another method used to check if data has been changed/
corrupted following data transmission. The checksum is calculated by the
sending computer, from the block of data using an agreed algorithm. The
data is then sent as a block along with the checksum. The checksum is re-
It is illegal to photocopy this page
calculated by the receiving computer using the same algorithm used by the
sending computer. Any differences in the checksum indicates an error.
Echo check
An echo check requires data to be sent back to the sending
computer where it is compared with the data originally sent. Any
errors and the data is re-sent. This is not a very reliable method; if
the two sets of data are different, it is not known whether the error
occurred when sending the data originally or if the error occurred
when sending the data back for checking.
20 Cambridge IGCSE™ and O Level Computer Science Study and Revision Guide Second Edition
2 Data transmission
2.2.3 Check digits Refer to Cambridge
Check digits are used to identify any errors following data entry. A IGCSE and O Level
check digit is a value calculated by many methods, such as ISBN-13 or Computer Science Second
modulo-11. The generated digit is added to the end (on the right-hand edition pages 60–62 for
examples on check
side) of the number. Barcodes are used on products in supermarkets;
digit calculations using
check digits are used to ensure the barcode is read correctly.
ISBN-13 and Modulo-11.
Check digits can detect:
l incorrect digits entered
l transposition errors
l omitted or extra digits in the number
l phonetic errors (for example, 13 (thirteen) instead of 30 (thirty)).
2.2.4 Automatic Repeat Requests
An Automatic Repeat Request (ARQ) is a way to check data
following data transmission. It is often used by mobile phone
networks to guarantee data integrity.
ARQs uses positive and negative acknowledgements and timeout. The
receiving device receives an error detection code as part of the data
transmission (this is typically a cyclic redundancy check). This is used to detect
whether the received data contains any transmission errors. If no error is
detected, a positive acknowledgement is sent back to the sending device.
However, if an error is detected, the receiving device now sends a negative
acknowledgement to the sending device and requests re-transmission
of the data. A timeout is used by the sending device by waiting a pre-
determined amount of time. If no acknowledgement of any type has been
received by the sending device within this time limit, it automatically re-
sends the data until a positive acknowledgement is received or until a pre-
determined number of re-transmissions has taken place.
Sample questions and answers
a) Explain how Automatic Repeat Request (ARQ) can be used to detect
errors following data transmission. [3]
b) Explain why echo check is not a very reliable method for detecting
errors. [2]
Sample high-level answer Tip
a) The receiving device receives an error detection code as part of the data Since this is an ‘explain’
transmission (usually a cyclic redundancy check). This is used to detect whether question, it is necessary
the received data contains any transmission errors. If no error is detected, to give all the facts to
It is illegal to photocopy this page
a positive acknowledgement is sent back to the sending device. If an error is
support the claims in the
question. In part a), you
detected, the receiving device now sends a negative acknowledgement to the
have to give supporting
sending device and requests re-transmission of the data. A timeout is used by the
information which
sending device by waiting a pre-determined amount of time. If no
explains how ARQ can
acknowledgement of any type has been received by the sending device within this be used to detect errors.
time limit, it automatically re-sends the data until a positive acknowledgement is In part b), you need to
received, or until a pre-determined number of re-transmissions have taken place. give facts which show
b) The problem with echo check is it is unclear where the error occurred. Did it that echo checking is not
occur during the original transmission from sender to receiver, or did it occur very reliable.
when the receiver sent the data back to the sender? Because of this, it is not
a very reliable method of detecting where an error might have occurred.
Hodder & Stoughton Limited © David Watson and Helen Williams 2022 21
2.2 Methods of error detection
Teacher’s comments
Sample low-level answer
a) ARQs use acknowledgement and timeout; when an error is detected, a negative The first student gave an
acknowledgement is sent and if no error, a positive acknowledgement is sent. If no answer that exceeded
acknowledgement is received, timeout is employed. what was asked for. The
b) Echo checks can generate an error when doing the actual check. It is first half of the paragraph
therefore not a reliable error detection method. in part a) contained three
valid points and the
maximum mark would
Exam-style questions have been gained
already. The rest of the
5 Nine descriptions about error checking methods are given in the paragraph contained
table below. By ticking (✓) in the appropriate column or columns, correct information but
indicate whether each description refers to checksum, parity check, will have used up
ARQ or CRC. It is possible more than one column, or none
valuable time when doing
of the columns, can be ticked for each statement. [9] an exam without gaining
Description Checksum Parity check ARQ CRC any additional marks.
An extra bit is sent with each
byte of data. The second answer to
part a) was much briefer
Makes use of positive and
negative acknowledgement.
but two marks would be
gained for a mention of
Uses timeout to determine if acknowledgement and
data needs to be re-sent.
timeout. In part b), the
If an error is found, a request is point made is rather
made to re-send the data. weak but just valid for a
Re-calculation is made on any mark. So, three marks
additional data values sent with out of a possible five.
the main data block.
Method used to determine which
bit in a data block has been
altered.
Additional value sent at the end
of a block of data used to check
if a data transmission error
occurred.
Number of 1-bits are counted
before and after a data block
has been sent.
Value used as part of a data
packet trailer to check if any
data corruption has occurred.
6 a) The following block of data was received after transmission from a
remote computer. Even parity protocol was being followed by both
computers. One of the transmitted bits has become changed
It is illegal to photocopy this page
following transmission.
i) Locate which bit was changed and which byte was affected.
ii) Write down the corrected byte.
iii) Explain, under what circumstances, this method wouldn’t
identify which byte had become corrupted or changed? [4]
22 Cambridge IGCSE™ and O Level Computer Science Study and Revision Guide Second Edition
2 Data transmission
Parity bit Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
Byte 1 0 0 1 1 1 0 0 1
Byte 2 1 0 0 1 1 1 0 0
Byte 3 0 1 0 0 1 1 1 0
Byte 4 0 0 1 1 0 0 1 1
Byte 5 1 0 0 0 1 0 0 0
Byte 6 1 1 1 0 1 1 0 1
Byte 7 0 1 1 0 0 0 0 0
Byte 8 1 1 0 0 0 1 1 1
Byte 9 0 0 1 1 1 1 0 0
Byte 10 0 1 1 1 0 1 1 1
Parity byte 0 1 0 1 0 1 0 1
b) ARQ was used as a second method to identify errors following
data transmission. Explain how ARQ is used to detect errors
following data transmission. [4]
2.3 Symmetric and asymmetric encryption
2.3.1 The purpose of encryption
When data is transmitted over public networks, there is always the risk of it
being intercepted. Using encryption and encryption keys helps solve this
problem or certainly makes it more difficult for the hacker. Encryption alters
the data into a form that is unreadable by anybody for whom the data is not
intended. When encrypted, this last sentence becomes:
‘53f0A+yO+vRytMi9MjyS+JuUsLYTVsXpJDvj7PU6K3cYkr7l9ftMV2mxMvV2Ou/
OzHPVrKtRanB/5GSzrPx+3NRYzYe9h2Dktrf0cQ22Wzrnj0DnxGvPzOGVIyYezDb
Si2DoxlUewt1NVTFTmCu1k2CXL6wRCxXmbznQGkaiN8c=‘
As you can see this is now almost unreadable without
knowing the decryption key.
The original data is called plaintext and data which is encrypted is
called ciphertext.
Encryption can’t stop data being intercepted, but it prevents it
making any sense if intercepted. The following section summarises
symmetric and asymmetric encryption.
2.3.2 Symmetric and asymmetric encryption.
Symmetric encryption uses a single encryption key. The same key
It is illegal to photocopy this page
is used to encrypt data and to decrypt data. Modern encryption keys
use 256-bit encryption (giving about 1077 possible combinations)
which makes it hard to crack.
Asymmetric encryption uses two keys: a public key (known to
everyone) and a private key (known to one user only). Matching pairs
(private and public keys) are generated by an encryption algorithm.
Both types of key are needed to encrypt and decrypt messages. When
using asymmetric encryption, matching pairs of keys are used (these two
keys are mathematically linked but cannot be derived from each other).
Hodder & Stoughton Limited © David Watson and Helen Williams 2022 23
2.3 Symmetric and asymmetric encryption
For example, if ‘A’ wants to send a confidential document to ‘B’, ‘B’
sends ‘A’ their public key who uses this to encrypt the document before
sending it to ‘B’. ‘B’ now uses their private key to decrypt the document.
Sample question and answer
Explain why asymmetric encryption is safer than symmetric encryption
when sending data over the internet. [4]
Tip
Sample high-level answer
When using symmetric encryption, it is difficult to keep the encryption key a Since this is an ‘explain’
question, it is necessary
secret (for example, it needs to be sent in an email or a text message which can
to give all the facts to
be intercepted). Therefore, the issue of security is always the main drawback of
support the claims in the
symmetrical encryption, since only a single encryption key is required for both
question and give
sender and recipient. With asymmetric encryption two keys called the public key evidence as to why
and the private key are used. When two users wish to share a document, for asymmetric encryption
example, they both use the same algorithm to generate their own matching pairs is safer than symmetric
of keys (private and public), which they must keep stored on their computers. encryption.
The matching pairs of keys are mathematically linked but can’t be derived from
each other. One user sends their public key which is used to encrypt the
document. When this encrypted document is received, the recipient uses their
own private key to decrypt it (this works because the public key and private key Teacher’s comments
on the recipient’s computer are a matching pair). This makes asymmetric
encryption considerably safer than symmetric encryption, provided the The first answer is very
encryption keys are at least 128 bits in length. comprehensive and
worth a lot more than
the four marks. The
danger in writing very
Sample low-level answer
comprehensive
Symmetric encryption uses one key which means no document is safe if answers is the time it
this key is stolen or intercepted. Asymmetric encryption uses two keys; takes, which can cause
this makes it far more secure. a problem in exams
which are time limited.
Exam-style questions The second answer is
much briefer but gains one
7 Ali and Daniel both work for an international company. Ali wishes
mark for reference to the
to send Daniel a confidential document over the internet.
less secure symmetric
a) Describe how Ali and Daniel would use matching pairs of keys
encryption. However, just
to ensure the document is sent safely over the internet. [4]
writing ‘asymmetric
b) Explain what needs to happen if Daniel wants to receive
documents safely from other people within the company. [3] encryption uses two keys’
8 Define the following computer terms. is insufficient to gain any
a) Ciphertext marks – the student needs
to mention public and
It is illegal to photocopy this page
b) Plaintext
c) Encryption private keys and why this
d) Private key makes it a more secure
e) Encryption algorithm [5] system.
24 Cambridge IGCSE™ and O Level Computer Science Study and Revision Guide Second Edition