Chapter 2 - Data Transmission
Chapter 2 - Data Transmission
CHAPTER 2: DATA
YES (actually
no)
HOW IS DATA (TEXT, IMAGE, AND SOUND) TRANSMITTED?
YES!
Computer Science
is Easy
2.1
P1
Secret
Message P2
P3
Each packet can be sent along a different route
Any Route
P1
Secret
Message P2 Destination
P3
One disadvantage : Data needs to be reassembled when it reaches
the destination.
P1
Secret
Destination
P2 Message
P3
Packet Structure
A typical packet is split up into:
» a packet header
P1 » the payload
» a trailer.
Trailer
Header Payload
Packet Structure (Header)
• Sender IP Address
Header • Receiver IP Address
• Sequence number of the packet.
• This is to ensure that all the packets can be
reassembled correctly once they reach the
destination.
• Size of the packet
• This is to ensure that the receiving station
can check if all of the packets have arrived.
Packet Structure (Header)
• Sender IP Address
Header • Receiver IP Address
• Sequence number of the packet.
• This is to ensure that all the packets can be
reassembled correctly once they reach the
destination.
Trailer
Trailer
P1
• the direction of data transmission (for example, can data transmit in one direction only, or in both directions)
• the method of transmission (for example, how many bits can be sent at the same time)
• how will data be synchronised (that is, how to make sure the received data is in the correct order).
BOTH BOTH
ONE DIRECTION DIRECTION BUT DIRECTION AT
ONLY NOT AT THE THE SAME TIME
SAME TIME
Serial and parallel data transmission
Serial data transmission occurs when data is sent ONE BIT AT A TIME over a SINGLE WIRE/CHANNEL. Bits are sent one after
the other as a single stream.
Parallel data transmission occurs when SEVERAL BITS OF DATA (usually one byte) are sent down SEVERAL
CHANNELS/WIRES all at the same time. Each channel/wire transmits one bit:
Activity 2.2
2.1.3. Universal serial bus (USB)
• The universal serial bus (USB) is a form of serial data transmission.
• USB is now the most common type of input/output port found on computers and has led to a standardisation
method for the transfer of data between devices and a computer.
Benefits Drawbacks
devices plugged into the computer are automatically detected standard USB only supports a maximum cable length of 5 m;
and device drivers are automatically loaded up beyond that, USB hubs are needed to extend the cable length
There are a number of ways data can be checked for errors following transmission:
• Parity checks
• Checksum
• Echo check
Each of these methods is designed to check the errors after the data has been
transmitted from one device to another
Parity checks
Parity checking is one method used to check whether data has been changed or corrupted following data
transmission. This method is based on the number of 1-bits in a byte of data.
The parity can be either called EVEN (that is, an even number of 1-bits in the byte) or ODD (that is, an odd
number of 1-bits in the byte).
1
0
1
1
0
0
1
0
1
0
Activity Solution 2.5
Echo check
With echo check, when data is sent to another device, this data is sent back again
to the sender. The sender’s computer compares the two sets of data to check if any
errors occurred during the transmission process.
2.2.3. 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 commonly used on:
•Barcodes
•Credit Cards
•Account Numbers
•Government ID Numbers
Example 1: ISBN 13
2.2.4 Automatic Repeat Requests (ARQs)
An Automatic Repeat Request (ARQ) is a third way used to check data following
data transmission. This method can best be summarised as follows:
•when an error is detected in a packet of data a request is automatically sent for the data to be resent
•Check performed on receiving data // error is detected by e.g. parity check, check sum
•If error detected, request is sent to resend data // negative acknowledgement is used
•Resend request is repeated till data is sent correctly / requests time out / limit is reached
Encryption alters data into a form that is unreadable by anybody for whom the data is not intended.
This is particularly important if the data is sensitive or confidential (for example, credit card/bank
details, medical history or legal documents).
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 key are needed to encrypt and decrypt message
2. Asymmetric encryption is more secure as it makes use
of two keys, one is public and other one is private. The private
key is only known to the recipient of the document.
a>E
b>B
c>B
d>E
e>A
f>E
g>A
h>B
i>D