0% found this document useful (0 votes)
5 views

Unit2 Data Transmission

The document discusses data transmission methods, focusing on data packets, packet switching, and the differences between serial and parallel transmission. It outlines the advantages and drawbacks of packet switching, including error detection methods such as parity checking and cyclic redundancy checks. Additionally, it covers synchronization methods, USB data transmission, and error-checking techniques to ensure data integrity during transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Unit2 Data Transmission

The document discusses data transmission methods, focusing on data packets, packet switching, and the differences between serial and parallel transmission. It outlines the advantages and drawbacks of packet switching, including error detection methods such as parity checking and cyclic redundancy checks. Additionally, it covers synchronization methods, USB data transmission, and error-checking techniques to ensure data integrity during transmission.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Data transmission

Data packet is a unit of data. Data sent over long distances is usually broken up
into data packets (also called datagrams). The idea of splitting up data in
this way means each packet can be sent along a different route to its
destination. A data packet can be as small as 64Kib.

The advantage is that data can be re-routed if a particular transmission route


was out of action or very busy. The drawback is the need to reassemble the
data when it reaches its destination.

Packet structure
A packet is split up into:
1. a packet header
2. the payload
3. a trailer.

Note:

 Packet size is used to ensure the receiving station can check if all of
the packets have arrived intact
 Cyclic redundancy checks (CRCs) is an error checking method used
to check data packets.
o the sending computer adding up all the 1-bits in the payload
and storing this as a hex value in the trailer before it is sent
o once the packet arrives, the receiving computer recalculates the
number of 1-bits in the payload
o the computer then checks this value against the one sent in the
trailer
o if the two values match, then no transmission errors have
occurred; otherwise the packet needs to be re-sent.

Packet switching
Packet switching is a method of data transmission in which a message is
broken up into a number of packets. Each packet can then be sent
independently. At the destination, the packets will need to be reassembled
into their correct order (using the information sent in the header). At each
stage in the transmission, there is a node 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).

Routing selection depends on the number of packets waiting to be processed


at each node. The shortest possible path available is always selected. Since
certain parts of the route may be too busy or not suitable, the shortest path
may not always be taken.

Benefits of packet switching


1. there is no need to tie up a single communication line
2. it is possible to overcome failed, busy or faulty lines by simply re-
routing packets
3. it is relatively easy to expand package usage
4. a high data transmission rate is possible
Drawbacks of packet switching
1. packets can be lost and need to be re-sent
2. the method is more prone to errors with real-time streaming (for
example, a live porting event being transmitted over the internet)
3. there is a delay at the destination whilst the packets are being re-
ordered
4. it is possible for packets to get lost because they keep ‘bouncing’
around from router to router and never actually reach their destination

Network can grind to a halt as the number of lost packets mount up,
clogging up the system. To overcome this, a method called hopping is used.
A hop number is added to the header of each packet, and this number is
reduced by 1 every time it leaves a router. Each packet has a maximum hop
number to start with. As packet move from a router to another, the hop
number reduces. Once it reaches zero, and the packet hasn’t reached its
destination, the packet is deleted when it reaches the next router. The
missing packets will then be flagged by the receiving computer and a
request to re-send these packets will be made.

Data transmission
Data are transmitted as a stream of bits which can be either over a short or a long
distance, wireless or wired (cable). The rate at which the transfer of data occurs is
called bit rate, it is the number of bits that can be transmitted in a given period of
time. Bit rate are measured in bits per seconds (bps) or megabits per seconds
(mbps)

Factors needed to be considered when transmitting data:


 Method of transmission (how many bits can be sent at the same time)
 Direction of the data transmission (i.e. in one direction only or in both
directions)
 Method of synchronization (that is, how to make sure the received data is
in the correct order)
These factors are usually considered by a communication protocol.

Methods of transferring data


1. SERIAL DATA TRANSMISSION is when data is sent, one bit at a time

(sequentially), over a single wire or channel (bits are sent one after the

other in a single stream). This method of data transmission works well

over long distances. However, data is transmitted at a slower rate than

parallel data transmission. Since only one wire is used, there is no problem

of data arriving at its destination out of synchronization. Serial data


transmission can be simplex, half-duplex or full-duplex.

An example of its use is sending data from a computer to a modem for


transmission over a telephone line and the use of Universal Serial Bus (USB).
2. PARALLEL DATA TRANSMISSION is when several bits of data (usually 1

byte) are sent down several wires or channels at the same time; one wire

or channel is used to transmit each bit. For example, with eight wires, 1

byte (8bits) could be transmitted all at once, parallel transmission

transfer data simultaneously quicker than serial transmission because

they have more cables. It is more expensive and it therefore works well

over short distance. Over longer distances (e.g. over 20metres), data

can become skewed (that is, the data can arrive unsynchronised) and

bits can arrive out of order. The longer the wire, the worse this can

become.

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.
Ribbon connector

(Note: bits can be transmitted as simplex, half-duplex or full-duplex in


both serial and parallel transmission.)

Comparison of serial and parallel data transmission methods


Serial Parallel
less risk of external interference than
with parallel (due to faster rate of data transmission than serial
fewer wires)
more reliable transmission over longer
works well over shorter distances
distances
since several channels/wires used to
transmitted bits won’t have the risk of transmit data, the bits
being skewed. Therefore transmission can arrive out of synchronisation (skewed).
is safer at the receivers end. Therefore transmission is less safe at the
receivers end.
used if the amount of data being sent
is relatively small since preferred method when speed is important
transmission rate is slower
used to send data over long distances
if data is time-sensitive, parallel is the most
(for example,
appropriate
telephone lines)
less expensive than parallel due to parallel ports require more hardware,
fewer hardware making them more
requirements expensive to implement than serial ports
easier to program input/output operations
when parallel used
Data Direction
1. Simplex Transmission: In simplex transmissions, data is sent in one
direction only (i.e. from sender to receiver).
Example: data being sent from a computer to a printer,
microphone, TV and a radio signal.

2. HALF-DUPLEX DATA TRANSMISSION is in both directions but


not at the same time (i.e. data can be sent from ‘A’ to
‘B’ or from ‘B’ to ‘A’ along the same line, but not at the
same time). Example: a phone conversation between
two people where only one person speaks at a time,
Walkie-talkie, police car radio phones

3. Full duplex transmission


Full duplex transmissions is in both directions simultaneously
(i.e. data
can be sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’ along the
same line, both at the same time). Example: broadband
connection on a phone or internet.

Activity 2.1
Describe what is meant by:
a serial, half-duplex data transmission
b parallel, full-duplex data transmission
c serial, simplex data transmission.
Method of Synchronization
ASYNCHRONOUS DATA TRANSMISSION refers to data being transmitted in an

agreed bit pattern. Data bits (1s and 0s) are grouped together and sent with
CONTROL BITS

This means that the receiver of the data knows when the data starts and when

it ends. This prevents data becoming mixed up; without these control bits, it

would be impossible to separate groups of data as they arrived.

SYNCHRONOUS DATA TRANSMISSION is a continuous stream of data. The data is

accompanied by timing signals generated by an internal clock. This ensures

that the sender and receiver are synchronized with each other.

The receiver counts how many bits (1s and 0s) were sent and then

reassembles them into bytes of data. The timing must be very accurate here

since there are no control bits sent in this type of data transmission. It is a
faster data transfer method than asynchronous and is therefore used where

speed is an important issue (for example, in network communications).

Universal Serial Bus (USB)


The UNIVERSAL SERIAL BUS (USB) is a serial data transmission method. It

has quickly become the standard method for transferring data between a

computer and a number of devices. USB allows both half-duplex and full-

duplex data transmission. Essentially, the USB cable consists of:

• a four-wire shielded cable

• two of the wires are used for power (red and black)

• two of the wires are used in the data transmission (white and green).

When a device is plugged into a computer using one of the USB ports:

1. the computer automatically detects that a device is present

2. the device is automatically recognised, and the appropriate device

driver software is loaded up so that the computer and device can

communicate effectively

Benefits Drawbacks
Devices plugged into the computer are automatically –
detected and device drivers are automatically
uploaded
The connectors can only fit one way. This prevents The maximum cable length is presently
incorrect connections being made about 5 metres. USB hubs are needed to
extend the cable length
This has become the industry standard; this means –
that considerable support is available to users
Several different data transmission rates are latest version 3 (V3) and version
supported (from 1.5 Mbps to 5 Gbps) 4 (V4) USB-C systems have a data
transfer
rate which is slow compared to,
(Note: USB V2 has a maximum data
transfer rate of 480 Mbps.)

USB is backward compatible (that is, older versions very early USB standards (V1) may
are still supported) not always be supported by the latest
computers
it is relatively easy to add more USB ports by using
USB hubs.
USB protocol notifies the transmitter to re- transmit
data if any errors are
detected; this leads to error-free data transmission
no need for external power source since cable
supplies +5 V power

USB-C, is now becoming more common in laptops and tablets/phones. It is


meant to fit into a USB-C port either way round. It is much smaller and
thinner than older USB connectors, offers 100 watt (20 volt) power
connectivity, it can carry data at 10 gigabits per second (10 Gbps).

USB-C is backward compatible (to USB 2.0 and 3.0) provided a suitable
adaptor is
used, and is expected to become the new industry standard (universal)
format.
Methods of error detection
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:
1. interference
2. problems during packet switching
3. skewing of data (this occurs during parallel data transmission if the bits
arrive out of synchronization)

Error-Checking Methods

The methods of checking and correcting errors are listed below:


1. Parity checking
2. Checksum
3. Echo Checking
4. Automatic repeat request
Parity Checking

PARITY CHECKING is one method used to check whether data has been

changed or corrupted following transmission from one device or medium to

another.

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

of data, for example, is allocated a PARITY BIT. This is allocated before

transmission takes place. Systems that use EVEN PARITY have an even

number of 1-bits; systems that use ODD PARITY have an odd number of 1-

bits. One of the bits in the byte (usually the most significant bit or left-

most bit) is reserved for a parity bit.

Consider the following byte:

If this byte is using even parity, then the parity bit needs to be 0 since there is

already an even number of 1-bits (in this case, 4). If odd parity is being used,

then the parity bit needs to be 1 to make the number of 1-bits odd.
Therefore, the byte just before transmission would be: either

(even parity)

or (odd parity)

Before data is transferred, an agreement is made between sender and receiver

regarding which of the two types of parity are used. If a byte has been

transmitted from ‘A’ to ‘B’, and 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.

Activity

Find the parity bits for each of the following bytes:

a. 1 1 0 1 1 0 1 even parity used

b. 0 0 0 1 1 1 1 even parity used


c. 0 1 1 1 0 0 0 even parity used

d. 1 1 1 0 1 0 0 odd parity used

e. 1 0 1 1 0 1 1 odd parity used

Example 1

The error is detected by the computer recalculating the parity of the byte sent.

If even parity has been agreed between sender and receiver, then a change of

parity in the received byte indicates that a transmission error has occurred.
Activity

Which of the following bytes have an error following data transmission?

a11101101 even parity used

b01001111 even parity used

c00111000 even parity used

d11110100 odd parity used

e11011011 odd parity used

In each case where an error occurs, can you work out which bit is

incorrect?

Naturally, any of the bits in Example 1 could have been changed leading to a

transmission error. Therefore, even though an error has been flagged, it is

impossible to know exactly which bit is in error. (Your last answer in above

Activity should have been ‘NO’ since there isn’t enough information to

determine which bit has been changed.) One of the ways around this problem

is to use PARITY BLOCKS.

USING PARITY BLOCK FOR ERROR DETECTION


In this method, a block of data is sent and the number of 1-bits are totaled
horizontally and vertically (in other words, a parity check is done in both
horizontal and vertical directions). This method not only identifies that an
error has occurred but also indicates where the error is.

Example 2
In this example, nine bytes of data have been transmitted. Agreement has
been made that even parity will be used. Another byte, known as the PARITY

BYTE, has also been sent.


The following table shows how the data arrived at the receiving end:

A careful study of the table above shows the following:


1. Byte 8 (row 8) has incorrect parity (there are three 1-bits)
2. Bit 5 (column 5) also has incorrect parity (there are five 1-bits).
First, the table shows that an error has occurred in the data transmission.
Secondly, at the intersection of row 8 and column 5, the position of the
incorrect bit value (which caused the error) can be found. This means that
byte 8 should have the value:

Which would also correct column 5 giving an even vertical parity (now has
four 1-bits).

This byte could therefore be corrected automatically, or an error message


could be relayed back to the sender asking them to retransmit the block of
data.

If two of the bits change value following data transmission, it may be


impossible to locate the error using the above method. For example, using
Example 1 again:

This byte could reach the destination as:

or:
or:

All three are clearly incorrect; but they have retained even parity so this
wouldn’t have triggered an error message at the receiving end. Clearly we
need to look at other methods to complement parity when it comes to error
checking transmitted data.

Activity
The following block of data was received after transmission from a
remote computer; odd parity being used by both sender and receiver.
One of the bits has been changed during the transmission stage.
Locate where this error is and suggest a corrected byte value.
Table 2.3

CHECKSUM
CHECKSUM is another way to check if data has been changed or corrupted
following data transmission. Data is sent in blocks and an additional value,
the checksum, is also sent at the end of the block of data.

Example 3
Checksum is found using the simple algorithm below;
Suppose the value of X is 1185, then tracing through the algorithm,
we get: X = 1185
1 1185/256 = 4.629
2 Rounding down to nearest whole number gives Y = 4
3 Multiplying by 256 gives Z = Y * 256 = 1024
4 The difference (X – Z) gives the checksum: (1185 – 1024) = 161

5 This gives the checksum = 161

When a block of data is about to be transmitted, the checksum for the bytes is
first of all calculated. This value is then transmitted with the block of data. At
the receiving end, the checksum is recalculated from the block of data
received. This calculated value is then compared to the checksum
transmitted. If they are the same value, then the data was transmitted without
any errors; if the values are different, then a request is sent for the data to be
retransmitted.

Activity
Calculate the checksum for blocks of data with the following byte sums:
a 148
b 905
c 1450
d 095

Automatic Repeat ReQuest (ARQ)


AUTOMATIC REPEAT REQUEST (ARQ) uses positive and negative

ACKNOWLEDGEMENTs (a message sent by the receiver indicating that data has


been received correctly) and TIMEOUT (this is the time allowed to elapse
before an acknowledgement is received).
The receiving device receives an error detection code as part of the data
transmission (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. If an error is
detected, the receiving device sends a negative acknowledgement to the
sending device and requests re-transmission of data.
A time-out is used by the sending device by waiting a pre-determined
amount of time and 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.

ARQ is often used by mobile phone networks to guarantee data integrity

Echo Check
With ECHO CHECK, when data is sent to another device, this data is sent back
again to the sender. The sender compares the two sets of data to check if any
errors occurred during the transmission process.
As you will have no doubt worked out, this isn’t very reliable. 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.

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:
1. an incorrect digit entered
2. transposition errors where two numbers have changed order,
3. omitted or extra digits,
4. phonetic errors, e.g. 13 (thirteen), instead of 30 (thirty)

common methods used to generate a check digit


1. ISBN 13 - The check digit in ISBN 13 is the thirteenth digit in the number.
2. Modulo-11 - The modulo-11 method can have varying lengths of number which
makes it suitable
for many applications, such as product codes or VINs.

Symmetric and Asymmetric Encryption

The purpose of encryption


Using encryption helps to minimise the risk of data interception from a public network.
Encryption is used primarily to protect data from been hacked.

Encryption alters data into a form that is unreadable by anybody for whom the data is not
intended. It cannot prevent the data being intercepted or hacked, but it stops it from
making any sense to the eavesdropper. This is important if the data is sensitive or
confidential (for example, credit card/bank details, medical history or legal documents).

Plaintext and ciphertext


The original data being sent is known as plaintext. It described as the text or normal
representation of data before it goes through an encryption algorithm. Ciphertext is the
output from an encryption algorithm.
Symmetric encryption
Symmetric encryption uses an encryption key; the same key is used to encrypt and decrypt
the encoded message.

However, modern computers could 'crack' this encryption key in a matter of seconds. To
try to combat this, we now use 256-bit binary encryption keys that give 2256 possible
combinations.

T
he issue of security is always the main drawback of symmetrical encryption,
since a single encryption key is required for both sender and recipient and sender
have to supply the key to the recipient (eg. it needs to be sent in an email or
a text message)
One of the ways of mitigating the risk of symmetric keys falling into the wrong hands
(known as the key distribution problem) is to use a system based on modulo-11, where
both sender and receiver can calculate the encryption key without it actually being
exchanged in any way.

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 keys are needed to encrypt and decrypt messages.

You might also like