Chapter 2:
Data Transmission:
2.1 Types and Methods of Data Transmission
Data Packets:
Data sent over long distances is usually broken into smaller units called data
packets or datagrams, typically around 64 KiB in size, which are easier to
manage than a continuous stream of data.
Splitting data into packets allows each packet to be sent along a different route
to its destination, which is beneficial if a particular route is unavailable or busy.
The main drawback is the need to reassemble the data at the destination.
A typical packet is divided into three parts: a packet header, the payload, and a
trailer.
Header
Contains the IP Address of
sender
Contains IP Address of
receiver
Sequence number of the
packet
Packet size
Parts Of Data Packets
Payload
The payload is the actual
data being carried in the
packet (e.g., 64 KiB of data).
Trailer
The trailer includes a
method of identifying the
end of the packet
Contains some form of error
checking to ensure the
packet arrives error-free
(Cyclic Redundancy Check)
Packet Switching:
Packet Switching is a method where a message is broken into multiple packets,
and each packet can be sent independently from the start to the end point.
Routers at each network node determine the best route for each packet to
reach its destination using the destination IP address
Benefits:
No need to tie up a single communication line
Ability to re-route packets to overcome failed or busy lines
Easy expansion of usage
High data transmission rates are possible.
Drawbacks:
Packets can be lost and may need re-sending
The method is more prone to errors with real-time streaming.
Data Transmission Modes (Direction)
Simplex Data Transmission:
Data can be sent in one direction only (e.g., from a computer to a printer).
Half-duplex data transmission:
Data can be sent in both directions but not at the same time (e.g., a walkie-talkie).
Full-duplex data transmission:
Data can be sent in both directions simultaneously (e.g., broadband internet connection).
Types Of Data Transmission
Serial data transmission:
Data is sent one bit at a time over a single wire/channel
It works well over long distances, but at a slower rate than parallel transmission
Data arrives synchronized because only one channel is used. USB connections are an
example.
Parallel data transmission:
Several bits of data (usually one byte) are sent down several channels/wires all at the
same time
It works well over short distances, such as within a computer's internal circuits,
where high-speed transmission is essential
However, over longer distances (e.g., >20 meters), data can become skewed or
unsynchronized.
Universal Serial Bus (USB)
USB is a form of serial data transmission and has become a standard for data transfer
between devices and a computer.
USB supports both half-duplex and full-duplex data transmission.
When a new device is connected via USB, the computer automatically detects it and
looks for the appropriate device driver.
Benefits:
Devices are automatically detected, device drivers are loaded automatically
Connections fit only one way preventing incorrect connections
It is an industry standard with considerable support.
It is backward compatible
It has a power supply cable inbuilt and gets power from computer so doesn’t need
enteral power source
Drawbacks:
Standard USB has a maximum cable length of 5 meters (requiring USB hubs beyond
that).
USB-C:
A newer, smaller, and thinner symmetrical connector offering 100-watt power and
10 Gbps data transfer, supporting 4K video delivery.
It is backward compatible with USB 2.0 and 3.0 via adaptors.
2.2 Methods of Error Detection
Errors can occur during data transmission, leading to corruption or unintelligible data for a
computer. Various methods are used to detect these errors:
Parity Checks:
This method checks if data has been changed or corrupted based on the number of
1-bits in a byte of data.
Even parity: The parity bit is set so that the total number of 1-bits in the byte
(including the parity bit) is even.
Odd parity: The parity bit is set so that the total number of 1-bits in the byte
(including the parity bit) is odd.
The most significant (left-most) bit is usually reserved for the parity bit.
A limitation is that if two bits change value, the parity may still appear correct,
making it impossible to detect the error or its location.
Parity blocks: To overcome this, a block of data is sent with horizontal and vertical
parity checks, which can identify both that an error occurred and its location. A parity
byte is sent at the end of the block, composed of vertical parity bits.
Checksum:
A method to check for data changes or corruption after transmission.
Before transmission, a checksum value is calculated from the block of data using an
agreed algorithm.
This checksum is sent with the data block.
At the receiving end, the checksum is re-calculated and compared to the sent
checksum; if they don't match, an error is flagged.
Echo Check:
A method where the receiving computer sends a copy of the received data back to
the sender, allowing the sender to compare it with the original data.
Check Digits:
The final digit in a code, calculated from all other digits, used to detect data entry
errors (e.g., in barcodes, ISBNs, VINs). They can detect mis-typing or mis-scanning
errors, including transposition and wrong number errors.
Automatic Repeat Requests (ARQs):
A method for checking transmitted data errors using acknowledgement and
timeout.
If data is received correctly, an acknowledgement message is sent back to the sender.
If the sender does not receive an acknowledgement within a set timeout interval, it
automatically re-sends the data.
2.2 Symmetric and Asymmetric Encryption
Purpose of Encryption:
Encryption transforms data into an unreadable form for unauthorized parties, minimizing
the risk of sensitive or confidential information being understood if intercepted by an
eavesdropper or hacker.
Plaintext:
The original, unencrypted data.
Ciphertext:
The encrypted data resulting from an encryption algorithm.
Symmetric Encryption
Asymmetric Encryption
Definition
Uses a single key for both
encryption and decryption
Uses a pair of keys – public and
private
Keys Used
Same key for sender and receiver
Public key for encryption, private
key for decryption
Speed
Faster
Slower due to complex
algorithms
Security
Less secure if key is intercepted
More secure as private key is
never shared
Key Distribution
Key must be shared securely
No need to share the private key
Best Use Case
Encrypting large amounts of data
Secure key exchange, digital
signatures
Example
Algorithms
AES, DES, RC4
RSA, ECC, DSA
Complexity
Relatively simple
More complex and resourceintensive
Confidentiality
Maintained if key is kept secret
Maintained through key pair
separation
Public key: Made available to everyone and used to encrypt messages.
Private key: Known only to the computer user and used to decrypt messages encrypted
with the corresponding public key.
Asymmetric Encryption Process: