P1 - Unit 2 - Data Transmission
P1 - Unit 2 - Data Transmission
Data packets
Unit 2 Data transmission and encryption
Data packets
• The data is split down into smaller fragments that make up the payload
of each packet
• The header contains the destination address, originating address (source address)
and the packet number so that the correct order is restored once it arrives
• The payload is the contents that need to be sent
• The trailer has data that indicates the end of the packet and a checksum for the
destination to check it transmitted correctly
Header
Destination Originating Packet Payload Trailer
address address number
One data packet
Data packets
Unit 2 Data transmission and encryption
• Data packet are sent on different route through the network, they may
arrive out of order
• The destination computer or server will need to reorder the packets into
the correct order by using packet number in the header of the data
packet
Data transmission
Unit 2 Data transmission and encryption
Serial transmission
• Bits are sent one signal at a time over a single wire
• One bit is sent at a time
• Once the bit has been received, the next bit is sent
0 1 0 1 0 1 1 0
Receiver
Sender
Data transmission
Unit 2 Data transmission and encryption
Parallel transmission
• In parallel transmission a number of wires are used so that many bits
may be sent at the same time
• Again, the ASCII letter ‘W’ is sent in binary
Sender Receiver
Data transmission
Unit 2 Data transmission and encryption
Receiver
and D5 are causing
Sender
D3
1 1 cross talk on D4 so
D4 that the number
0 1
01011110 is
D5
1 1 received
D6
1 1
D7
0 0
Data transmission
Unit 2 Data transmission and encryption
Advantages Disadvantages
The connected device is automatically detected The maximum cable length is 5 metres
and the correct drivers are used or installed
It is widely adopted by many devices Limited to 500 megabits per second rate for data
transfer
It can only be connected one way which prevents Older versions may not be supported
wrong connections from being made
1 1 0 0 0 0 0 1 1
First devices agree on the method of parity bit checking is it going to be even or odd.
Sender calculates the parity bit , sends it to the receiver along with the data
Receiver recalculates the parity bit using the data received and compare this parity with the parity received , if they don’t match then
receiver will request the sender to resend the data
Error which can’t be detected by parity bit: if more than one bit is transposed then error can’t be detected
Parity Block
A parity byte is used to identify which bit has been transmitted incorrectly in a block of data. The word “F L O W C H A R T” was transmitted using nine bytes of data (one byte
per character). A tenth byte, the parity byte, was also transmitted. The following block of data shows all ten bytes received after transmission. The system uses
even parity and column 1 is the parity bit.
Data transmission
Unit 2 Data transmission and encryption
•If check sum doesn’t match it means there is error in the data received, then the
receiver will send acknowledgement to the ask the sender to send the data again.
•If check sum matches , the receiver will send acknowledgement to the receiver that
data is correctly received and start sending the next bytes of data
•If there is no acknowledgement sent to the sender within time out agreed, the
sender will start resending the data.
How Parity Bit and ARQ are used
together to check error in transmission
•The sender and receiver agree on parity bit method they will be using for error detection
( even or odd). Sender will calculate the parity bit and then send the data to the receiver
along with the parity.
•The receiver will recalculate the parity of the data received and will compare this parity with
the one sent by sender,
•If parity bits don’t match it means there is error in the data received, then the receiver will
send acknowledgement to the ask the sender to send the data again.
•If parity bits match , the receiver will send acknowledgement to the receiver that data is
correctly received and start sending the next byte of data
•If there is no acknowledgement sent to the sender within time out agreed, the sender will
start resending the data.
Error detection
Unit 2 Data transmission and encryption
Check digits
• A check digit is an additional digit at the end of a set of other numbers
designed to check for mistakes in input or transmission
• Printed books have a unique barcode with an ISBN (International Standard Book
Number)
• Other products contain bar codes using formats such as UPC (Universal Product
Code)
• Both codes make use of check digits to make sure they have been
scanned or entered correctly
Error detection
Unit 2 Data transmission and encryption
What is encryption?
• The purpose of encryption is to encode a file or data into something
that cannot be read or understood
• The file or data that cannot be understood is known
as encrypted
• A key or password is used to decrypt the data
Plaintext Encrypted/
Cipher text
Encryption
Unit 2 Data transmission and encryption
Symmetric encryption
• In symmetric encryption, a key is first shared between the sender
and receiver
• This key encrypts the data before it is transmitted
• The receiver uses the key to decrypt the data
Sender Receiver
Asymmetric encryption
• In asymmetric encryption, two keys are created by the receiver
• The public key is accessible by anyone and used to
encrypt data
• The private key is kept secret by the receiver and used to decrypt the data
• The technique is also known as public-key cryptography
• This means that anyone can encrypt the data, but only the receiver
can decrypt it
• There is no need to share a secret key
as happens with symmetric encryption
Encryption
Unit 2 Data transmission and encryption
Asymmetric encryption
• Both keys are generated by the receiver
• Only the public key is shared with the sender
Public key Private key
Sender Receiver
• If symmetric encryption were used, every website you visit would first
need to send the password privately to you – for instance through a
letter
• The sharing of a public key happens in a fraction of a second and there is no risk if
an eavesdropper discovers it