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

P1 - Unit 2 - Data Transmission

Uploaded by

vijahat
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)
19 views

P1 - Unit 2 - Data Transmission

Uploaded by

vijahat
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/ 31

Topic 2 revision

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

Four Steps of Packet switching


1. Break down 2. Send the 3. Routers 4. Reorder
data into packets through control the packets into
packets the network route taken correct order

• 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

• The example below shows how the ASCII ‘W’


character is sent in binary

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

Crosstalk in parallel communication


• Crosstalk may occur when a signal on one line creates a disturbance in
another line
• This may cause a bit to be reversed in a parallel line
• The longer a cable is, the more chance there is of crosstalk
D0
0 0
D1 The number
1 1 01010110 is
0
D2
0 transmitted, lines D3

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

Skew in Parallel Communication


• Each wire in a parallel cable has slightly
different properties
• Signals therefore arrive at slightly different times
• The receiver must wait until all
lines are received until the next
set of bits may be sent
• Transmission needs to be
over very short distances
to reduce the problem
Serial Parallel
Serial and Data travels on the multiple
Data travels only on the single
Parallel channel one bit at a time, used for channels/ wires/ media from
long distance communication sender to the receiver. Used for
Communication Adv: short distance transmission
• There won't be a problem of data Adv:
arriving out of sync at the • Fast data transmission
destination
• Data will not be skewed / no Disadv:
cross talk • Can get out of sync, all the bits
• Cost efficient / single wire may not reach at the same
transmission than parallel time.
Disadv: • Cross talk between wire, more
• Slow method of data chances of data loss
transmission
Example: Internal Communication
between different parts of the
Example: Universal Serial Bus computer system
Types of Communication
Types How do they work Examples
Simplex Transmission is in one direction only Computer to a
printer
Half Duplex Transmission can be sent from both direction (point A to b Walkie talkies
And vice versa), but only one at a time. Computer to
printer and
printer to
computer
Full Duplex Transmission can be sent to and from both directions Phone calls
simultaneously
Synchronous Synchronous involves bits being streamed through a channel,
timing of the signals are used to ensure the sender and receiver
are synchronised.
Asynchronous Asynchronous data transmission involves bits being sent as groups Universal
along with control bits, one to represent the start, and one to Serial Bus
represent the end of the group of bits.
Integrated circuit Universal Serial Bus
IC and USB Used for Internal transmission Serial
Parallel Communication with
external devices
Short distance
Fast data transmission Advantages and
disadvantages are on the
Fragile / can be damaged if next slide
exposed
Universal Serial Bus ( Serial Data Transmission connection)

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

Allows for different data transmission rates


Error Correction Checks – Even and Odd Parity
Parity check – A parity bit is sent along with the bit of data. Parity bit is either turned on or off depending on the number of ones in
the data to be sent.
Even Parity – parity bit is on to make number of 1’s even

1 1 0 0 0 0 0 1 1

Odd Parity – parity bit is off to make number of 1’s even


0 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

Parity block check


• In a parity block check, each byte has a parity bit, whilst
an additional parity byte is sent at the end of the block
• Check the first three bytes to see if there are any problems with the
parity bits

Parity Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7


bit Even parity
Byte 1 0 0 1 1 1 0 1 0 has been
Byte 2 0 1 0 1 1 0 0 1 used
Byte 3 1 1 1 0 0 1 1 0
Byte 4 1 0 0 1 1 0 0 1
Byte 5 0 1 1 1 1 1 1 0
Byte 6 1 0 1 0 1 0 1 0
Byte 7 0 1 0 1 0 1 0 1
Byte 8 0 1 1 1 0 0 0 1
Parity Byte 1 1 1 0 1 0 0 0
Error detection
Unit 2 Data transmission and encryption

Parity block check


• Check the first three bytes to see if there are any problems with the parity bits
• We know that Byte 3 has an error in it
• Now check the Parity Byte for each bit to see which bit contains the error

Parity Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7


bit Even parity
Byte 1 0 0 1 1 1 0 1 0 has been
Byte 2 0 1 0 1 1 0 0 1 used
Byte 3 1 1 1 0 0 1 1 0
Byte 4 1 0 0 1 1 0 0 1
Byte 5 0 1 1 1 1 1 1 0
Byte 6 1 0 1 0 1 0 1 0
Byte 7 0 1 0 1 0 1 0 1
Byte 8 0 1 1 1 0 0 0 1
Parity Byte 1 1 1 0 1 0 0 0
Error detection
Unit 2 Data transmission and encryption

Parity block check


• Check the first three bytes to see if there are any problems with the parity bits
• We know that Byte 3 has an error in it
• Now check the Parity Byte for each bit to see which bit contains the error

Parity Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7


bit Even parity
Byte 1 0 0 1 1 1 0 1 0 has been
Byte 2 0 1 0 1 1 0 0 1 used
Byte 3 1 1 1 0 0 1 1 0
Byte 4 1 0 0 1 1 0 0 1
Byte 5 0 1 1 1 1 1 1 0
Byte 6 1 0 1 0 1 0 1 0
Byte 7 0 1 0 1 0 1 0 1
Byte 8 0 1 1 1 0 0 0 1
Parity Byte 1 1 1 0 1 0 0 0
Data transmission
Unit 2 Data transmission and encryption

Parity block check


• We now know which row and column the error is in, so we
can identify it
• The bit can now be corrected

Parity Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7


bit Even parity
Byte 1 0 0 1 1 1 0 1 0 has been
Byte 2 0 1 0 1 1 0 0 1 used
Byte 3 1 1 1 0 0 1 1 0
Byte 4 1 0 0 1 1 0 0 1
Byte 5 0 1 1 1 1 1 1 0
Byte 6 1 0 1 0 1 0 1 0
Byte 7 0 1 0 1 0 1 0 1
Byte 8 0 1 1 1 0 0 0 1
Parity Byte 1 1 1 0 1 0 0 0
Error Checking

Echo Check Check Sum


The data is sent out to the receiver. • The sender and receiver agree on
the algorithm to calculate the check sum.
Once received, receiver will send the data back to the • Sender calculates the check sum and then
sender to confirm what was received.
sends the data to the receiver along with the
The sender checks this data against what it sent, if calculated checksum value.
they are the same, then the transmission was a • The receiver will recalculate the checksum
success. using the same algorithm after applying this
formula to the data received from the sender
Limitation : and will compare this with the check sum sent
Bandwidth overload, same data is sent back and by sender.
forth
• If check sum doesn’t match it means, there is
error in the data received, so receiver will ask
the sender to resend the data.
Automatic Repeat
Request(ARQ)
ARQ is not an error checking method , it is just an
acknowledgement sent to the sender from the receiver
within the agreed time out
• If the sender receives the acknowledgement within the
agreed time out that data is received without any error,
then sender won’t resend the data
• If sender doesn’t receive an acknowledgement from the
destination device within agreed time, then sender will
resend the data after the time out to the destination.
• ARQ is used along with other error correction methods.
Examples are given in the next two slides
How Check Sum and ARQ are used
together to check errors in transmission
•The sender and receiver agree on one algorithm to calculate the check sum.
Sender will calculate the check sum and then send the data to the receiver along
with the calculated checksum. The receiver will recalculate this checksum using the
same algorithm and will compare with the one sent by sender,

•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

Checking data entry


• Barcodes and other numbers have check digits which are used to
make sure a number has been
entered correctly
• A barcode scanner may misread
the number and request
it to be scanned again
• A checkout assistant or
customer may mistype
the number if they have
to enter it manually
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

Calculating the check digit


• Check digits are calculated by
multiplying each number by a weight
of 1 or 3 as shown below
• The rest of the algorithm is then completed
ISBN 5 0 1 4 0 1 6 1 5 0 8 2 1
Weight 1 3 1 3 1 3 1 3 1 3 1 3
Multiplication 5 0 1 12 0 3 6 3 5 0 8 6
Addition Add all the numbers 49
Remainder Find the remainder when divided by 10 9
Subtraction Subtract the result from 10 1
Encryption
Unit 2 Data transmission and encryption

The need for encryption


• Large amounts of personal data are now stored and transmitted on
computers
• Companies and other organisations also have highly confidential data that they don’t
want others looking at
• In paper systems, sensitive data was held in locked cabinets and
locked rooms
• Now, sensitive data is often transmitted via the Internet which is a public network
• Data is also stored on computers and servers on the Internet which may be hacked
• If a hacker gains access to the data, they won’t be able to understand it if it is
encrypted
Encryption
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

“That’s one small AI94KkmC39g7c


step for 0xznwejg8sJKY3
a man, one 7c3GBmOWp9D
giant leap for KcnbuenJhnDko9
mankind.” – Neil 4ncC385C7djkIol
Armstrong kfyvnwIHH9WI

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

The quick idEug94jvMz The quick


brown fox pr0Utjdnkcib brown fox
jumps over ntTD031BnZ jumps over
the lazy dog. inIpPdkfi82n the lazy dog.
Bnw
Plaintext Encrypted text Plaintext
Secret shared key Secret shared key
Encryption
Unit 2 Data transmission and encryption

Symmetric encryption uses


• The pre-shared key used to connect to a Wi-Fi access point makes use
of symmetric encryption
• Other uses for symmetric encryption include:
• Adding a password to a ZIP file which also encrypts the file
• Encrypting a hard drive or external storage device
Encryption
Unit 2 Data transmission and encryption

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

The quick idEug94jvMz The quick


brown fox pr0Utjdnkcib brown fox
jumps over ntTD031BnZ jumps over
the lazy dog. inIpPdkfi82n the lazy dog.
Bnw
Plaintext Encrypted/cipher Plaintext
text
Encryption
Unit 2 Data transmission and encryption

Web asymmetric encryption


• Web pages that are shared using HTTPS (Hypertext transfer protocol
secure) make use of encryption
• The encryption used is asymmetric encryption
• The browser and server share the necessary public keys to encrypt the data
• They then use their private keys to decrypt the data

• 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

You might also like