0% found this document useful (0 votes)
234 views41 pages

Chapter 2 - Data Transmission

Uploaded by

a2080903768
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
234 views41 pages

Chapter 2 - Data Transmission

Uploaded by

a2080903768
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

TRANSMISSION

CHAPTER 2: DATA

2.1 - Types and methods of data transmission

2.2 - Methods of error detection

2.3 - Symmetric and asymmetric encryption

IGCSE COMPUTER SCIENCE


Do your homework
already?

YES (actually
no)
HOW IS DATA (TEXT, IMAGE, AND SOUND) TRANSMITTED?

YES!

Computer Science
is Easy
2.1

Types and methods of data


transmission
2.1.1 Data Packets
• Data sent over long distances is usually broken up into
data packets (datagrams).
• Packet size is roughly 64KiB.
• This makes it easier to control than a long continuous
stream of data.
• Each Packet can be sent along a different route to its
destination.
Data is broken down into packets

P1

Secret
Message P2

P3
Each packet can be sent along a different route

Any Route
P1

Secret
Message P2 Destination

P3
One disadvantage : Data needs to be reassembled when it reaches
the destination.

P1

Secret
Destination
P2 Message

P3
Packet Structure
A typical packet is split up into:
» a packet header
P1 » the payload
» a trailer.

Trailer
Header Payload
Packet Structure (Header)
• Sender IP Address
Header • Receiver IP Address
• Sequence number of the packet.
• This is to ensure that all the packets can be
reassembled correctly once they reach the
destination.
• Size of the packet
• This is to ensure that the receiving station
can check if all of the packets have arrived.
Packet Structure (Header)
• Sender IP Address
Header • Receiver IP Address
• Sequence number of the packet.
• This is to ensure that all the packets can be
reassembled correctly once they reach the
destination.

Remember • Size of the packet


• This is to ensure that the receiving station

SRSS can check if all of the packets have arrived.


Packet Structure (Payload)
The actual data in the packet.
Payload

For each packet, the payload


consists of the actual data being
sent in the packet (this is
usually about 64KiB).
Packet Structure (Trailer)
• Some ways to identify the end of the
Trailer packet. This is essential to allow each
packet to be separated from each other
as they travel from the sending to
receiving station.
Packet Structure (Trailer)
2. Some form of error checking to ensure
Trailer packet arrives error free.
Cyclic Redundancy Checks(CRCs)-An error checking method
• The sending computer will add up all the 1-bits in the payload and store
it as a hex value in the trailer before it is sent.
• Once the packet arrives, the receiving computer recalculate the number
Trailer of 1-bits in the payload.
• the computer then checks this value against the one sent in the trailer
• if the two values match, then no transmission errors have occurred;
otherwise the packet needs to be re-sent.

Eg. Payload Number of 1 Hexadecimal Trailer


bit
1110100110100
1111010010101 15 F F
Cyclic Redundancy Checks
2. Once the packet arrives, the receiving
Trailer computer recalculate the number of 1-bits in
the payload.
Trailer

Eg. Number of 1 bit Hexadecimal


F
Payload Compare
1110100110100
1111010010101 15 F
Does error
occur?
Cyclic Redundancy Checks

Trailer

Trailer

Eg. Number of 1 bit Hexadecimal


F
Payload Compare
1110100110100
1111010010101 15 F
Does error
occur?
Packet Structure

P1

A typical packet is split up into:

Header Payload Trailer


Packet Switching (Payload)
• Packet switching is a method of data transmission in which a message
is broken up into a number of packets.
• Each packet can be sent independently from start point to end point.
• At the destination, the packets will need to be reassembled into their
correct order.
• At each stage in the transmission there are nodes that contain a
router.
• Each router will determine which route the packet needs to take, in
order to reach its destination (The destination IP address is used in this
part of the process).
1. The router will determine the route of each packet.
2. Routing Selection depends on the number of packets waiting to be processed at each node.
3. The shortest possible path available is always selected
4. Packets can arrive in a different order compared to the way they were sent.
Benefits of packet switching

• There is no need to tie up a single communication line.


• A high data transmission rate is possible

Drawbacks of packet switching

• Data can be lost and need to be re-sent


• Delay at the destination whilst the packets are being re-
ordered)
2.1.2 Data transmission
Data transmission can be either over a short distance (for example, computer to printer) or over longer distances (for
example, from one computer to another in a global network). Essentially, three factors need to be considered when
transmitting data:

• the direction of data transmission (for example, can data transmit in one direction only, or in both directions)
• the method of transmission (for example, how many bits can be sent at the same time)
• how will data be synchronised (that is, how to make sure the received data is in the correct order).

These factors are usually considered by a communication protocol.

BOTH BOTH
ONE DIRECTION DIRECTION BUT DIRECTION AT
ONLY NOT AT THE THE SAME TIME
SAME TIME
Serial and parallel data transmission
Serial data transmission occurs when data is sent ONE BIT AT A TIME over a SINGLE WIRE/CHANNEL. Bits are sent one after
the other as a single stream.

Parallel data transmission occurs when SEVERAL BITS OF DATA (usually one byte) are sent down SEVERAL
CHANNELS/WIRES all at the same time. Each channel/wire transmits one bit:

Activity 2.2
2.1.3. Universal serial bus (USB)
• The universal serial bus (USB) is a form of serial data transmission.
• USB is now the most common type of input/output port found on computers and has led to a standardisation
method for the transfer of data between devices and a computer.

Benefits Drawbacks
devices plugged into the computer are automatically detected standard USB only supports a maximum cable length of 5 m;
and device drivers are automatically loaded up beyond that, USB hubs are needed to extend the cable length

connections can only fit one way preventing incorrect


connections being made
2.2

Methods of error detection


2.2.1. The need to check for errors
When data is transmitted, there is always a risk that it may be corrupted, lost or even gained.
Errors can occur during data transmission due to:
• Interference
• Problems during packet switching
• Skewing of data
Checking for errors is important since computers are unable to understand text, for example;

There are a number of ways data can be checked for errors following transmission:
• Parity checks
• Checksum
• Echo check
Each of these methods is designed to check the errors after the data has been
transmitted from one device to another
Parity checks
Parity checking is one method used to check whether data has been changed or corrupted following data
transmission. This method is based on the number of 1-bits in a byte of data.
The parity can be either called EVEN (that is, an even number of 1-bits in the byte) or ODD (that is, an odd
number of 1-bits in the byte).

Activity Solution 2.4

1
0
1
1
0
0
1
0
1
0
Activity Solution 2.5

We cannot find out where the error occurred during transmission.


Activity 2.6
Activity Solution 2.6
So, the 0 will be replaced with 1.
Activity Solution 2.6

So, the 0 will be replaced with 1.


Checksum
A checksum is a method used to check if data has been changed or corrupted following data transmission. Data is sent
in blocks, and an additional value, called the checksum, is sent at the end of the block of data.

Echo check
With echo check, when data is sent to another device, this data is sent back again
to the sender. The sender’s computer compares the two sets of data to check if any
errors occurred during the transmission process.
2.2.3. Check digits
A check digit is the final digit included in a code; it is calculated from all the other digits in the code. Check digits are
used for barcodes on products, such as International Standard Book Numbers (ISBN) and Vehicle Identification
Numbers (VIN).
Check digits are commonly used on:
•Barcodes
•Credit Cards
•Account Numbers
•Government ID Numbers
Example 1: ISBN 13
2.2.4 Automatic Repeat Requests (ARQs)
An Automatic Repeat Request (ARQ) is a third way used to check data following
data transmission. This method can best be summarised as follows:

•Error control protocol

•when an error is detected in a packet of data a request is automatically sent for the data to be resent

•Uses acknowledgement / request and time-out

•Check performed on receiving data // error is detected by e.g. parity check, check sum

•If error detected, request is sent to resend data // negative acknowledgement is used

•Resend request is repeated till data is sent correctly / requests time out / limit is reached

•Send acknowledgement that data is received // positive acknowledgement is used

•If acknowledgement not received in set time data is resent


2.3

Symmetric and asymmetric


encryption
2.3.1 The purpose of encryption
When data is transmitted over any public network (wired or wireless), there is always a risk of it being
intercepted by, for example, a hacker. Under these circumstances, a hacker is often referred to as an
eavesdropper. Using encryption helps to minimise this risk.

Encryption alters data into a form that is unreadable by anybody for whom the data is not intended.
This is particularly important if the data is sensitive or confidential (for example, credit card/bank
details, medical history or legal documents).

2.3.2 Symmetric and asymmetric encryption


2.3.2 Symmetric and asymmetric encryption
Symmetric encryption
Symmetric encryption uses an encryption key; the same key is used to encrypt and decrypt the encoded message.

Asymmetric encryption
Asymmetric encryption was developed to overcome the security problems associated with symmetric encryption. It makes
use of two keys called the public key and the private key:
• public key (made available to everybody)
• private key (only known to the computer user).
Both types of key are needed to encrypt and decrypt message
2. Asymmetric encryption is more secure as it makes use
of two keys, one is public and other one is private. The private
key is only known to the recipient of the document.
a>E
b>B
c>B
d>E
e>A
f>E
g>A
h>B
i>D

You might also like