Cambridge Computer Science For IGCSE Cambridge Course Book 2022 Pages 3
Cambridge Computer Science For IGCSE Cambridge Course Book 2022 Pages 3
Data
transmission
K?
IN THIS CHAPTER YOU WILL:
learn how data is broken down into packets to be transmitted, including the contents of each packet
learn about the universal serial bus (USB) interface and how it is used to transmit data
be able to describe how data is encrypted using both symmetric and asymmetric encryption.
) CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
GETTING STARTED
Your data is transmitted to other devices, sometimes all over the world, on a
regular basis. Have you thought about how it gets there? Draw a diagram to
represent how you think data travels from your device to your friend's device
when you send them a message. It doesn't matter if you don't think you know
how this is done, just draw what you think happens and you can see at the
end of the chapter how close you were with your diagram.
The importance of checking for errors in data transmission can costs banks a lot of money. It takes
very large and powerful systems to check the millions of transactions that are made every day. However,
it would cost them even more in compensation money, if they messed up the data of their customers,
and possibly their money, so they put a lot of time, money and effort into the process.
Discussion questions
1 How would you feel about having a bank account with a bank that did not have any error detection
systems in place? What problems do you think this could cause?
2 Do you think it is right that the bank is responsible for checking errors in the transmission of data?
Much of the hardware, that will be used to transmit the data from one device to another, will not be
owned by them. So, why do you think the bank should be made responsible for checking for errors if
the errors may occur using hardware that isn't theirs?
34 >
2 Data transmission
The payload of the data packet is the actual data from the file that you are sending. payload: the actual
The data is broken up into many small units to be sent as the payload in each packet. data that the user
is sending to the
The trailer section of the packet is sometimes known as the footer. This contains two
receiver.
main pieces of information. The first is the marker to indicate it is the end of the
packet and also the data for any error detection systems that are being used. trailer: a section of
You will learn more about this in Section 2.2. a packet of data that
contains information
about any error
Questions checking methods
that may be used.
1 Can you name the three main sections of a data packet?
2 What information does the packet header contain?
3 Which part of the data packet is the actual data from the file?
4 Why does data need to be broken down into packets to be transmitted?
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
ACTIVITY 2.1
Ask your teacher if you are allowed to use a packet tracer. Your teacher may
want to complete this activity together as a class. Use the packet tracer to
send data to another device and look at the data that the packet tracer
software provides. What kind of information does it give you? What route did
your packets take to get to the destination device?
network: computers
and devices that are
joined together using
cables or wireless
technology.
router: a network
component that
examines a data
packet to obtain its
destination address
and then forward
the packet to this
address.
The packets of data start at device A, they could be transmitted down any of the
pathways between device A and device B. Each packet can be sent using a different
pathway. When a packet reaches a router, the router decides which pathway to send
the packet along next. This will continue until all the packets have arrived at device B.
It is likely that the packets will arrive out of order. Once all packets have arrived, they
are reordered to recreate the file.
2 Data transmission
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
Device A Device B
Each bit of data is transmitted one at a time
along a single wire
Advantages Disadvantages
As data is sent one bit at a time, it As data is sent one bit at a time, the
should arrive in order of sequence. This transmission of data is slower.
means there is less chance of the data
being skewed.
KEY WORD
As data is sent along a single wire, Additional data may need to be sent to
there is less chance of interference. indicate to the receiving device when interference:
This means there is less chance of error the data transmission has started and disruption, such as
in the data. stopped. These are called a start bit electromagnetism,
and a stop bit. to data when it is
Only one wire is needed for a serial transmitted.
transmission cable, therefore, it is
cheaper to manufacture and also
cheaper to buy.
Serial transmission has less chance of data being skewed and less chance of interference.
This makes it more suitable for the transmission of data over long distances.
Advantages Disadvantages
As data is sent multiple bits at the As data is sent multiple bits at the
same time, the transmission of data is same time, bits do not arrive in order
quicker. and need to be reordered after
transmission. This increases the risk of
the data being skewed.
Many computers and devices use As data is sent along multiple wires,
parallel data transmission to transmit there is more chance of interference.
data internally. Therefore, there is no This means there is more chance of
requirement to convert this to serial error in the data.
data transmission to transmit the data
across a network.
Multiple wires are needed for a parallel
transmission cable, therefore, it is more
expensive to manufacture and also
more expensive to buy.
Parallel transmission has an increased chance of data being skewed and an increased
chance of interference. This makes it more suitable for the transmission of data over
shorter distances. This is often limited to approximately 5 metres.
)> CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
Question
5 A marketing company prints leaflets to deliver to people’s houses. The leaflets
are designed on a computer and sent to a large printer that is 3 metres away.
Large numbers of leaflets need to be printed in a short period of time, to makes
sure that they are ready for delivery. Would you use a serial or a parallel data
transmission cable to connect the computer to the printer? Why would you choose
this type of cable?
KEY WORDS
Simplex, half-duplex and full-duplex transmission involve the direction in which the simplex: a
data is transmitted. transmission
method where data
is transmitted in a
Simplex data transmission single direction only.
In simplex data transmission, data is transmitted from one device to another in one half-duplex: a
direction only. Figure 2.5 shows an example: transmission method
where data is
transmitted in both
directions, but only
one direction at a
time.
full-duplex: a
transmission method
where data is
Figure 2.5: Simplex data transmission
transmitted in both
directions at the
You would only use this type of data transmission when there is no need to send data same time.
both ways between the devices. One example is connecting a keyboard to a computer.
Simplex data transmission can be used to do this as data only needs to be sent from
the keyboard to the computer, so that the computer screen can display the keys that
are pressed. There is no reason why the computer would need to send data to the
keyboard, so a simplex data transmission connection is used.
Figure 2.6: Simplex data transmission is used between a computer and a keyboard
2 Data transmission
You would use this type of data transmission when you need to send data in both
directions between the devices, but there is no requirement for this to be at the same
time. It can also be used when the communication between two devices needs to have
a high level of performance. This is when two half-duplex connections can be set up
between devices to allow data to be transmitted in both directions at the same time, but
using two different channels of communication. Can you work out how this would be
set up?
ACTIVITY 2.3
You would use this type of data transmission when it is essential for data to be both sent
and received by each device, at the same time. One example is a telephone conversation.
The person speaking into Device A can speak at the same time as the person speaking
into Device B. It may be a little bit of a chaotic conversation if you both try and speak
at the same time all the time though! However, during most conversations, people do
sometimes speak at the same time, so full-duplex data transmission is needed.
When a connection is created between two different devices it will either be a serial or
parallel data connection. It will also be a simplex, half-duplex or full-duplex connection.
This means that a connection can be, for example, a serial simplex connection, or a
parallel half-duplex connection, or possibly a serial full-duplex connection. You need to
understand when each of the different methods of transmission are most suitable.
Questions
6 Which method of data transmission sends data along a single wire?
7 Which method of data transmission sends data multiple bits at a time?
8 If a data transmission connection sends data one bit at a time, in both directions,
but not at the same time, what kind of data transmission methods are used?
9 What are two advantages of serial data transmission?
10 What are two disadvantages of parallel data transmission?
11 A business manager transmits data about its customers to a central file server. The
file server is 100 metres away from the business manager’s office. They need to be
able to send and receive customer data to and from the server, at the same time. The
accuracy of the customer’s data is imperative. Which methods of data transmission
should be used to create the connection between the business manager’s computer
and the file server? Why would you choose those methods?
ACTIVITY 2.4
Write a data transmission scenario like the one given in Question 11. Think
about which data transmission methods could be used for your scenario and
why they would be the most suitable.
Peer Assessment
Give the scenario to a friend and ask them which data transmission methods
they would use. Are they the same methods that you thought should be used?
If you have chosen different methods, discuss and come to an agreement
about which methods should be used. If you chose the same methods, see if
you had the same reasons for choosing those methods.
42 >
2 Data transmission
The concept of USB can be a little confusing, as it is used to describe several aspects. USB: an industry
You may have heard of a USB connection, a USB cable, or maybe you call a storage standard that is used
device ‘a USB'. You need to understand the difference between several of these aspects. to transmit data.
A USB interface includes items such as a USB port, a USB cable, a USB connection
USB port: a socket
and a USB device.
that is a part of a
A USB device, such as a USB memory stick, is a device that uses the USB interface. device or computer
It plugs into a USB port on a computer and it transmits data using a USB connection. that enables you to
A USB cable can be used to connect devices, such as a mouse, to a computer. insert a USB cable.
A USB connection uses serial data transmission to transmit data between the devices. USB cable: a type of
However, it a special type of serial data transmission connection that is used that is transmission media
designed to transmit data at high speeds. that uses the USB
method to transmit
ACTIVITY 2.5 data.
One of the issues with serial data transmission is the transmission speed is USB connection: a
slower than parallel. Research how a USB connection is able to transmit data collective name for
at a faster rate. using a USB cable
plugged into a USB
port to transfer data
from one device to
COMPUTER SCIENCE IN CONTEXT another.
Many devices are connected using a USB cable. This is because the USB USB device: the
interface is an industry standard, which means that manufacturers don't need name of a device that
to worry about compatibility issues when connecting devices. One of the most plugs into a USB port
recent versions of the USB interface to be released is USB 4. on a computer.
ethernet: another
type of connection
ACTIVITY 2.6 that can be used to
transmit data within a
Research the data transfer speed of USB 4; is this different to USB 1,2 and 3?
network.
What other differences can you find between the different versions of USB?
There are several advantages and disadvantages of the USB interface, see Table 2.3:
Advantages Disadvantages
It is a simple interface. The USB cable to device can The length of a USB cable is limited, normally to
only fit into the USB one way. Therefore, it means less 5 metres.
errors in connecting devices are likely to be made.
The speed of a USB connection is relatively high, so The transmission speed is relatively high for a USB
data can be transferred quickly. connection, but it isn't as high as other types of
connection, such as ethernet.
(continued)
43 >
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
Advantages Disadvantages
The USB interface is a universal standard for
connecting devices, therefore a USB port is included
in many different devices.
When a USB device to cable is inserted into a USB
port, it is automatically detected. The first connection
will normally involve the download of drivers to
operate the hardware that has been connected. Each
connection after this the driver should not need to be
downloaded again.
A USB connection can also be used to power a
device, so it does not need another power source. It
can also use this to charge a device, such as a mobile
phone.
Questions
12 What does USB stand for?
13 What type of data transmission method does a USB interface use?
14 What are two advantages of using the USB interface?
15 Can you name five devices that are connected using a USB interface?
16 What is the length a USB cable limited to? Can you think why it is limited to
this length?
There are several error detection methods that can be used, these include:
• parity check
• checksum
• echo check.
Each of these methods is designed to check for errors after the data has been
transmitted from one device to another.
A parity check can use an odd or even check method. Each byte of data has 7 bits and parity check: a type
1 extra bit that is called a parity bit (see Figure 2.11). The parity bit is normally the of error detection
first or last bit of data in the byte. method that adds an
additional bit to each
byte to create an odd
or even sum.
Figure 2.11: The parity bit is the first bit of data in this byte
Before transmission begins, the parity check is set to be either odd or even parity.
The number of Is in the 7 bits of data is totalled. In the example in Figure 2.11, the
result of that would be 2. If an odd parity check is used, then a 1 is added as a parity
bit. This is because all the Is in the byte now add up to 3, which is an odd number.
If an even parity check is used a parity bit of 0 would have been added instead. This
is because all the Is in the byte would then add up to 2, which is an even number.
When the parity bit has been added to each byte, the data can be transmitted. After
transmission, the receiving device will check each byte of data for errors. If an odd
parity check has been used and the device finds a byte that has an even number of Is,
then it knows that an error has occurred with this byte of data. The error is detected!
Questions
17 Which of these bytes would have been transmitted incorrectly if an even parity
check has been used?
a 10111011
b 01110111
c 10101000
18 Which of these bytes would have been transmitted incorrectly if an odd parity
check has been used?
a 00110001
b 10110101
c 10001000
19 Can you think of an instance in which an error could occur in the data, but this
would not be detected by a parity check?
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
Once the checksum value has been calculated it is added to the data to be transmitted
with it. After transmission, the receiving device uses the same method to calculate a
value from the received data. If the values match, then the device knows that no error
has occurred during transmission. If the values do not match, the device knows that an
error has occurred during transmission. The error is detected!
Questions
20 What is the checksum value calculated from?
21 What happens to the checksum value when it has been calculated before
transmission?
22 Why would checksum values that do not match show that an error has occurred?
An echo check involves a simple comparison of the data sent to the data received. echo check: a type
The sending device transmits the data to the receiving device. The receiving device of error detection
then transmits the data it receives back to the sending device. The sending method that sends
device compares the data it sent to the data it has received back from the a copy of the
receiving device to see if they match. If they do, then no error has occurred. transmitted data back
If they don’t match, then the sending device knows the data was received with error. to the sender to be
The error is detected! compared with the
original data sent.
ACTIVITY 2.8
Question
23 If the data does not match that which is sent back by the receiving device, will this
always mean that the receiving device did not receive the data correctly? How do
you know that?
2 Data transmission
A method called automatic repeat request (ARQ) can be used to do this. There are two automatic
main ways that an ARQ can operate and each method uses either a positive or negative repeat request
acknowledgement and a timeout. (ARQ): a type of
error detection
In a positive acknowledgement method:
method that uses
• The sending device transmits the first data packet. acknowledgement
and timeout to see
• The receiving device receives the data and checks it for errors.
if data has arrived
• Once the receiving device knows it has received the data error free, it sends a correctly after
positive acknowledgement back to the sending device. transmission.
• When the sending device receives this positive acknowledgement, it knows the acknowledgement: a
receiving device has received the data packet error free and it sends the next data message that is sent
packet. from one device to
• If the sending device does not receive a positive acknowledgement within a set another to indicate
timeframe, a timeout occurs. whether data is
received correctly,
• When a timeout occurs, the sending device will resend the data packet. It will keep
doing this when a timeout occurs, until it receives a positive acknowledgement, timeout: a period of
or sometimes a limit (such as 20 times) is set and when this limit is reached it will time that is set and
stop resending the data. used to wait for an
acknowledgement to
be received.
ACTIVITY 2.9
47 >
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
With a partner, discuss and write down the differences between a check digit
and a checksum.
2.6 Encryption
You have learnt a lot about how data is transmitted in this chapter. You have also
learnt why it is important for data to be received correctly and how errors can be
detected to make sure this happens. You also need to understand that the data that is
transmitted often needs to be protected during transmission. This is because data
is valuable, especially when it contains our personal details and information that is
personal to us. A hacker may try and steal the data during transmission so that they KEY WORDS
can use it for their own gain. One method of protection that can be used when
transmitting data is encryption. encryption: a
method of securing
Data before encryption takes place it is called plain text. An encryption algorithm,
data for storage
called an encryption key, is used to scramble the data and make it meaningless. This
or transmission
meaningless data is called cipher text. The cipher text can then be transmitted from
that scrambles
one device to another. The receiving device uses the key to decrypt the cipher text and
it and makes it
return it to its plain text form. This means the data will have meaning again if read.
meaningless.
One important thing to note about encryption is that is does not stop a hacker
stealing the data that is transmitted. It just means that the data that is stolen will be plain text: the name
meaningless, as it will be encrypted and therefore scrambled. They will not understand given to data before
any of the data in the file. encryption.
There are two main methods of encryption that can be used symmetric and encryption key: a
asymmetric. type of algorithm that
is used to encrypt
The process for symmetric encryption is: data.
• Plain text is encrypted into cipher text using an encryption key.
cipher text: the
• The cipher text and the encryption key are sent separately to the receiving device. name given to data
after transmission.
• The same key is then used to decrypt the cipher text back into its plain text form.
This is the simplest method of encryption and is still used for data that is not of a high symmetric: a type
level of importance. It is sometimes used by people just wanting to encrypt the data that of encryption that
they store on their own computer or external storage device, as it isn’t being transmitted uses the same key to
across a network. However, people began to worry that it could be too easy for a hacker encrypt and decrypt
to intercept both the cipher data and the encryption key if it is sent across a network, or data.
the internet, so a more secure method was developed called asymmetric encryption. asymmetric: a type
The process for asymmetric encryption is: of encryption that
uses two different
• Plain text is encrypted into cipher text using a public key. This is also a type of
keys to encrypt and
encryption algorithm.
decrypt data.
• The cipher text is transmitted to the receiving device.
• The cipher text cannot be decrypted using the public key, it is decrypted using a
private key.
A person who uses an asymmetric method of encryption has a public encryption key.
This is called a public key because it is made public for the encryption process. Making
something public means that anyone can see and use it. Any device that wants to send
you encrypted data may obtain your public key and encrypt the data using your public
key. You also have a private key. Any encrypted data that your device receives that has
been encrypted with your public key can be decrypted with your private key. They act
as a pair. Your private key is always kept private though, your device does not make it
available to any other unless authorisation is given to do so.
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
The process can work in reverse as well (a private key is used to decrypt and a
public key is used to decrypt), and this is what can occur in processes such as digital
signatures. These are used in security protocols such as SSL (secure sockets layer).
You will learn more about these in Chapter 5, about applications of the internet.
A bank uses asymmetric encryption for all the banking transactions that are
completed on a daily basis. As you can imagine, the data that is transmitted
for these banking transactions is very sensitive and personal data, so the bank
has to make sure that they use a very secure method of encryption for this
process.
Questions
24 What is the name given to an encryption algorithm?
25 What is the name given to data that has been encrypted?
26 Does encryption stop data being stolen by a hacker? Why or why not?
27 Why is asymmetric encryption a more secure method of encryption than symmetric?
SUMMARY
Data is broken down into packets to be transmitted from one device to another.
Each packet contains three parts: the packet header, the payload and the trailer.
The packet header includes the destination address, the packet number and the originator s address.
The payload is the data the sender wants to transmit.
The trailer contains data such as the error detection method to be used.
A process called packet switching can be used to send the data from one device to another across a network.
Data is transmitted using serial or parallel transmission.
Data is also transmitted using simplex, half-duplex or full-duplex transmission.
An interface called USB can be used to transmit data.
This is often used to connect hardware such as a keyboard to a computer.
Errors can occur when transmitting data due to interference.
Methods are required to detect any errors in transmission.
A parity check is an error detection method that uses a parity bit to detect errors.
An odd or even parity check method can be used.
A checksum is an error detection method that uses a calculated value to detect errors.
An echo check compares data that is sent and received to see if they match, to detect errors.
2 Data transmission
CONTINUED
An ARQ can be used to monitor whether data is received correctly after transmission.
------------------------------------------------------------------ -------------------------
I A check digit is an error detection method that is used for data entry.
Data can be encrypted to keep it secure during transmission.
Encryption can be performed using a symmetric or asymmetric method.
---------------------------------------------------------------------------- —-----------------------------------------------------
Symmetric encryption uses the same key to encrypt and decrypt the data.
Asymmetric encryption uses different key, a public and a private key, to encrypt and decrypt the data.
1 Identify two items of data that would be included in the header of a packet identify: name I
of data. [2] select / recognise.
2 Explain why and how packets of data are reordered after packet switching explain: set out
has been used to transmit data across a network. [2] purposes or
3 Describe how data is transmitted using serial half-duplex data transmission. [4] reasons / make
4 Give two benefits of using the USB interface to connect hardware devices the relationships
to a computer. [2] between things
5 A company has a central file server that is located 500 m away from the evident / provide
main office where employees work at their computers. why and / or how and
support with relevant
Employees send and retrieve files to and from the file server on a daily basis,
evidence.
often at the same time.
Identify the type of data transmission that would be most suitable for the describe: state the
given context. Explain why this would be the most suitable method of points of a topic I
transmission. [6] give characteristics
6 Four statements are given about error detection methods. and main features,
Tick (^) to show which statement applies to which error detection method. give: produce an
Some statements may apply to more than one error detection method. [4] answer from a given
source or recall /
Statement Checksum Echo check Parity check memory.
This method checks for errors
in data after it has been
transmitted.
This method can use an odd
or even process.
This method sends data
back from the receiver to the
sender to compare the data to
check for errors.
This method uses a value that
is calculated from the data to
check for errors.
y CAMBRIDGE IGCSE™ & O LEVEL COMPUTER SCIENCE: COURSEBOOK
SELF-EVALUATION CHECKLIST
After studying this chapter, think about how confident you are with the different topics.
This will help you to see any gaps in your knowledge and help you to learn more effectively.
You might find it helpful to rate how confident you are for each of these statements when you are revising.
You should revisit any topics that you rated ‘Needs more work’ or ‘Getting there’.
52 >
2 Data transmission
CONTINUED