Unit2 Data Transmission
Unit2 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.
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).
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)
(sequentially), over a single wire or channel (bits are sent one after the
parallel data transmission. Since only one wire is used, there is no problem
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
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
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
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
has quickly become the standard method for transferring data between a
computer and a number of devices. USB allows both half-duplex and full-
• 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:
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 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
PARITY CHECKING is one method used to check whether data has been
another.
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-
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)
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
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
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
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
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
Which would also correct column 5 giving an even vertical parity (now has
four 1-bits).
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
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
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)
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).
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.