Chapter 2 Data Transmission
Chapter 2 Data Transmission
CS BY IFFAT ANSARI
Data Transmission
Data Transmission
Data Transmission is a process of the movement of data from one device to another
device whether they are in same building or thousand miles away from each other.
Method of Data Transmission
Data Packets
Data Packets is the method of data transmission where the data is spilt into data packets
which are small up to 64 KiB. Data packets are also known as “packets” or “datagrams”.
The advantage of this particular method is that they are easier to control as compared to
long stream of continuous data. However, when data is spilt into packets it could be send
using different routes to the destination.
Packet Structure
HEADER PAYLOAD TRAILER
Page 1 of 14
Packet Switching
CS BY IFFAT ANSARI
It is the method of data transmission in which the data packets are sent independently on
different routes. Each packet has its own route. The route depends on number of packets
waiting for processing at node (point where the receiving and sending data packets meet).
Data is assembled at the receiving side because the packets are sent independently and
they reach destination in different order. They are reassembled according to the
information provided by headers.
Advantages of Packet Disadvantages of Packet Switching
Switching
There is no need to tie up single Packets can be lost and need to be
communication line re-sent
It is possible to overcome failed, The method is prone errors with real-
busy or faulty lines by simply re- time streaming
routing packets
It is relatively easy to expand There is a delay at the destination
package usage whilst the packets are being re-
ordered.
A high data transmission rate is
possible
Page 2 of 14
Transmission Modes
CS BY IFFAT ANSARI
1. Simplex Mode
2. Half-Duplex Mode
3. Full Duplex Mode
Serial Parallel
Page 3 of 14
Less risk of external interference than Faster rate of data transmission than
CS BY IFFAT ANSARI
with parallel (due to fewer wires) serial.
More reliable transmission over longer Works well over shorter distances (for
distances example, used in internal pathways on
computer circuit boards)
Transmitted bits won’t have the risk of Since several wires are used for data
being skewed (that is out of transmission, bits can arrive out of
synchronization) synchronization.
Used if the amount of data being sent is Preferred methods when speed is important
relatively small since transmission rate
is slower than parallel (for example,
USB uses this method of data
transmission)
Used to send data over long distances If data is time-sensitive, parallel is the most
(for example telephone lines) appropriate transmission method
Less expensive due to fewer hardware Parallel ports require more hardware,
requirements. making them more expensive to implement
than serial ports
Easier to program input/output operations
when parallel used
Page 4 of 14
connectivity, which means fill-sized devices can now be charged and it can carry data at
CS BY IFFAT ANSARI
10gigabits per second.
Benefits Drawbacks
Devices plugged into computer are automatically Standard USB only supports a
detected and device drivers are automatically maximum cable length of 5 m;
loaded up beyond that, USB hubs are
needed to extend the cable
Connections can only fit one way preventing
length
incorrect connections being made
It has become an industry standard, which means
considerable support is available
Can support different data transmission rates (from Even though USB is backward
1.5 Mbps to 5 Mbps) compatible, very early USB
standards (V1) may not always
No need for external power source since cable
be supported by the latest
supplies +5V power
computers
USB protocol notifies the transmitter to re-transmit
data if any errors are detected; this leads to error-
free data transmission
It is relatively easy to add more USB ports, if Even the latest version 3 (V3)
necessary, by using USB hubs and version 4 (V4) USB-C
systems have a data transfer
USB is backward compatible (that is, older versions
rate which is slow compared to,
are still supported)
for example, Ethernet
connections (Note: USB V2 has
a maximum data transfer rate of
480 Mbps.)
Error Detection
When data is entered into a computer, or when data is sent over transmission lines or
cables within a computer, inadvertent errors can occur. Minute particles of dirt or grease
can corrupt data on a disk, for example. Static on a telephone line can introduced errors
into transmitted data. It is very important to be sure that data has not been corrupted.
Error detection checks for errors that occur in the transmission or storage of data. Error
correction determines that an error has occurred and tries to fix the errors.
Page 5 of 14
Types of Errors
CS BY IFFAT ANSARI
• Interference (all types of cables can suffer from electrical interference, which can
cause data to be corrupted or even lost)
• Problems during packet switching (this can lead to data loss – or it is even possible
to gain data!)
• Skewing of data (this occurs during parallel data transmission and can cause data
corruption if the bits arrive out of synchronization)
Methods of Error Detection
Parity Check
An extra bit (parity bit) is added to a string of binary code to ensure the number of 1-
bits are either even or odd, depending upon the parity check system used.
Methods
1. The sending and receiving computers agree the protocol to be used (even or odd)
2. The sending computer adds the correct parity bit to the binary data (either an extra
1 or 0)
3. The sending computer sends the binary data, including the parity bit
4. The receiving computer checks to make sure the overall parity of the data received
is as agreed (an even or odd number of 1 bits)
5. If the parity of the data is incorrect, the receiving computer will request that the
data is transmitted again
Example
As an example, if the original data is 1010001, there are three 1s. When even parity
checking is used, a parity bit with value 1 is added to the data’s left side to make the
number of 1s is even; transmitted data becomes 11010001. However, if odd parity
checking is used, then parity bit value is zero; 01010001.
Parity Block
This method of error checking is similar to a traditional parity check except the data is
arranged in a virtual table with parity bits added to each row and column. A single
corrupted bit can be spotted at the intersection of a corrupted row and column. Multiple
corrupted bits would also flaw this system.
If two bits are transposed (changed places) then computer will not be able to detect error
as the parity will still be valid. If two or more bits get changed then also system will not be
able to detect error.
Page 6 of 14
Parity Block (Example)
CS BY IFFAT ANSARI
Checksum
Checksum is another method of error detection method. A block of data is sent alongside
a calculated checksum value. The receiving computer also calculates what it believes
should be the checksum. The checksum values are then compared to see if an error has
occurred during transmission.
Method
1. The sending computer uses the block of data to be sent, and a predefined
mathematical algorithm, to calculate a checksum value
2. The sending computer sends the data, plus the checksum value
3. The receiving computer uses the data it receives to also calculate what it believes
should be the checksum, using the same mathematical algorithm
4. The two checksum values are compared by the receiving computer
5. Due to the nature of the algorithm, it is highly unlikely that corruption has occurred
if the checksum values match
6. If the checksum values don’t match, the receiving computer requests that the data
is transmitted again
Echo Check
It is another form of error detection. The receiving computer sends a copy of the data
immediately back to the sending computer for comparison.
Page 7 of 14
Method
CS BY IFFAT ANSARI
1. Data is sent to receiver
2. Once the data is received by receiver it sends back to sender
3. Sender compares the original data and received data both simultaneously
4. If there is no error, then the data is sent without an error
5. If the two sets of data are different, then an error occurred at some stage during
data transmission.
Its major drawback is, if the two sets of data are different then there will be no way of
knowing whether the error occurred when data was originally sent or when it was sent
back from receiver. Moreover, echo check requires a lot of extra data to be transmitted.
Check Digits
A check digit is the final digit in a code of numbers. It is calculated from all the other digits
in the code. The purpose is to spot human errors on data entry. Check digits are often
found in barcodes, product codes or ISBN book numbers. There are many different
mathematical algorithms that can be used to calculate a check digit. Different industries
will have their own preferred method.
It would identify:
• incorrect digits entered
• transposition errors
• omitted or extra digits
• phonetic errors in speech
Page 8 of 14
Method 2 (Modulo-11)
CS BY IFFAT ANSARI
1. each digit in the number is given weighing 8,7, 6, 5,4,3 or 2 starting from the left
(weighing start from 8 since the number will become eight-digit when the check
digit is added)
2. the digit multiplied by its weighting and then each value is added to make a total
3. the total is divided by 11
4. the remainder is then subtracted from 11 to find the check digit (note if the
remainder is 0 then the check digit ‘X’ is used)
Recalculation of check digit
1. each digit in the number is given a weighting 8,7, 6, 5, 4, 3, 2, 1 starting from the
left
2. the digit is multiplied by its weighing and then each value is added to make a total
3. the total is divided by 11
4. the number is correct if the remainder is zero
Page 9 of 14
cryptographic key: a set of mathematical values that both the sender and the recipient of
CS BY IFFAT ANSARI
an encrypted message agree on. Encryption keys consist of a combination of letters and
numbers. The longer the key, the harder it is to figure out, e.g., a 256-bit key is more
secure than a 128-bit key.
Plain Text: the original text/message before it is put through an encryption algorithm.
Cipher Text: encrypted data that is result of putting a plaintext message through an
encryption algorithm.
Why is encryption necessary?
• Privacy: Encryption ensures that no one can read communications or data except
the intended recipient or the rightful data owner. This prevents attackers, ad
networks, internet service providers, and in some cases governments from
intercepting and reading sensitive data.
• Security: Encryption helps prevent data breaches, whether the data is in transit or
at rest. If a corporate device is lost or stolen and its hard drive is properly
encrypted, the data on that device will still be secure. Similarly, encrypted
communications enable the communicating parties to exchange sensitive data
without leaking the data.
• Data integrity: Encryption also helps prevent malicious behavior such as on-path
attacks. When data is transmitted across the internet, encryption (along with other
integrity protections) ensures that what the recipient receives has not been
tampered with on the way.
Types of Encryptions
Symmetric Encryption
Symmetric encryption is a type of encryption that uses the same key to encrypt and
decrypt data. Both the sender and the recipient have identical copies of the key, which
they keep secret and don’t share with anyone. The problem with symmetric encryption is
that the key has to be known and shared by both sender and receiver prior to
transmission, meaning that it could potentially be intercepted and become insecure. A
better and newer method of encryption would be asymmetric encryption.
Asymmetric Encryption
Asymmetric encryption uses two keys — a public key (that anyone can access) to encrypt
information and a private key to decrypt information. When a message is ciphered ready
for transmission by a sender, the receiver will generate a pair of keys: a public key and a
private key. The public key is shared with any device that might wish to send a message
to the receiver. The sender will then use the receiver’s public key to encrypt the message
ready for sending. However, the public key cannot be used to decipher the message.
Page 10 of 14
When the receiving device obtains the message, it then has to use the private key to
CS BY IFFAT ANSARI
decipher the message and since this is never shared, it is a more secure process
compared to asymmetric encryption.
• Symmetric encryption uses a single key that needs to be shared among the people
who need to receive the message while asymmetric encryption uses a pair of
public key and a private key to encrypt and decrypt messages when
communicating.
• Symmetric encryption is an old technique while asymmetric encryption is relatively
new.
• Asymmetric encryption was introduced to complement the inherent problem of the
need to share the key in symmetric encryption model, eliminating the need to share
the key by using a pair of public-private keys.
• Asymmetric encryption takes relatively more time than the symmetric encryption
Page 11 of 14
Key terms
CS BY IFFAT ANSARI
Data Packet: a small part of a message/data that is transmitted over a network; after
transmission all the data packets are reassembled to form the original message/data.
Packet Header: the part of the data packet that contains the IP addresses of the sender
and receiver, and includes the packet number which allows reassembly of the data
packets.
Packet trailer: the part of a data packet that indicates the end of the data packet and
cyclic redundancy check error.
Cyclic Redundancy Check (CRC): an error checking method in which all the 1-bits in
the data packet payload are added and the total is stored in the packet trailer; the same
calculation is repeated at the receiving station.
Payload: the actual data being carried in a data packet
Node: stages in network that can receive and transmit data packet; routers are nodes in
communication networks.
Packet switching: a method of transmission in which a message is broken into many
data packets which can then be sent along pathways independently of each other.
Router: a device that enables data packets to be moved between different networks, for
example to join a LAN and WAN
Real time streaming: the transmission of data over a network for live events where the
data is sent as soon as it is received or generated.
Hopping/hop number: a number in a data packet header used to stop data packets that
never reach their destination from ‘clogging up’ the data paths/routes.
Simplex: the data that can be sent on one direction only.
Half-duplex: data that can be sent in both directions but not at the same time.
Full-duplex: data can be sent in both directions at the same time (simultaneously).
Serial Data Transmission: sending data down one channel/wire one bit at a time.
Parallel Data Transmission: sending data down several channel/wires several bits at a
time (usually 1 byte)
Skewed (data): data arrives at the destination with the bits no longer synchronized.
Universal Serial Bus (USB): a type of serial data transmission which has become the
industry standard for connecting computers to devices via a USB port.
Parity Check: a method used to check if data has been transferred correctly; it makes
use of even parity (an even number 1-bits) or odd parity (an odd number 1-bits).
Page 12 of 14
Parity bit: a bit (either 0 or 1) added to a byte of data in the most significant bit position;
CS BY IFFAT ANSARI
this ensures that the byte follows the correct even parity or odd parity protocol.
Parity Block: a horizontal and vertical parity check on a block of data being transmitted.
Parity Byte: an extra byte data sent at the end parity block; it is composed of the parity
bits generated from a vertical parity check of the data block.
Checksum: a verification method used to check if data transferred has been altered or
corrupted; calculated from the block of data being sent; the checksum value is sent after
each data block.
Automatic Repeat Request (ARQ): a method of checking transmitted data for errors; it
makes use of acknowledgement and timeout to automatically request re-sending of data
if time interval before positive acknowledgement is too long.
Acknowledgement: a message sent to the receiver indicating that data has been
received correctly (used in the ARQ error detection method).
Timeout: the time interval allowed to elapse before an acknowledgement is received (in
the ARQ error detection method).
Echo Check: a method used to check if data has been transferred correctly; data is sent
to a receiver and then immediately sent back to the sender; the sender; the sender then
checks if the received data matches the sent data.
Check Digit: an additional digit appended to a number to check if the entered number is
error-free; check digit is a data entry check and not a transmission check.
Eavesdropper: another name for a hacker who intercepts data being transmitted on a
wire or wireless network.
Encryption: the process of making data meaningless using encryption keys; without the
correct decryption key the data cannot be decoded (unscrambled).
Plain Text: the original text/message before it is put through an encryption algorithm.
Cipher Text: encrypted data that is result of putting a plaintext message through an
encryption algorithm.
Encryption Algorithm: a complex piece of software that takes plaintext and generates
an encrypted string known as known as cipher text.
Symmetric Encryption: a type of encryption in which the same encryption key is used
both to encrypt and decrypt a message.
Page 13 of 14
Asymmetric Encryption: a type of encryption that uses public keys and private keys to
CS BY IFFAT ANSARI
ensure data is secure.
Private Key: a type of encryption key which is known only to single computer/user.
Quantum Computer: a computer that can perform very fast calculation; it can perform
calculations that are based on probability rather than simple 0 or 1 values; this gives a
quantum computer the potential to process considerably more data than existing
computers.
Page 14 of 14