Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views13 pages

Unit 2 Notes

The document explains data transmission, focusing on data packets, packet switching, and transmission methods. It details the structure of packets, advantages of packet switching, and various transmission types including serial, parallel, simplex, half-duplex, and full-duplex. Additionally, it covers USB technology, error detection methods like parity checks and check digits, and their applications in ensuring data integrity.

Uploaded by

hanzinannie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

Unit 2 Notes

The document explains data transmission, focusing on data packets, packet switching, and transmission methods. It details the structure of packets, advantages of packet switching, and various transmission types including serial, parallel, simplex, half-duplex, and full-duplex. Additionally, it covers USB technology, error detection methods like parity checks and check digits, and their applications in ensuring data integrity.

Uploaded by

hanzinannie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Unit 2

Data Transmission

Data Packets
What are packets?
 Packets are small 'chunks' of data that make up a larger piece of data
that has been broken down by the TCP protocol so that it can be
transmitted over the internet.
 TCP stands for Transmission Control Protocol and is used for
organising data transmission over networks.
 Small 'chunks' of data are easier and quicker to route over the internet
than big 'chunks' of data
 Routing involves finding the most optimal path over a network.
 Data can include anything from text, images, audio, video, animations,
etc, or any combination of these.

What do packets contain?


A packet consists of:

Header Payload Trailer

 Source IP Actual data being  Additional security


address transported information
 Destination IP  End of packet
address notification
 Packet number

Each packet contains a:


1. Source IP address
2. Destination IP address
3. Payload (the data)
4. A packet number
Packet Switching
What is packet switching?
Packet switching is a method of sending and receiving data (packets) across
a network
Packet switching can be broken down into five stages:

Stage Overview Detail

1 Data is broken down Learn more by reading


into packets our data packets
revision note
2 Packets are assigned a

3 Each packet makes its Like normal car traffic,


way to the destination data traffic builds up on
the internet
Routers can see this
and decide to send a
packet down a different
route that avoids traffic

4 Routers control the Routers know which


routes taken for each nearby router is closer
packet to the destination
device

5 Packets arrive and are If a packet does not


reordered correctly reach its destination
the receiver can send a
resend request to the
sender to resend the
packet

What are the advantages of packet switching?


 Interference and corruption are minimal as individual packets can be
resent if they are lost or damaged.
 The whole file doesn’t need to be resent if a corruption occurs, this saves
time and internet bandwidth.
 Packet switching is quicker than sending a large packet as each packet
finds the quickest way around the network.
 It's harder to hack an individual's data as each packet contains minimal
data, and travels through the network separately.
Data transmission is the process of transferring data from one device to another
using a wired or wireless connection Wired data transmission can be completed
in two ways:
1. Serial
2. Parallel
Serial & Parallel Transmission
• Serial and parallel are methods of transmitting data (bits) from a sender to
a receiver
• Each method determines how many bits can be transmitted at once
Serial transmission
• A stream of bits is sent in sequence, one after the other
• USB is an example of a wired serial connection
Parallel transmission
• A stream of bits is sent in sequence, one after the other across multiple
wires at the same time
• Transmission is asynchronous, data does not always arrive at the same
time
• A skew can be caused by data arriving out of order in asynchronous
transmission
• A traditional printer cable is an example of a wired parallel connection

Transmission Advantages Disadvantages

Serial
• Reliable over • Slow transmission
longer distance speed
• Cheaper to setup
• Low interference

Parallel
• Very fast • Only used on
transmission speed short distances
• Prone to high
interference

Simplex, Half-Duplex & Full-Duplex Transmission


Simplex, half-duplex and full-duplex control the direction in which data is
transmitted between a sender and receiver.
Simplex transmission
 Data travels in only one direction
 Sending data from a computer to a monitor is an example of simplex
transmission.

Half-duplex transmission
• Data can travel in both directions, but not simultaneously (bi-directional)
• A printer cable which waits for the data to be received before sending
back a ‘low ink’ message is an example of half-duplex transmission.
Full-duplex transmission
• Data can travel in both directions at the same time (bi-directional)
• Network cables can send and receive data at the same time and are
examples of full-duplex data transmission.
• Full-duplex is used in local and wide area networks.

Transmission Advantages Disadvantages

Simplex Cheap as only one wire


is used
• Slow
• Expensive for bi-
directional transmission
(multiple wires)

Half-duplex Cheaper than simplex


for bidirectional
• Slow
transmission (fewer
wires)

Full-duplex Fast as data can travel


in both directions
• Expensive
simultaneously

Universal Serial Bus (USB)


 The Universal Serial Bus (USB) is a widely used standard for
transmitting data between devices
 It is a serial communication method, and
it operates asynchronously
 Many devices use USB such as:
o Keyboards

o Mice

o Video cameras

o Printers
o Portable media players

o Mobile phone

o Disk drives

o Network adapters

 Different USB connector types exist for different devices


 The letters refer to the physical shape and design of the USB
connector:
o USB-A - Commonly used for flash drives, mice, keyboards, external

HDD
o USB-B - Found in printers, scanners, and older external storage
devices
o USB-C - Latest standard, known for it's small size, transfer
speeds, and it's ability to carry power.

 The term USB can also be followed by numbers (USB 2.0, 3.0, 4 etc.)
 The numbers refer to the generation of USB technology, which
determines the speed and performance:
o USB 1.1 - 12 Mbps (very slow)

o USB 2.0 - 480 Mbps (very common but slower compared to modern
versions)
o USB 3.0/3.1/3.2 - 5 Gbps to 20 Gbps (much faster, used for
external HDDs and gaming devices)
o USB4/ USB4 2.0 - Up to 80 Gbps (the latest and fastest, used for
high speed data transfer)
 When a device is connected to a USB port the computer:
o Automatically detects that the device has been connected

o Looks for the correct driver:

 If the driver is already installed, the appropriate device


driver is loaded so that the device can communicate
with the computer
 If the device is new, the computer will look for a
compatible device driver
 If one cannot be found, the user must download and
install an appropriate driver manually
Advantages and disadvantages of USB

Advantages Disadvantages

Devices are automatically The maximum cable length


detected and drivers are is roughly 5 metres meaning it
automatically loaded for cannot be used over long
communication. distances, limiting its use.

Cable connectors fit in only one way.


Older versions of USB have limited
This prevents incorrect connections transmission rates for example USB
and ensures compatible data 2.0 has 480Mbps.
transmission.

As USB usage is standardised, there is a Very old USB standards may not
lot of support available online and from be supported in the near future (USB
retailers. 1.1, USB 2.0, etc).

Several different data transmission


rates are supported. The newest
transmission rate as of 2022 is USB4
2.0 with 80 Gbps (81,920 Mbps, 170x
faster than USB 2.0).

Newer USB
standards are backwards
compatible with older USB standards.

Why do errors occur?


 Errors can occur using wired or wireless technology due to interference
 Examples of interference include wire degradation or electrical fields
changing the signal
 Results of interference include:
o Data loss - data is lost in transmission

o Data gain - additional data is received

o Data change - some bits have been changed or flipped

 Wireless technology uses radio signals or other electromagnetic


signals to transmit data
o These signals can be blocked by physical barriers such as
buildings, walls, cars or other objects
o Interference can be caused by bad weather such as rain or clouds,
or by other wireless signals or electromagnetic radiation
 Wired technology carries more chance of causing an error as physical
components can be damaged, degrade or receive interference from
outside signals
o Data loss can also occur from interruptions to data transmission
such as a blocked signal or if the transmission is intermittent
Why check for errors?
 Computers expect data in certain formats
o A format is a way of arranging the data so that it can be easily
understood by people and by computers
o People agree to certain formats so that systems work
more efficiently and there is little chance of misunderstanding
each other
 An example of a format is date and time
 Date and time can have multiple formats such as:
o 13/04/14 (DD/MM/YY)

o 12/31/2020 (MM/DD/YYYY)

o Jul-04-16 (MMM/DD/YY)

 If data is not as expected, things can go wrong


 For example, if a receiver expected to receive a date in format DD/MM/YY
as 03/04/17 but received 04/03/17, did the sender mean 3rd April 2017 or
4th March 2017?
 An error or corruption occurs when data received is not as
expected and therefore is difficult or impossible to process
What is a parity check?
 A parity check determines whether bits in a transmission have
been corrupted
 Every byte transmitted has one of its bits allocated as a parity bit
 The sender and receiver must agree before transmission whether they
are using odd or even parity
 If odd parity is used then there must be an odd number of 1’s in the
byte, including the parity bit
 If even parity is used then there must be an even number of 1’s in the
byte, including the parity bit
 The value of the parity bit is determined by counting the number of
1’s in the byte, including the parity bit
 If the number of 1’s does not match the agreed parity then an error
has occurred
 Parity checks only check that an error has occurred, they do not
reveal where the error(s) occurred
Even parity
 Below is an arbitrary binary string

EVEN
Parity Byte
bit

0 1 0 1 1 0 1 0

 If an even parity bit is used then all bits in the byte, including the parity
bit, must add up to an even number
o There are four 1’s in the byte

o This means the parity bit must be 0 otherwise the whole byte,
including the parity bit, would add up to five which is an odd
number
Odd parity
 Below is an arbitrary binary string

ODD
Parity Byte
bit

1 1 0 1 1 0 1 0

 If an odd parity bit is used then all bits in the byte, including the parity
bit, must add up to an odd number
o There are four 1’s in the byte. This means the parity bit must be a 1
otherwise the whole byte, including the parity bit, would add up to
four which is an even number
Check Digits
 A check digit is the last digit included in a code or sequence, used
to detect errors in numeric data entry
 Examples of errors that a check digit can help to identify are:
o Incorrect digits entered

o Omitted or extra digits

o Phonetic errors

 Added to the end of a numerical sequence they ensure validity of the


data
 Calculated using standardised algorithms to ensure
widespread compatibility
 Examples of where check digits can be used include:
o ISBN book numbers

o Barcodes

ISBN book numbers


 Each book has a unique ISBN number that identifies the book
 A standard ISBN number may be ten digits, for example, 965-448-765-9
 The check digit value is the final digit (9 in this example).
 This number is chosen specifically so that when the algorithm is
completed the result is a whole number (an integer) with no remainder
parts
 A check digit algorithm is performed on the ISBN number and if the
result is a whole number, then the ISBN is valid
Barcodes
 Barcodes consist of black and white lines which can be scanned using
barcode scanners
 Barcode scanners shine a laser on the black and white lines
which reflect light into the scanner
 The scanner reads the distance between these lines as numbers and
can identify the item
 Barcodes also use a set of digits to uniquely identify each item
 The final digit on a barcode is usually the check digit, this can be used
to validate and authenticate an item
What is a Check Digit?
A check digit is a number added to the end of a string of numbers to help
check if the number is correct or not. It helps detect mistakes like typing
the wrong digit.
Modulo-11 Algorithm (Step-by-Step)
1. Start with a 7-digit number.
2. Give each digit a weight starting from 8 down to 2 (left to right).
3. Multiply each digit by its weight.
4. Add all the results to get a total.
5. Divide the total by 11 and get the remainder.
6. Subtract the remainder from 11 to get the check digit.
7. If the remainder is 10, use 'X' as the check digit.
Example 1 – Creating the Check Digit
Given 7-digit number: 4 1 5 6 7 1 0
Weights: 8 7 6 5 4 3 2
Multiplications: 32 + 7 + 30 + 30 + 28 + 3 + 0 = 130
Step 1: 130 ÷ 11 = 11 remainder 9
Step 2: 11 - 9 = 2 → Check digit is 2
Final 8-digit number: 4 1 5 6 7 1 0 2
Example 2 – Verifying the Check Digit
Use 8-digit number: 4 1 5 6 7 1 0 2
Multiplications: 32 + 7 + 30 + 30 + 28 + 3 + 0 + 2 = 132
132 ÷ 11 = 12 remainder 0 → Number is correct.
ISBN 13 Check Digit
What is an ISBN?
An ISBN (International Standard Book Number) is a 13-digit number used
to identify books. The last digit is called the 'check digit' and helps make
sure the number is correct.
How to Calculate the Check Digit
Follow these 4 simple steps:
1. Add all the odd-position digits (1st, 3rd, 5th, etc.)
2. Add all the even-position digits (2nd, 4th, 6th, etc.) and multiply the total
by 3
3. Add the two results from step 1 and step 2
4. Divide the total by 10. If the remainder is 0, the check digit is 0. If not,
subtract the remainder from 10 to get the check digit.
Example
Use the first 12 digits: 9 7 8 0 3 4 0 9 8 3 8 2
Step 1: Add odd-position digits: 9 + 8 + 3 + 0 + 8 + 8 = 36
Step 2: Add even-position digits and multiply by 3: (7 + 0 + 4 + 9 + 3 + 2)
× 3 = 75
Step 3: Add both results: 36 + 75 = 111
Step 4: Divide 111 by 10 → remainder is 1 → 10 - 1 = 9
So, the check digit is 9.
ISBN 13 Check Digit Verification
Why Recalculate?
Sometimes we want to check if the ISBN number is correct. We do this by
recalculating the check digit and making sure it matches the one given.
How to Verify the Check Digit
Follow these 4 steps:
1. Add all the digits in odd positions, including the check digit (last digit)
2. Add all the digits in even positions and multiply the result by 3
3. Add the two results together
4. Divide the total by 10. If the remainder is 0, the ISBN is correct.
Example
Full ISBN: 9780340983829
Step 1: Add odd-position digits (including last digit): 9 + 8 + 3 + 0 + 8 + 9
= 45
Step 2: Add even-position digits and multiply by 3: (7 + 0 + 4 + 9 + 3 + 2)
× 3 = 75
Step 3: Add both results: 45 + 75 = 120
Step 4: 120 ÷ 10 = 12 → remainder is 0
Since the remainder is 0, the ISBN is correct!
What is CRC?
 CRC stands for Cyclic Redundancy Check.
 It is a type of error-detection method used to check if data has been
changed or corrupted during transmission or storage.
What is an automatic repeat request(ARQ)?
 An automatic repeat request is a protocol that notifies the sender that
an error has occurred and that the data received is incorrect
 It works as follows:
o If an error is detected the receiver sends a negative
acknowledgement transmission to indicate the data is
corrupted
o If no error is detected the receiver sends a positive
acknowledgement transmission meaning the data is correct
o If the receiver does not send any acknowledgement
transmission then the sender waits for a certain time period
known as a time-out before automatically resending the data
o This process is repeated until all data has
been received and acknowledged
Encryption
 Encryption is a method of converting plain text to cipher text.
 Encryption helps to protect the contents from unauthorised access
by making data meaningless.
 While encryption is important on both wired and wireless networks, it's
even more critical on wireless networks due to the data being transmitted
over radio waves, making it easy to intercept.
Symmetric & Asymmetric Encryption
 Encryption relies on the use of a key
 A key is a binary string of a certain length that when applied to an
encryption algorithm can encrypt plaintext information
and decrypt ciphertext
o Plaintext is the name for data before it is encrypted

o Ciphertext is the name for data after it is encrypted

 Keys can vary in size and act like passwords, enabling people to protect
information
What is symmetric encryption?
 Symmetric encryption is when both the sender and receiver are given an
identical secret key which can be used
to encrypt or decrypt information
 If a hacker gains access to the key, then they can decrypt intercepted
information
 The secret key can be shared with the receiver without sending it
electronically:
o Both parties could verbally share the key in person

o Both parties may use standard postage mail to share the key

o An algorithm may be used to calculate the key by sharing


secret non-key information
What is asymmetric encryption?
 Asymmetric encryption is when two keys are used, a public and private
key
o Public key: a key known to everyone

o Private key: a key known only to the receiver

 Both keys are needed to encrypt and decrypt information


 Asymmetric encryption works as follows:
o Person A uses a public key to encrypt their message

o Person A sends their message over the network or internet

o Person B decrypts the message using their secret private key

 Only one private key can be used to decrypt a message and it is not
sent over the internet like a symmetric key
 Keys can be large, a key using 100 bits would generate
1,267,650,600,228,229,401,496,703,205,376 different combination

You might also like