[go: up one dir, main page]

0% found this document useful (0 votes)
10 views18 pages

Chapter 2 Data Transmission

The document discusses data transmission methods, focusing on packet switching, which breaks data into packets for efficient routing and transmission. It outlines the structure of data packets, including headers, payloads, and trailers, as well as the advantages and disadvantages of packet switching. Additionally, it covers various types of data transmission (simplex, half-duplex, full-duplex) and error detection methods to ensure data integrity during transmission.

Uploaded by

mihotafhim
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)
10 views18 pages

Chapter 2 Data Transmission

The document discusses data transmission methods, focusing on packet switching, which breaks data into packets for efficient routing and transmission. It outlines the structure of data packets, including headers, payloads, and trailers, as well as the advantages and disadvantages of packet switching. Additionally, it covers various types of data transmission (simplex, half-duplex, full-duplex) and error detection methods to ensure data integrity during transmission.

Uploaded by

mihotafhim
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/ 18

2.

1 Types and methods of data transmission


Prepared by: MNI Niro
2.1.1 Data packets

• Data sent over long distances is usually broken up into data packets (or datagrams),
typically around 64 KiB in size. This makes the data easier to control than a long
continuous stream.
• Each packet can be sent along a different route to its destination, which is beneficial if a
particular transmission route is busy or out of action.
• The drawback of this method is the need to reassemble the data when it reaches its
destination.

A typical packet is split into three parts:

• Header: Contains the IP address of the sending device, the IP address of the receiving
device, the sequence number of the packet (to ensure correct reassembly), and the
packet size (to check if all packets have arrived intact). It may also contain a value
indicating the total number of packets for the transmission.
• Payload: Contains the actual data being sent in the packet, usually about 64 KiB.
• Trailer: Contains an identifier for the end of the packet and an error checking method.
Cyclic Redundancy Checks (CRCs) are used to check data packets. This involves the
sending computer adding up all the 1-bits in the payload and storing this as a hex value
in the trailer. The receiving computer then recalculates the number of 1-bits in the
payload and checks this value against the one sent in the trailer. If the two values match,
no transmission errors have occurred; otherwise, the packet needs to be re-sent.

This structure allows for efficient and reliable data transmission over long distances.
1
Page

Chapter 2: Data Transmission | www.mniniro.com


Packet Switching:
• Packet switching is a method of data transmission in which a message is broken up into
several packets. Each packet can then be sent independently from the start point to the
end point.
• When a photograph, for example, is sent from computer ‘A’ to computer ‘B’, it is split up
into several packets before it is sent. There are several possible routes for the packets
between computer ‘A’ (sender) and computer ‘B’ (receiver).
• Each stage in the route contains a router. A router receives a data packet and bases on
the information in the header, decides where to send it next.
• At the destination, the packets will need to be reassembled into their correct order using
the information sent in the header.
• Each router will determine which route the packet needs to take, to reach its
destination. The destination IP address is used in this part of the process.
• Routing selection depends on the number of packets waiting to be processed at each
node. The shortest possible path available is always selected. This may not always be
the shortest path that could be taken since certain parts of the route may be too busy or
not suitable.
• Unfortunately, packets can reach the destination in a different order to that in which
they were sent. This is due to the independent routing of each packet.

Indeed, packet switching is a fundamental concept in data communication and has


both advantages and disadvantages:

Advantages of Packet Switching:

• No need to tie up a single communication line: Multiple data packets can


share the same network resources, allowing for efficient use of bandwidth.
• Overcoming failed, busy, or faulty lines: If a particular route is unavailable or
congested, packets can be rerouted along a different path.
• Easy to expand: Packet-switched networks can easily accommodate more data
2

traffic by adding more devices without requiring significant infrastructure


Page

changes.

Chapter 2: Data Transmission | www.mniniro.com


• High data transmission rate: By breaking data into packets, large files can be
transmitted more quickly and efficiently than if they were sent as a single,
continuous stream of data.

Drawbacks of Packet Switching:

• Packets can be lost: If a packet is lost during transmission, it needs to be re-


sent, which can slow down the overall data transmission rate.
• More prone to errors with real-time streaming: Packet switching can cause
delays and out-of-order delivery, which can disrupt real-time data streams like
video or audio broadcasts.
• Delay at the destination: There can be a delay when the packets are being re-
ordered at the destination. This can also disrupt real-time data streams and
cause a lag in data transmission.

To overcome the issue of packets getting lost or endlessly bouncing around the
network, a method called hopping is used. Each packet is assigned a maximum hop
count when it is created. The hop count is reduced by one every time the packet passes
through a router. If the hop count reaches zero before the packet reaches its
destination, the packet is discarded. This prevents the network from being
overwhelmed by lost packets and helps maintain network performance. However, it
also means that some data may need to be re-transmitted, which can impact network
performance. It’s a balance between ensuring data integrity and maintaining network
performance.

Activity 2.1

1. i. Potential problems with sound and video quality in a video conference using
packet switching could include:
o Latency: There might be a delay in the transmission of data packets,
which could cause the video and audio to be out of sync.
o Packet loss: Some packets might get lost during transmission, leading to
missing video frames or gaps in the audio.
o Jitter: Packets might arrive at their destination out of order, causing the
video to freeze or the audio to stutter.

ii. These problems could be caused by various factors such as network


congestion, faulty hardware, poor internet connection, or a high CPU load on the
sender or receiver’s computer.
3
Page

Chapter 2: Data Transmission | www.mniniro.com


2. When downloading a large web page from a website, packet switching would
break the web page data into smaller, manageable packets. Each packet would
contain a portion of the web page data along with header information for routing
and reassembly. These packets would then be sent over the network
independently, possibly taking different routes to reach the destination. Once all
the packets arrive at the destination, they would be reassembled based on the
information in their headers to reconstruct the original web page data.
3. a. A Cyclic Redundancy Check (CRC) is an error-detecting code used to detect
accidental changes to raw data. Blocks of data entering these systems get a
short check value attached, based on the remainder of a polynomial division of
their contents. On retrieval, the calculation is repeated, and, in the event the
check values do not match, corrective action can be taken against data
corruption.

b. To verify that the received payload was error-free, the receiving computer
would perform the same CRC calculation on the received data and compare the
result with the CRC value included in the packet trailer. If the two CRC values
match, then the payload is assumed to be error-free. If they don’t match, then an
error has occurred during transmission, and the packet may need to be re-sent.

4. a. Packets can be lost during their transmission across a network due to various
reasons such as network congestion, faulty hardware, poor signal quality, or
errors in network routing.

b. To deal with lost packets and prevent them from slowing down the
transmission process, protocols like TCP use acknowledgments and timeouts. If
an acknowledgment for a packet is not received within a certain time frame, the
packet is assumed to be lost and is re-sent.

c. Packet switching might improve data security because each packet can be
encrypted individually. Additionally, since packets can take different routes to
reach the destination, it makes it harder for potential eavesdroppers to intercept
all packets and reconstruct the original data. Also, if a secure protocol like
HTTPS is used, even if someone intercepts the packets, they won’t be able to
understand the data without the encryption key.

2.1.2 Data transmission

• Data transmission can occur over short distances (like from a computer to a
printer) or over longer distances (like from one computer to another in a global
network). The direction of data transmission, the method of transmission, and
data synchronization are key factors to consider.
• Simplex data transmission occurs when data can be sent in one direction only,
such as from a sender to a receiver. An example is sending data from a computer
to a printer.
• Half-duplex data transmission occurs when data can be sent in both directions
4

but not at the same time. An example is a walkie-talkie, where a message can be
Page

Chapter 2: Data Transmission | www.mniniro.com


sent in one direction only at a time, but messages can be both received and
sent.
• Full-duplex data transmission occurs when data can be sent in both directions
at the same time. An example is a broadband internet connection.

Serial data transmission occurs when data is sent one bit at a time over a single wire
or channel. Bits are sent one after the other as a single stream. This works well over
long distances and ensures data arrives at its destination fully synchronized.

However, the data is transmitted at a slower rate than parallel data transmission. An
example is when connecting a computer to a printer via a USB connection.

Indeed, parallel data transmission is a method where several bits of data (usually one
byte) are sent simultaneously down several channels or wires. Each channel or wire
transmits one bit. This method can be simplex, half-duplex, or full-duplex.

The key points about parallel data transmission:

• It works well over short distances. For example, the internal circuits in a
computer use parallel data transmission since the distance travelled between
components is very short and high-speed transmission is essential.
• Over longer distances (for example, over 20 metres), data can become skewed,
meaning the data can arrive unsynchronised and bits can arrive out of order. The
longer the wire, the worse this can become.
• Despite the potential for data skewing over long distances, parallel data
transmission is a faster method of data transmission than serial because
multiple bits are transmitted at the same time.
5
Page

Chapter 2: Data Transmission | www.mniniro.com


Activity 2.2

1. i. Serial, half-duplex data transmission: In this mode, data is sent one bit at a
time over a single channel or wire. Data can be sent in both directions, but not at
the same time. An example is a walkie-talkie, where a message can be sent in
one direction only at a time, but messages can be both received and sent.

ii. Parallel, full-duplex data transmission: In this mode, data is sent several
bits at a time over several channels or wires simultaneously. Data can be sent in
both directions at the same time. An example is a broadband internet
connection.

iii. Serial, simplex data transmission: In this mode, data is sent one bit at a
time over a single channel or wire. Data can be sent in one direction only, such
as from a sender to a receiver. An example is sending data from a computer to a
printer.

2. The types of data transmission being described are:

i. Serial, simplex data transmission: Data is sent one bit at a time in one
direction only.

ii. Parallel, simplex data transmission: Data is being sent 8 bits at a time in one
direction only.

iii. Parallel, full-duplex data transmission: Data is being sent 16 bits at a time
in both directions simultaneously.

iv. Serial, full-duplex data transmission: Data is sent one bit at a time in both
directions simultaneously.
6
Page

Chapter 2: Data Transmission | www.mniniro.com


v. Parallel, simplex data transmission: Data is sent 16 bits at a time in one
direction only.

The Universal Serial Bus (USB) is a standard for connecting devices to a computer. It’s
a form of serial data transmission and is now the most common type of input/output
port found on computers. Here are some key points about USB:

• USB allows both half-duplex and full-duplex data transmission. Half-duplex


means data can be sent in both directions, but not at the same time. Full-duplex
means data can be sent in both directions at the same time.
• A typical USB cable consists of a four-wired shielded cable. Two wires (red and
black) are for power, and the other two wires (white and green) are for data
transmission.
• When a device is plugged into a computer using one of the USB ports, the
computer automatically detects that a device is present. This is due to a small
change in the voltage on the data signal wires in the USB cable.
• The device is automatically recognized, and the appropriate device driver
software is loaded up so that the computer and device can communicate
effectively.
• If a new device is detected, the computer will look for the device driver that
matches the device. If this is not available, the user is prompted to download the
appropriate driver software. Some systems do this automatically, and the user
will see a notice asking for permission to connect to the device website.

The USB-C connector is a significant advancement in USB technology. Here are the key points:

• It’s a 24-pin symmetrical connector, which means it can be inserted into a USB-C port in
either orientation, eliminating the frustration of “getting it right” that comes with
traditional USB connectors.
• It’s smaller and thinner than older USB connectors, making it more suitable for slim
devices like modern laptops, tablets, and smartphones.
• It offers 100-watt (20-volt) power connectivity, which means it can charge full-sized
devices, not just mobile devices. This makes it possible to have a single type of cable for
both data transfer and power supply.
7
Page

Chapter 2: Data Transmission | www.mniniro.com


• It can carry data at 10 gigabits per second (10 Gbps), which is fast enough to support 4K
video delivery. This makes it suitable for a wide range of high-speed data transfer
applications.
• It’s backward compatible with USB 2.0 and 3.0, provided a suitable adapter is used. This
means you can still use your old USB devices with a USB-C port.
• It’s expected to become the new industry standard, replacing the multitude of different
USB connectors currently in use.

2.2 Methods of error detection

2.2.1 The need to check for errors

• Data Transmission Risks: When data is transmitted, it may be corrupted, lost,


or even gained.
• Causes of Errors:
o Interference: All types of cable can suffer from electrical interference,
which can cause data to be corrupted or even lost.
o Problems during Packet Switching: This can lead to data loss or even
data gain.
o Skewing of Data: This occurs during parallel data transmission and can
cause data corruption if the bits arrive out of synchronization.
• Importance of Error Checking: Computers are unable to understand text if the
words are not recognized by its built-in dictionary. Therefore, error checking is an
important part of computer technology.
• Example of Corrupted Text: The paragraph “Can you raed tihs? I cnduo’t
bvleiee taht I culod aulaclty uesdtannrd waht I was rdnaieg…” is an example of
data corruption on a message. While humans can still understand the text, a
computer would be unable to make any sense of it.
• Methods of Error Checking: There are several ways data can be checked for
errors following transmission:
o Parity Checks
o Checksum
o Echo Check.

Parity checking is a method used to check if data has been altered or corrupted during
data transmission.

• This method is based on the number of 1-bits in a byte of data.


• The parity can be either EVEN (an even number of 1-bits in the byte) or ODD (an
odd number of 1-bits in the byte).
8
Page

Chapter 2: Data Transmission | www.mniniro.com


• One of the bits in the byte is reserved for a parity bit. This bit is set according to
whether the parity being used is even or odd.
• Before data is transferred, an agreement is made between sender and receiver
regarding which type of parity is being used. Hence, parity checks are used as a
type of transmission protocol.
• If a byte has been transmitted from ‘A’ to ‘B’, and if even parity is used, an error
would be flagged if the byte now had an odd number of 1-bits at the receiver’s
end.
• The error is detected by the recipient’s computer re-calculating the parity of the
byte sent. If even parity had been agreed between sender and receiver, then a
change in parity in the received byte indicates that a transmission error has
occurred.
• If two of the bits change value following data transmission, it may be impossible
to locate the error using parity checking.
• If more than one bit has been modified during data transmission, the byte could
have reached the destination with even parity, and no error would be flagged in
spite of the obvious errors in transmission.
• To ensure errors are never missed, other ways to complement parity when it
comes to error checking are necessary. One such method is called checksum.
• Even though an error has been flagged, it is impossible to know exactly which bit
is in error. One of the ways round this problem is to use parity blocks. In this
method, a block of data is sent and the number of 1-bits are totalled horizontally
and vertically. This method not only identifies that an error has occurred but also
indicates where the error is.
9
Page

Chapter 2: Data Transmission | www.mniniro.com


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.
• The checksum is calculated from the block of data using an agreed algorithm
before transmission.
• The checksum is then transmitted with the block of data.
• At the receiving end, the checksum is recalculated by the computer using the
block of data.
• The re-calculated checksum is then compared to the checksum sent with the
data block.
• If the two checksums are the same, then no transmission errors have occurred;
otherwise a request is made to re-send 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.
• If the two sets of data are different, it isn’t known whether the error occurred
when sending the data in the first place, or if the error occurred when sending
the data back for checking.
• However, if no errors occurred, then it is another way to check that the data was
transmitted correctly.
• If the two sets of data are different, then an error occurred at some stage during
the data transmission.

10
Page

Chapter 2: Data Transmission | www.mniniro.com


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 used to identify errors in data entry caused by mis-typing or mis-
scanning a barcode.
• They can usually detect the following types of error:
o An incorrect digit entered, for example 5327 entered instead of 5307.
o Transposition errors where two numbers have changed order, for
example 5037 instead of 5307.
o Omitted or extra digits, for example 537 instead of 5307 or 53107 instead
of 5307.
o Phonetic errors, for example 13 (thirteen), instead of 30 (thirty).

Methods to Generate a Check Digit

• There are a number of different methods used to generate a check digit. Two
common methods are:
o ISBN 13
o Modulo-11

Example 1: ISBN 13

• The check digit in ISBN 13 is the thirteenth digit in the number.


• The following algorithm generates the check digit from the 12 other digits:
1. Add all the odd numbered digits together.
2. Add all the even numbered digits together and multiply the result by 3.
3. Add the results from 1 and 2 together and divide by 10.
4. Take the remainder, if it is zero then use this value, otherwise subtract the
remainder from 10 to find the check digit.
• This method is used to generate the check digit and also to verify the check digit
(that is, a recalculation). 11
Page

Chapter 2: Data Transmission | www.mniniro.com


12
Page

Chapter 2: Data Transmission | www.mniniro.com


13
Page

Chapter 2: Data Transmission | www.mniniro.com


14
Page

Chapter 2: Data Transmission | www.mniniro.com


Activity 2.7:

1. Using the algorithm for ISBN-13 to calculate the check digit for: 978151045759

The algorithm for ISBN-13 is as follows:

1. Add all the odd numbered digits together.


2. Add all the even numbered digits together and multiply the result by 3.
3. Add the results from 1 and 2 together and divide by 10.
4. Take the remainder, if it is zero then use this value, otherwise subtract the
remainder from 10 to find the check digit.

Let’s apply this to the number 978151045759:

Odd positioned digits: 9 + 1 + 0 + 5 + 5 + 9 = 29

Even positioned digits: 7 + 8 + 1 + 4 + 7 = 27, multiplied by 3 = 81

Sum of the above: 29 + 81 = 110 Divide by 10 and find the remainder: 110 mod 10 = 0

So, the check digit for 978151045759 is 0.

2. Find the check digits for the following numbers using both modulo-11 and ISBN
13 methods:

i) For the number 213111000428:

• Modulo-11 check digit: This method is not typically used for numbers of this
length, so it’s not applicable here.
• ISBN-13 check digit: Applying the same method as above, we get the check digit
as 5.

ii) For the number 909812123544:

• Modulo-11 check digit: Again, this method is not typically used for numbers of
this length, so it’s not applicable here.
• ISBN-13 check digit: Applying the same method as above, we get the check digit
as 7.

Please note that the Modulo-11 method is typically used for shorter numbers (up to 10
digits), and it’s not applicable for the numbers provided in this case. The ISBN-13
method, however, can be used for numbers up to 13 digits long.
15
Page

Chapter 2: Data Transmission | www.mniniro.com


Automatic Repeat Requests (ARQs)

• ARQ is a method used to check data following data transmission. It is used to


verify that data has arrived at its destination unchanged.
• ARQ uses positive and negative acknowledgements. These are messages sent
to the receiver indicating that data has/has not been received correctly.
• ARQ also uses a timeout, which is the time interval allowed to elapse before an
acknowledgement is received.
• The receiving device receives an error detection code as part of the data
transmission. This is typically a Cyclic Redundancy Check.
• This error detection code 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 sends a negative
acknowledgement to the sending device and requests re-transmission of the
data.
• A time-out 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.
• The data is re-sent until a positive acknowledgement is received or until a pre-
determined number of re-transmissions has taken place.
• ARQ is often used by mobile phone networks to guarantee data integrity.

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 an unauthorized party, often referred to as
an eavesdropper.
• Encryption is a method that helps to minimize this risk. It alters data into a form
that is unreadable by anybody for whom the data is not intended.
• While encryption cannot prevent the data from being intercepted, it makes the
intercepted data nonsensical to the eavesdropper.
• Encryption is particularly important when the data being transmitted is sensitive
or confidential, such as credit card/bank details, medical history, or legal
documents.
• The original data being sent is known as plaintext. Once it has gone through an
encryption algorithm, it produces ciphertext. This transformation from plaintext
to ciphertext is what makes the data unreadable to anyone without the correct
16

decryption key.
Page

Chapter 2: Data Transmission | www.mniniro.com


Symmetric Encryption

• Symmetric encryption uses a single key for both encryption and decryption of
the message.
• In a simple system, a 10-digit denary encryption key is used. Each digit in the key
represents a shift across the alphabet for each corresponding letter in the
message.
• For example, with the key 4 2 9 1 3 6 2 8 5 6, each letter in the word is shifted +4,
+2, +9, +1, and so on, places in the alphabet.
• The original message (plaintext) is transformed into an encoded message
(ciphertext) using this key.
• To decrypt the message, the same key is applied but in reverse, shifting each
letter -4, -2, -9, -1, and so on.
• However, modern computers could crack this encryption key in a matter of
seconds. To combat this, we now use 256-bit binary encryption keys that give

2^{256}

(approximately, 1.2 \times 10^{77}) possible combinations.

• The main challenge with symmetric encryption is keeping the encryption key a
secret. It needs to be shared between the sender and recipient, and if it’s
intercepted during this process, the security of the data is compromised.
• Therefore, the issue of security is always the main drawback of symmetric
encryption, since a single encryption key is required for both sender and
recipient.
17
Page

Chapter 2: Data Transmission | www.mniniro.com


Asymmetric Encryption

• Asymmetric encryption was developed to overcome the security problems


associated with symmetric encryption.
• It makes use of two keys: a public key (made available to everybody) and a
private key (only known to the computer user).
• Both types of keys are needed to encrypt and decrypt messages.
• The matching pairs of keys are mathematically linked but can’t be derived from
each other.
• For example, suppose Tom and Jane work for the same company and Tom
wishes to send a confidential document to Jane:
1. Jane uses an algorithm to generate a matching pair of keys (private and
public) that they must keep stored on their computers.
2. Jane now sends her public key to Tom.
3. Tom now uses Jane’s public key to encrypt the document he wishes to
send to her. He then sends his encrypted document (ciphertext) back to
Jane.
4. Jane uses her matching private key to unlock Tom’s document and
decrypt it. This works because the public key used to encrypt the
document and the private key used to decrypt it are a matching pair
generated on Jane’s computer.
• Jane can also exchange her public key with any number of people working in the
company, so she is able to receive encrypted messages (which have been
encrypted using her public key) and she can then decrypt them using her
matching private key.
• However, if a two-way communication is required between all workers, then they
all need to generate their own matching public and private keys. Once this is
done, all users then need to swap public keys so that they can send encrypted
documents/files/messages between each other. Each worker will then use their
own private key to decrypt information being sent to them.
• This method ensures that even if the data is intercepted, it cannot be decrypted
without the correct private key. This greatly enhances the security of data
transmission.
18
Page

Chapter 2: Data Transmission | www.mniniro.com

You might also like