2.
Data transmission
Paper 1
Unit 4 - Completely
Unit 3- 3.1 to 3.3
(Network hardware not included)
Paper -2 Psudocode
Unit-7
Flowchart
Error finding
Test data
Tracetable
Unit -8
Except file handling
2.1 Types of methods of data transmission
2.1.1 What is a packet?
Data sent over long distances is usually broken up into data packets (sometimes
called datagrams).
The packets of data are usually quite small, typically 64KiB
Benefits
Efficiency- It is much easier to control than a long continuous stream of data.
Error- Detection Packet-based transmission enables error detection and recovery mechanisms,
Drawbacks
Ordering Challenge: Packets may take different paths through the network and arrive out of
order at the destination, requiring extra effort to reassemble them in the correct sequence.
Structure of a packet
A typical packet is split up into:
» a packet header
» the payload
» a trailer.
Header includes
the IP address of the sending device
» the IP address of the receiving device
» the sequence number of the packet
» packet size
the payload consists of the actual data being sent in the packet
Packet trailer consists of
some way of identifying the end of the packet;
an error checking method; cyclic redundancy checks (CRCs)
this involves adding up all the 1-bits in the payload and storing this as a hex value
– the computer then checks this value against the one sent in the trailer
– if the two values match, then no transmission errors have occurred;
otherwise the packet needs to be re-sent.
Packet switching
Packet switching
● Packet switching is a method of data transmission in which a message is
broken up into a number of packets.
● Each packet can then be sent independently from start point to end point.
● At the destination, the packets will need to be reassembled into their correct
order (using the information sent in the header).
● At each stage in the transmission, there are nodes that contain a router.
● Each router will determine which route the packet needs to take, in order to
reach its destination (the destination IP address is used in this part of the
process).
https://www.youtube.com/watch?
v=O7CuFlM4V54
Few more points
» each packet will follow its own path (route)
» routers will determine the route of each packet
» routing selection depends on the number of packets waiting to be processed
at each node
» the shortest possible path available is always selected
>> packets can reach the destination in a different order to that in
which they were sent.
The benefits of packet switching are:
» there is no need to tie up a single communication line
Not like circuit switching in telephone lines
» it is possible to overcome failed, busy or faulty lines by simply re-routing
packets
» it is relatively easy to expand package usage
System can be extensively scaled for new users, new devices,
» a high data transmission rate is possible.
The drawbacks of packet switching include:
» packets can be lost and need to be re-sent
» the method is more prone to errors with real-time streaming (for example, a
live sporting event being transmitted over the internet)
» there is a delay at the destination whilst the packets are being re-ordered.
Hopping
● Cause of Packet Bouncing:
○ Occurs due to network congestion, routing errors, or other technical issues.
○ Packets may bounce between routers without reaching their destination.
● Impact on Network:
○ Increases the number of lost or bouncing packets.
○ Leads to network performance deterioration.
● Solution – Hopping Mechanism:
○ Each packet is assigned a “hop number” in its header.
○ This number represents the maximum times a packet can travel through routers.
● How Hopping Works:
○ As a packet passes through each router, its hop number is decreased by 1.
○ When the hop number reaches zero, the packet is discarded.
● Purpose of Hopping:
○ Prevents packets from bouncing endlessly in the network.
○ Helps avoid routing loops and improves overall network efficiency.
Explain how packet switching could be used to download a large web page from a website.
POINT TO BE COVERED
Concepts of packets,
Packets travel individually
Router, Node
Destination-Reassembling of the packets
Once the reassembly is complete, the user's device has the complete web page data. The device can now
render the web page in a web browser
2.1.2 Data transmission
» 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).
Simplex data transmission
Simplex mode occurs when data can be sent in ONE DIRECTION ONLY (for
example, from sender to receiver).
An example of this would be sending data
from a computer to a printer.
Half-duplex mode
Half-duplex mode occurs when data is sent in BOTH DIRECTIONS but NOT AT
THE SAME TIME (for example, data can be sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’
along the same transmission line, but they can’t both be done at the same time).
An example of this would be a walkie-talkie where a message can be sent in one.
Full-duplex mode
Full-duplex mode occurs when data can be sent in BOTH DIRECTIONS AT THE
SAME TIME (for example, data can be sent from ‘A’ to ‘B’ and from ‘B’ to ‘A’
along the same transmission line simultaneously).
Serial 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.
,
Examples-Serial data transmission
When you connect a USB device, such as a keyboard, mouse, or printer, to your computer, serial data
transmission is used. Each bit of data is sent one after the other in a sequential manner. USB cables
have multiple wires for power and data, but data is transmitted serially.
Bluetooth Communication:
Fiber Optic Communication:
Ethernet Connection:
connections between a computer and a modem using the RS-232 protocol .
Parallel data transmission
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:
Example:send information from computer to
printer.
Examples-Parallel data transmission
Memory Interfacing: In computers, memory modules like RAM (Random
Access Memory) often use parallel data transmission. When data needs to be
read from or written to memory, multiple bits are transferred simultaneously to
increase data transfer speed.
Printers with Parallel Ports: As mentioned earlier, older printers often used
parallel ports to connect to computers. Parallel transmission allowed printing
of characters and images at a faster rate compared to serial transmission.
Digital Cameras: Some digital cameras used parallel data transmission when
connecting to computers for data transfer. This allowed for quicker transfer of
large image files from the camera's memory to the computer.
Comparison:
● Serial transmission uses a single communication line, while parallel
transmission uses multiple lines.
● Serial transmission is often slower compared to parallel transmission.
● Parallel transmission can be faster, but it requires more wires and can be
sensitive to timing differences between the wires.
In modern technology, serial transmission is more common due to its simplicity
and ability to work with longer distances without signal loss. However, parallel
transmission is still used in certain applications where speed is crucial, but it's
becoming less common due to its complexity and susceptibility to signal
interference.
Parallel Data Transmission:
Advantages:
Faster Transmission: Parallel data transmission is faster compared to serial transmission as
multiple bits are sent simultaneously.
Effective for Short Distances: It works well over short distances, such as within a computer's
internal circuits where the distance between components is very short.
Efficient for High-Speed Data: Internal computer components require high-speed data
transmission, and parallel transmission meets this requirement effectively.
Disadvantages:
Skewed Data Over Long Distances: Over longer distances, like 20 meters or more, data can
become skewed. This means data can arrive unsynchronized, and bits may reach the
destination out of order.
Out-of-Order Bits: The longer the wire used for transmission, the worse the problem of bits
arriving out of order becomes.
Limitation in Long-Distance Use: Due to synchronization and order issues, parallel transmission
becomes less practical for data transmission over longer distances.
Serial data transmission
Advantages:
Effective for Long Distances: Serial data transmission is well-suited for long distances, making it suitable
for communication between devices located far apart.
Less Prone to Synchronization Issues: Unlike parallel transmission, serial transmission faces fewer
synchronization issues over long distances. Bits remain synchronized due to the sequential nature of
transmission.
Simplicity in Wiring: Serial transmission requires fewer wires compared to parallel transmission, making it
simpler to implement and manage.
Disadvantages:
Slower Transmission: Serial data transmission is generally slower than parallel transmission as it sends
one bit at a time.
Not Ideal for Short Distances: Over very short distances, serial transmission might not be as efficient as
parallel transmission due to its slower speed.
Limited for High-Speed Data: It might not be as suitable for transmitting extremely high-speed data, such
as within a computer's internal components where faster transmission is essential.
USB- Universal Serial Bit transmissions
● Universal serial bus (USB) is a form of serial data transmission
● It allows both half-duplex and full-duplex data transmission
● It's used to connect various devices like printers, keyboards, and
phones to the computer.
USB cable
A USB cable has four wires inside a protective covering. Two of these
wires (red and black) provide power to the connected device. The other
two wires (white and green) are used for sending and receiving data.
Connecting a Device:
● The computer senses the device's presence. This is because there's a tiny
change in the voltage on the data wires of the USB cable.
● The computer identifies what type of device you've plugged in. It does this
by recognizing the device and loading special software called a "device
driver." This driver helps the computer and the device understand each
other.
● If the computer hasn't seen this type of device before, it might ask you to
install the right driver. Sometimes, this happens automatically, and you'll see
a message asking if you're okay with that.
USB- Advantages
● Automatic Device Recognition: Devices plugged into USB ports are automatically
detected by the computer.
● Industry Standard and Compatibility: USB is widely adopted and works with various
devices, operating systems, and manufacturers.
● Reliable Data Transmission: USB includes error-checking mechanisms for accurate and
error-free data transfer.
● Power Supply and Data Transfer: USB cables provide both data transmission and power
supply to connected devices.
● Variable Data Transfer Rates: USB supports different data transfer rates to match
different device communication needs.
● Backward Compatibility: Older USB devices can usually work with newer computers and
vice versa.
USB - Disadvantages
● Limited Cable Length: Standard USB cables have a maximum effective
length, restricting longer connections.Standard USB only supports a
maximum cable length of 5 m; beyond that, USB hubs are needed to extend
the cable length
● Slower Data Transfer Rates for Some Versions: Certain USB versions might
have slower data transfer rates compared to other methods.
● even though USB is backward compatible, very early USB standards (V1)
may not always be supported by the latest computers
Types of usb connectors
USB-C connector
● USB-C Connector:
● USB-C is a new type of USB connector.
● It has 24 pins and is symmetrical, fitting into a USB-C port in either orientation.
● Compact Design:
● USB-C is smaller and thinner compared to older USB connectors.
● Power Capability:
● USB-C offers 100 watts (20 volts) power connectivity.
● Full-sized devices can be charged using USB-C.
● High Data Transfer Rate:
● USB-C can carry data at 10 gigabits per second (10 Gbps).
● This high speed allows support for activities like 4K video delivery.
● Backward Compatibility:
● USB-C is backward compatible with USB 2.0 and 3.0.
● Compatibility requires a suitable adapter to bridge the connection.
● Universal Industry Standard:
● USB-C is expected to become the new industry standard format.
● Its versatility, compatibility, and features contribute to its adoption.
USB-C is a significant advancement in USB technology, offering improved charging capabilities, faster
data transfer rates, and a universal design that simplifies connections and enhances compatibility.
2.2 Methods of error detection
2.2.1 The need to check for errors
Errors can occur during data transmission due to:
» interference (all types of cable can suffer from electrical interference, which
can cause data to be corrupted or even lost)
» problems during packet switching (this can lead to data loss – or it is even
possible to gain data!)
» skewing of data (this occurs during parallel data transmission and can
cause data corruption if the bits arrive out of synchronisation).
There are a number of ways data can be checked for errors following
transmission:
» parity checks
» checksum
» echo check.
Parity checks
This method is based on the number of 1-bits in a byte of data
Two types
Even parity and odd parity
Even parity
Consider the byte
Here the parity bit is 0 because it has already even number of 1s
0 0 1 1 0 0 1 1
Parity bit
Consider the byte
Here the parity bit is 0 because it has already even number of 1s
1 1 1 0 1 0 0 0
Parity bit
Here the parity bit is 1 because because it has odd number of parity bits
Odd parity
Consider the byte
Here the parity bit is 1 because it has even number of 1s
1 0 1 1 0 0 1 1
Parity bit
Consider the byte
Here the parity bit is 0 because it has already even number of 1s
0 1 1 0 1 0 0 0
Parity bit
Here the parity bit is 1 because because it has odd number of parity bits
● The parity checking protocol 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
Error finding using parity checking
Consider Sender and receiver are used an even parity.
Drawback of Parity checking
● Parity checks only check that an error has occurred, they do not reveal
where the error(s) occurred
Parity bytes and parity blocks
● Parity checks do not pinpoint errors in data, only that an error has
occurred
● Parity blocks and parity bytes can be used to check an error has occurred
and where the error is located
○ A parity block consists of a block of data with the number of 1’s
totalled horizontally and vertically
○ A parity byte is also sent with the data which contains the parity bits
from the vertical parity calculation
● Below is a parity block with a parity byte at the bottom and a parity bit
column in the second column
Example
In this example, nine bytes of data have been transmitted.
Agreement has been made that even parity will be used.
Another byte, known as the parity byte, has also been sent.
This byte consists entirely of the parity bits produced by the vertical parity
check.
The parity byte also indicates the end of the block of data.
Validation
DEFINITION: Validation aims to make sure that data is sensible,
reasonable, complete and within acceptable boundaries.
If you enter ‘Smithe’ instead of ‘Smith’ or ‘07/08/07’ instead of
‘08/07/07’ no amount of validation in the world will pick up that
human error.
Verification
Verification means to check that the data on the original source
document is identical to the data that you have entered into the system
or object document.
https://www.teach-ict.com/as_a2_ict_new/ocr/
AS_G061/311_data_info_knowledge/validation_verification/miniweb/
pg11.htm
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.
SHA-2 (224, 256, 384, 512) :
Checksum
A checksum is a method used to check if data has been changed or corrupted following data transmission.
>> when a block of data is about to be transmitted, the checksum is calculated from the block of data
» the calculation is done using an agreed algorithm (this algorithm has been agreed by sender and receiver)
» the checksum is then transmitted with the block of data
» at the receiving end, the checksum is recalculated by the computer using the block of data (the agreed algorithm is used to
find the checksum)
» the re-calculated checksum is then compared to the checksum sent with the data block
» if the two checksums are the same, then no transmission errors have occurred;
otherwise a request is made to re-send the block of data.
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 on products, such as International
Standard Book Numbers (ISBN) and Vehicle Identification Numbers
Check digits are used to identify errors in data entry caused by mis-typing
or mis-scanning a barcode.
Modulo 11 and ISBN 13( Textbook Page no 62)
Differences between checksum and Check digit
Purpose:
● Checksum: A checksum is a value calculated from a dataset to ensure data
integrity during transmission. It is used to detect errors in data transmission or
storage by comparing the calculated checksum with the received or stored
checksum.
● Check Digit: A check digit, on the other hand, is a single digit added to a
numerical code, such as a barcode or identification number, to detect errors
during manual entry or scanning. It helps ensure accurate data entry and
reduces the likelihood of transcription errors.
Application:
● Checksum: Checksums are commonly used in network communication, file
transfers, and data storage systems to verify that data remains intact during
transmission or storage. They can be applied to both textual and binary data.
● Check Digit: Check digits are often used in applications where numerical
codes are manually entered or scanned, such as barcodes on products,
ISBNs, credit card numbers, and identification numbers. They are designed to
catch errors introduced during data entry or scanning processes.
Calculation Method:
● Checksum: Checksums are calculated using mathematical algorithms that
process the entire dataset. The result is a value that represents a summary of
the data, often in the form of a hash or a combination of characters.
● Check Digit: Check digits are calculated based on specific algorithms tailored
to the format of the data being used. The algorithm generates a single digit
that is appended to the end of the code, and its value is determined to ensure
that the final code meets a certain validation criterion
Modulo 1
Sender side Receiver end
2.2.4 Automatic Repeat Requests (ARQs)
ARQ (Automatic Repeat reQuest) is a method to ensure accurate data
transmission. It employs acknowledgements - signals sent to confirm correct
receipt of data, and a timeout (waiting for a response). The data contains an
error check code, usually a Cyclic Redundancy Check, to spot errors.
● No errors: Positive acknowledgement sent.
● Errors detected: Negative acknowledgement triggers re- transmission
request.
A timeout prompts the sender to resend within a set time if no response is
received. This process continues until a positive acknowledgement is obtained or
a predetermined limit of re-transmissions is reached.
ARQ is common in mobile networks to ensure data accuracy
2.3 Symmetric and asymmetric encryption
Purpose of encryption
● During data transmission in public networks (wired/wireless), interception
risk exists, with hackers referred to as eavesdroppers.
● Encryption minimizes this risk by transforming data into unreadable form
for unauthorized recipients.
● Encryption doesn't prevent interception but renders data incomprehensible
to eavesdroppers.
● Vital for sensitive/confidential data (e.g., credit cards, medical records) to
safeguard privacy.
● Ensures security for personal, financial, and legal information.
Plaintext and Ciphertext
Symmetric encryption
The word 'symmetric' is used because the same key is
used for both encryption and decryption.
Simple Denary Encryption Key:
Utilizes a 10-digit denary (decimal) encryption key.
Each digit corresponds to a specific shift value.
Shifts each letter in a word by the respective digit's
value.
Example key: 4 2 9 1 3 6 2 8 5 6.
Example key: 4 2 9 1 3 6 2 8 5 6.
Encryption Process:
Encrypts a message by shifting letters according to the key.
Encryption is done by adding the key digits to the corresponding letters.
Decryption Process:
Decrypts the ciphertext to obtain the original message.
Requires applying the reverse of the encryption key.
Each letter is shifted back by subtracting the key digits.
Example: Ciphertext "GQVQXZGZSCIENCE5642913XMGW" decrypts to
● Encryption Key Strength:
A simple 10-digit denary key provides 10 billion possible combinations.
Modern computers can easily crack this type of encryption in seconds.
To enhance security, modern encryption uses 256-bit binary keys.
A 256-bit key yields approximately 1.2 x 10^77 possible combinations.
The potential threat of quantum computers further challenges encryption
security.
● Key Secrecy Challenges:
The main drawback of symmetric encryption is key secrecy.
Both sender and recipient need the same encryption key.
Sending the key via email or text can lead to interception.
Maintaining key secrecy is essential for security.
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).
https://teach-ict.com/2016/
A_Level_Computing/
OCR_H446/1_3_exchanging_data
134_encryption/miniweb/pg4.php
Sending Private Message using Public-Key Encryption:
Step 1: Bob's Intent:
● Bob wants to send a private message to Jim securely.
Step 2. Requesting Public Key:
● Bob asks Jim for his public key.
● Public keys are designed to be shared openly, so Jim sends it
over the public network.
3. Public Key Encryption:
● Bob receives Jim's public key.
● He uses his public key to encrypt the private message he wants
to send.
● The encryption process scrambles the message using Jim's
public key.
Transmitting Encrypted Message:
● Bob sends the encrypted message over the public network.
● Even though the encrypted message is intercepted, it
remains secure due to the strength of the encryption.
Importance of Private Key:
● Only Jim possesses the private key associated with his public
key.
● The private key is used for decrypting messages that were
encrypted with his public key.
6. Decryption Process:
● Jim receives the encrypted message.
● He uses her private key to decrypt the message.
● Decrypting with his private key reverses the encryption, making the
original message readable.
7. Security Assured:
● Even if others know Jim's public key, they cannot decrypt the message
without his private key.
● Public-key encryption provides a secure way to send private messages
over public networks.
8. Key Distribution Solution:
● Public-key encryption addresses the challenge of key
distribution in symmetric encryption.
● No need to transmit a secret key; only the recipient's
public key is required.
9. Benefits:
● Enhanced security: Even if a malicious actor intercepts
the message and has access to the public key, they
cannot read the content without the private key.
● Simplified key management: Each participant has their
own key pair, eliminating the need for sharing secret
keys.
10. Note:
● While public-key encryption is secure, the strength of
the encryption relies on the quality of the keys and the
algorithm used.
The public key is used to encrypt messages, but it can't be used to
decrypt them.
So it's safe to send across the internet to anyone. To decrypt a message
encoded with the public key, you need to have the second, private, key.
This is never sent across a network, so it remains secret and safe.
Example