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

Data Transmission

The document explains the structure of data packets used in data transmission, which includes a packet header, payload, and trailer. It discusses methods of data transmission such as serial, parallel, simplex, half-duplex, and full-duplex, along with their advantages and disadvantages. Additionally, it covers error detection methods like parity check, checksum, and echo check 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 PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views63 pages

Data Transmission

The document explains the structure of data packets used in data transmission, which includes a packet header, payload, and trailer. It discusses methods of data transmission such as serial, parallel, simplex, half-duplex, and full-duplex, along with their advantages and disadvantages. Additionally, it covers error detection methods like parity check, checksum, and echo check 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 PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 63

DATA

TRANSMISSION
THE STRUCTURE OF A DATA
PACKET
The amount of data that is stored in a file can be very large. If you tried
to transmit this data from one device to another, all at once, this just
wouldn’t be possible or practical. The wires or radio waves used would
simply not be able to accommodate sending such large amounts of
data at a single time. Therefore, for the data in a file to be transmitted,
it is broken down into very small units called packets.
THE STRUCTURE OF A DATA
PACKET(Cont…)
Each packet of data contains three different sections:
Packet header
Payload
Trailer
THE STRUCTURE OF A DATA
PACKET(Cont…)
Packet header
The packet header contains a lot of important information about the
data enclosed in the packet and its destination. The information it
includes is:
Destination address
Packet number
Originators address
THE STRUCTURE OF A DATA
PACKET(Cont…)
The destination address is normally an IP address. It is IP address of
the device where the data is being sent. Without this address, the
hardware transmitting the data would not know where to send the
data.
Internet Protocol(IP) address is the unique address that is given to a
device when it is connected to a network.
THE STRUCTURE OF A DATA
PACKET(Cont…)
Each data packet in the file is given a packet number. The packets of
data may not have all been sent in the correct order. This will depend
on type of transmission used. This means that when the destination
device has received all the data packet, it can use the packet number
to put them back into the correct order to recreate the file.
THE STRUCTURE OF A DATA
PACKET(Cont…)
The originators address is also normally an IP address of the device
from which the data has been originally sent. So, if you send data to
another device, the originator’s address is the address of your device.
This address helps to trace where data has been sent from in
situations such as illegal activity, or to simply request the original
device to resend the data if an error is detected.
THE STRUCTURE OF A DATA
PACKET(Cont…)
The payload of the data packet is the actual data from the file that you
are sending. The data is broken up into many small units to be sent as
the payload in each packet.
The trailer section of the packet is sometimes known as the footer. This
contains two main pieces of information. The first is the marker to
indicate it is the end of the packet and also data for any error detection
systems that are being used.
PACKET SWITCHING
The process of transmitting packets is called packet switching. In this
process, each packet of data is sent individually from one device to
another. These could be several pathways across a network that the
packet could be transmitted.
Packet switching is a method of transmitting data packets across a
network. Each data packet is able to take an individual pathway across
the network.
PACKET SWITCHING
A Network is two or more computers and devices, which are linked
together using cables or wireless technology that enables them to
share information.
A router is the device that controls which pathway will be used to
transmit each packet.
The packets of data start at device A, they could be transmitted down
any of the pathways between device A and B. Each packet can be sent
using a different pathway. When a packet reaches a router, the router
decides which pathway to send the packet along next. This will
continue until all the packets have arrived at device B.
METHODS OF DATA
TRANSMISSION
There are two methods used to transmit data between digital
devices: serial transmission and parallel transmission. Serial
data transmission sends data bits one after another over a single
channel. Parallel data transmission sends multiple data bits at
the same time over multiple channels.
METHODS OF DATA
TRANSMISSION(Cont…)
Serial data transmission
In serial data transmission, data is transmitted using a single wire. Each
bit of data is transmitted one at a time along the single wire.
METHODS OF DATA
TRANSMISSION(Cont…)
There are several advantages and disadvantages of serial data
transmission
Advantages Disadvantages
As data is sent one bit at a time, it should As data is sent one bit at a time, the transmission of
arrive in order of sequence. This means there data is slower.
is less chance of the data being skewed.
As data is sent along a single wire, there is less Addition data may need to be sent to indicate to the
chance of interference. This means there is receiving device when the data transmission has
less chance of error in the data. started and stopped. These are called a start bit and a
stop bit.
Only one wire is needed for a serial
transmission cable, therefore, it is cheaper to
manufacture and also cheaper to buy.
METHODS OF DATA
TRANSMISSION(Cont…)
Serial transmission, has less chance of data being skewed and less
chance of interference. This makes it more suitable for the
transmission of data over long distance.
METHODS OF DATA
TRANSMISSION(Cont…)
Parallel data transmission
In parallel data transmission, data is transmitted using multiple wires.
Multiple bits of data are transmitted along each wire at the same time.
l
METHODS OF DATA
TRANSMISSION(Cont…)
There are several advantages and disadvantages of parallel data
transmission.
Advantages Disadvantages
As data is sent multiple bits at the same time, the As data is sent multiple bits at the same time, bits do
transmission of data is quicker not arrive in order and need to be reordered after
transmission. This increases the risk of the data
being skewed
Many computers and devices use parallel data As data is sent along multiple wires, there is more of
transmission to transmit data internally. Therefore, interference. This means there is more chance of
there is no requirement to convert this to serial error in the data.
data transmission to transmit the data across a
network.
Multiple wires are needed for a parallel transmission
cable, therefore, it is more expensive to manufacture
and also more expensive to buy.
METHODS OF DATA
TRANSMISSION(Cont…)
Parallel transmission has an increased chance of data being skewed
and an increased chance of interference. This makes it more suitable
for the transmission of data over shorter distances. This is often
limited to approximately 5 meters.
METHODS OF DATA
TRANSMISSION(Cont…)
Simplex data transmission
In simplex data transmission, data is transmitted from one device to
another in one direction.
Simplex is transmission method where data is transmitted in single
direction only.
In a simplex transmission mode, the communication between sender
and receiver occurs only in one direction. That means only the sender
can transmit data, and receiver can receive that data. The receiver
cannot transmit any information back to the sender.
METHODS OF DATA
TRANSMISSION(Cont…)
You would only use this type of data transmission when there is no
need to send data both ways between devices. One example is
connecting a keyboard to a computer. Simplex data transmission can
be used to do this as data only needs to be sent from the keyboard to
the computer, so that the computer screen can display that keys that
are pressed. There is no reason why the computer would need to send
data to the keyboard, so a simplex data transmission connection is
used.
METHODS OF DATA
TRANSMISSION(Cont…)
Other examples are communication between a computer and a printer,
listening to the radio and the signal that is sent from a TV station to
your home TV.
METHODS OF DATA
TRANSMISSION(Cont…)
Half – duplex data transmission
In half-duplex data transmission, data can be transmitted in both
directions between the devices, but only one direction at a time.
In half duplex mode, each station can both transmit as well as receive
signals, but not at the same time. When one device is sending, the
other can only receive, and vice versa. It can also be used when the
communication between two devices needs to have a high level of
performance. WI-FI uses half-duplex data transmission.
METHODS OF DATA
TRANSMISSION(Cont…)
Example: Walkie – talkies is small radio held in the hand which is used
for both sending and receiving message, used by policeman.
METHODS OF DATA
TRANSMISSION(Cont…)
Full-duplex data transmission
In full-duplex data transmission data can be transmitted in both
directions between the devices, at the same time.
In full duplex mode, both stations can transmit and receive signal at
the same time. Full duplex communication is a two ways
communication with data transmitting in both the directions
simultaneously. For example, telephone system is a full duplex device
because both parties can talk at once. Full duplex is simultaneous and
bidirectional.
METHODS OF DATA
TRANSMISSION(Cont…)

When a connection is created between two different devices it will


either be a serial or parallel data connection. It will also be a simplex,
half-duplex or full-duplex connection. This means that connection can
be, for example a serial simplex connection, or parallel half-duplex
connection or possibly a serial full-duplex connection.
THE UNIVERSAL SERIAL BUS
(USB) INTERFACE
A USB device, such as a USB memory stick, is a device that uses the USB
interface. It plugs into a USB port on a computer and it transmits data
using a USB connection. A USB cable can be used to connect devices,
such as a mouse to a computer.
A USB connection uses serial data transmission to transmit data
between the device. However, it is a special type of serial data
transmission connection that is used that is designed to transmit data
at high speeds.
THE UNIVERSAL SERIAL BUS
(USB) INTERFACE(Cont…)
Advantages Disadvantages
It is a simple interface. The USB cable to device can The length of a USB cable is limited, normally to 5
only fit into the USB one way. Therefore, it means less meters.
errors in connecting devices are likely to be made.
The speed of a USB connection is relatively high, so The transmission speed is relatively high for a USB
data can be transferred quickly. connection, but it isn’t as high as other types of
connection, such as Ethernet.
The USB interface is a universal standard for
connecting devices, therefore a USB port is included
in many different device.
When a USB device to cable is inserted into a USB
port, it is automatically detected.
A USB connection can also be used to power a device,
so it does not need another power source. It can
also use this to charge a device such as a mobile
phone.
DETECTING ERRORS IN DATA
TRANSMISSION
The transmission of data from one device to another is often not a
perfect process. In the process of transmitting the data, interference
can occur. This can cause data to be lost, data to be gained and to
change.
If a password wasn’t transmitted correctly, then that person may not be
to log into their account. If person’s address wasn’t transmitted
correctly, they may not get email that needs to be sent to them.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
If a person’s details are not transmitted correctly to a company, they
may not get a product or service that they order. The accuracy of data
is often vital, therefore there needs to be a procedure in place to
detect any errors in data so that actions can be taken to correct this.
There are several error detection methods that can be used, these
include:
• Party check
• Checksum
• Echo check
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Parity check
A party check can use an odd or even check method. Each byte of data
has 7 bits and 1 extra bit that is called a parity bit. The parity bit is
normally the first or last bit of data in the byte.
Parity checking is one method used to check whether data has
been changed or corrupted while moving from one transmitting
device to a receiving device and vice versa.
People communicating make an agreement about which parity is
to be used.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Assuming even parity, the procedure is:
1 At the transmitting end, the number of 1s in the seven -bit code is
counted.
2 If the count gives an even number, the parity bit is set to 0.
3 If the count gives an odd number, the parity bit is set to 1.
4 This is repeated for every byte in the transmission.
5 At the receiving end, the number of 1s in the eight-bit code is counted.
6 If the count gives an even number, the byte is accepted.
7 This is repeated for every byte in the transmission.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
• If no errors are found, the transmission is accepted.
• If an error is detected, re-transmission has to be requested.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
CHECKSUM
A checksum uses a calculated value to check for errors. A value is
calculated from the data that will be transmitted, before transmission
takes place.
Checksum is a type of error detection method that performs a
calculation on the data to create a checksum value. Checksum values
are compared after transmission to see if they match.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Once the checksum value has been calculated it is added to the data to
be transmitted with it. After transmission, the receiving device uses the
same method to calculate a value from the received data. If the values
match, then the device knows that no error has occurred during
transmission. If the values do not match, the device knows that an
error has occurred during transmission. The error is detected!
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
If the sum of all the bytes in the transmitted block of data is <= 255, then the
checksum is this value. However, if the sum of all the bytes in the data
block > 255, then the checksum is found using the simple
algorithm.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
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

Exercises
Calculate the checksum for blocks of data with the following byte sums:
a 148
b 905
c 1450
d 4095
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
• Suppose that the sender wants to send 4 frames each of 8bits, where the
frames are 11001100, 10101010, 11110000 and 11000011.
• The sender adds the bits using 1’s complement arithmetic. While adding
two numbers using 1’s complement arithmetic, if there is a carry over, it is
added to the sum. After adding all the 4 frames, the sender complements
the sum to get the checksum, 11010011 and sends it along with the data
frames.
• The receiver performs 1’s complement arithmetic sum of all the frames
including the checksum. The result is complemented and found to be 0.
Hence, the receiver assumes that no error has occurred.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
CHECKSUM EXAMPLE
Sender
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
CHECKSUM EXAMPLE
Receiver
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
An echo check involves a simple comparison of the data sent to the
data receiver. The sending device transmits the data to the receiving
device. The receiving device then transmit the data it receives back to
the sending device. The sending device compares the data it sent to
the data it has received back from the receiving device to see if they
match. If they do, then no error has occurred. If they don’t match,
then the sending device knows the data was received with error. The
error is detected!
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Automatic Repeat Request(ARQ)
When an error has been detected after the data is transmitted, it is
likely that the data will need to be retransmitted. Either the sending
device will need to ask the receiving device if it received the data
correctly, or the receiving device will need to tell the sending device it
did or did not receive the data correctly. This will allow the data to be
retransmitted if necessary. A method called automatic repeat request
can be used to do this.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
There are two main ways that an ARQ can operate, and each method
uses either a positive or negative acknowledgement and a timeout.
In a positive acknowledgement method:
The sending device transmits the first data packet.
The receiving device receives the data and checks it for errors.
Once the receiving device knows it has received the data error free, it
sends a positive acknowledgement back to sending device.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
When the sending device receives this positive acknowledgement, it
knows the receiving device has received the data packet error free
and it sends the next data packet.
If the sending device does not receive a positive acknowledgement
within a set timeframe, a timeout occurs.
When a timeout occurs, the sending device will resend the data
packet. It will keep doing this when a timeout occurs, until it receives
a positive acknowledgement, or sometimes a limit (such as 20 times)
is set and when this limit is reached it will stop resending the data.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
In a negative acknowledgement method.
The sending device transmits the first data packet.
The receiving device receives the data and checks it for errors.
If the receiving device detects no errors, no further action is taken.
If the receiving device does detect errors, it will send a negative
acknowledgement back to the sender.
If the sender receives a negative acknowledgement, it knows this
means the data was received incorrectly, so it can resend the data
packet.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
A timeout is set by the sending device when it sends the data. This is
just so that the sending device knows that if it doesn’t receive a
negative acknowledgement back within that set time period, it
doesn’t need to be still be waiting for it and send the next data
packet.
Automatic Repeat Request (ARQ) is a type of error detection method
that uses acknowledgement and timeout to see if data has arrived
correctly after transmission.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Acknowledgement is a message that is sent from one device to
another to indicate whether data is received correctly.
Timeout is a period of time that is set and used to wait for an
acknowledgement to be received.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Check digit
• 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, product codes, International Standard
Book Numbers (ISBN) and Vehicle Identification Numbers (VIN).
• Check digits are used to identify errors in data entry caused by miss-
typing or miss-scanning a barcode.
• An example of a check digit calculation is ISBN 13, where the 13th digit of
the ISBN code is calculated using a specific algorithm.
DETECTING ERRORS IN DATA
TRANSMISSION(Cont…)
Example: Check digit calculation of ISBN 13, where the 13th digit of
the ISBN code is calculated using the following algorithm

1. Add all the odd numbered digits together, excluding the check digit.
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 use this value, otherwise subtract the
remainder from 10 to find the check digit.
Example of a check digit
calculation in ISBN 13
Algorithm Without its check digit:

1. Add all the odd numbered digits Using the ISBN 9 7 8 0 3 4 0 9 8 3 8


together, excluding the check digit. 2 without its check digit:
2. Add all the even numbered digits 1. 9 + 8 + 3 + 0 + 8 + 8 = 36
together and multiply the result by
3 2. 3(7 + 0 + 4 + 9 + 3 + 2) = 75
3. Add the results from 1 and 2 3. (36 + 75)/10 = 11 remainder 1
together and divide by 10.
4. 10 – 1 = 9 the check digit
4. Take the remainder, if it is zero use
this value, otherwise subtract the
remainder from 10 to find the
check digit
To check that an ISBN 13-digit code is
correct a similar process is followed.
Algorithm With its check digit
1. Add all the odd numbered digits Using the ISBN above 9 7 8 0 3 4 0 9 8 3 8 2 9 with its
check digit:
together, including the check 1. 9 + 8 + 3 + 0 + 8 + 8 + 9 = 45
digit.
2. 3(7 + 0 + 4 + 9 + 3 + 2) = 75
2. Add all the even number of digits 3. (45 + 75)/10 = 12 Remainder 0
together and multiply the result 4. Remainder is 0 therefore number is
by 3. correct
3. Add the results from 1 and 2
together and divide by 10.
4. The number is correct if the
remainder is zero.
Activities
Find the check digit for the Are these ISBNs correct?
ISBN below:
i. 9718780171500
ISBN 978190612400…
ii.9781234567897
ENCRYPTION
The data that is transmitted often needs to be protected during
transmission. This is because data is valuable, especial when it contains
our personal details and information that is personal to us. A hacker
may try and steal the data during transmission so that they can use it
for their own gain.
One method of protection that can be used when transmitting data is
encryption.
ENCRYPTION(Cont…)
Data before encryption takes place it is called plain text. An encryption
algorithm, called an encryption key, is used to scramble the data and
make it meaningless. This meaningless data is called cipher text. The
cipher text can then be transmitted from one device to another. The
receiving device uses the key to decrypt the cipher text and return it to
its plain text form. This means the data will have meaning again if
read.
ENCRYPTION(Cont…)
There are two main methods of encryption that can be used symmetric
and asymmetric.
The process for symmetric encryption is:
Plain text is encrypted into cipher text using an encryption key
The cipher text and the encryption key are sent separately to the
receiving device.
The same key is then used to decrypt the cipher text back into its
plain text form.
Encryption-Cipher
• Cipher is a method for encrypting/encoding messages
with a specific algorithm.

Plain Text Encryption Cipher Text Decryption Plain Text


Algorithm Algorithm

Key A Key B

• Encryption algorithms are standardized & published


• The key which is an input to the algorithm is secret
• Key is a string of numbers or characters
• If same key is used for encryption & decryption the algorithm is
called symmetric
• If different keys are used for encryption & decryption the
algorithm is called asymmetric
ENCRYPTION(Cont…)
This is the simplest method of encryption and is still used for data that
is not of a high level of importance. It is sometimes used by people just
wanting to encrypt the data that they store on their own computer or
external storage device, as it isn’t being transmitted across a network.
However, people began to worry that it could be too easy for a hacker
to intercept both the cipher data and the encryption key if it is sent
across a network, or the Internet.
Symmetric is type of encryption that uses the same key to encrypt and
decrypt data.
ENCRYPTION(Cont…)
The process for asymmetric encryption is :
Plain text is encrypted into cipher text using public key. This is a type
of encryption algorithm.
The cipher text is transmitted to the receiving device.
The cipher text cannot be decrypted using the public key, it is
decrypted using a private key.
ENCRYPTION(Cont…)
A person who uses an asymmetric method of encryption has a public
encryption key. This is called a public key because it is made public for
the encryption process. Making something public means that anyone
can see and use it. Any device that wants to send you encrypted data
may obtain your public and encrypt the data using your public key. You
also have a private key. Any encrypted data that your device receives
that has been encrypted with your public key can be decrypted with
your private key. They act as a pair. Your private key is always kept
private through, your device does not make it available to any other
unless authorization is given to do so.
Asymmetric Encryption
Basics
• Uses a pair of keys for encryption
• Public key for encryption
• Private key for decryption
• Messages encoded using public key can only be
decoded by the private key
• Secret transmission of key for decryption is not required
• Every entity can generate a key pair and release its public key

Plain Text Cipher Text Plain Text


Cipher Cipher

Public Key Private Key


Asymmetric Encryption
Key Agreement
• Key agreement is a method to create secret key by
exchanging only public keys.
• Example
• Bob sends Alice his public key
• Alice sends Bob her public key
• Bob uses Alice’s public key and his private key to generate
a session key
• Alice uses Bob’s public key and her private key to generate
a session key
• Using a key agreement algorithm both will generate same
key
Alice’s
• Bob and Alice do not
Privateneed
Key to transfer any key
Bob’s
Public Key Cipher
Alice and Bob
Bob’s Session Key Generate Same
Private Key
Session Key!
Alice’s
Public Key Cipher
How are the keys generated:
The following routine shows how this is done. Follow it
through, and you will see that both sender and recipient
end up with a key which is effectively secret, but didn't
involve sending the actual key electronically.
Thus both sender and recipient end up with the
same encryption and decryption key of 9.
This gives us the basis of how an encryption key can
be generated.
Activity
Use the following sender and receiver values to
check that the system described in Table above
works
a) Sender uses the value x=3 and receiver uses the
value y = 5
b) Sender uses the value x=7 and receiver uses the
value y=6
Substitution Ciphers
This is a method in which each letter in the alphabet
is rotated by three letters as shown

ABCDEFGHIJKLMNOPQRSTUVWXYZ

DEFGHIJKLMNOPQRSTUVWXYZABC

Let us try to encrypt the message


– COMPUTER SCIENCE
Assignment:
Each student will exchange a secret
message with his/her closest neighbor in
the class and the neighbor will decipher

You might also like