IGCSE Computer Science: Data Transmission Study Notes
Data Transmission and Packet Switching
Data transmission (including text, images, and sound) is fundamentally essential for computer systems and networks.
Packet Switching is a primary method for transmitting data where a message is divided into multiple units called packets.
Key Characteristics of Packet Switching:
A message is divided into multiple data packets (also known as datagrams).
Each packet typically contains up to of data. This size simplifies management compared to sending long, continuous streams.
Each packet can be transmitted independently from the starting point to the endpoint.
Packets may take different routes to reach the destination. The path used depends on the routing decisions made by nodes (routers) encountered at various stages.
Each router uses the destination IP address to determine the most efficient route.
Selection of routes depends on:
The number of packets waiting to be processed at each node.
The shortest possible path available at that moment.
Packet Reassembly:
Upon reaching the destination, the individual packets must be reassembled into their original, correct sequence.
A major disadvantage is that data arrives out of order and needs processing time for reassembly.
Summary of Benefits and Drawbacks:
Benefits: No need to tie up a single communication line, which enables a high data transmission rate.
Drawbacks: Data may be lost, requiring re-transmission. This creates a delay at the destination while the receiving device re-orders packets.
Packet Structure and Cyclic Redundancy Checks (CRC)
A typical data packet is split into three main parts: the Header, the Payload, and the Trailer.
Packet Header (SSSR Mnemonic):
Sender IP Address: Identifies the source of the data.
Receiver IP Address: Identifies the destination.
Sequence Number: Ensures the packets can be reassembled in the correct order.
Size of the packet: Checks if all packets have arrived fully at the receiving station.
Packet Payload:
This is the actual data within the packet (e.g., a text string like "Have you done your homework").
Packet Trailer:
Contains markers to identify the end of the packet, allowing separation between packets.
Includes error-checking mechanisms to ensure the packet arrives error-free.
Cyclic Redundancy Checks (CRC):
Step 1: The sending computer adds up all the -bits in the payload and stores this value as a hexadecimal value in the trailer.
Step 2: The receiving computer recalculates the number of -bits in the payload upon arrival.
Step 3: The receiver compares its calculated hex value with the hex value stored in the trailer.
Step 4: If the values match, no error occurred. If they differ, an error is detected.
Data Transmission Types: Serial and Parallel
Data can be transmitted using different methods depending on the hardware and connections involved.
Serial Data Transmission:
Data is sent one bit at a time over a single wire or channel.
Bits follow each other in a continuous stream.
Example: A computer connected directly to a printer via a USB connection.
Advantages: Reliable over long distances; fewer errors occurring during transmission.
Disadvantages: Slow transmission speed because only one channel is utilized.
Parallel Data Transmission:
Several bits of data are sent simultaneously down several channels or wires.
Typically, each wire transmits one bit of a byte.
Example: Internal circuits within a computer system.
Advantages: Fast data transmission over short distances.
Disadvantages: Expensive due to multiple wires; prone to synchronization errors and "data skewing" (where bits arrive out of order despite being sent together).
Data Transmission Modes: Simplex, Half-Duplex, and Full-Duplex
Simplex Mode:
Data is sent in one direction only (Sender to Receiver).
Example: A computer sending a document to a printer.
Advantage: Uses full bandwidth for a single direction.
Disadvantage: No two-way communication is possible.
Half-Duplex Mode:
Data can be sent in both directions, but not at the same time.
Example: A Walkie-Talkie system where users say "Over" to switch directions.
Advantage: Enables two-way communication using full bandwidth.
Disadvantage: Significant delay in communication exchange.
Full-Duplex Mode:
Data can be sent in both directions simultaneously on the same line.
Example: A broadband internet connection or a telephone call.
Advantage: Fastest method with no delay since it often uses independent simplex channels for each direction.
Disadvantage: Some older networks may not be able to utilize this technology.
Universal Serial Bus (USB) Technology
USB Background:
A type of serial data transmission designed to replace older port types.
It is the most common input/output port on modern computers.
Supports both half-duplex and full-duplex transmission.
USB Cable Construction:
Consists of a four-wire shielded cable.
Power Wires: Two wires (Red and Black).
Data Wires: Two wires (White and Green) for transmission.
Connection Process:
The computer detects the device through a voltage change in the data wires.
The device is recognized, and the computer loads the appropriate driver software.
If a driver is missing, the user is prompted to download it.
USB-C (Specific Standard):
A -pin symmetrical connector that can be inserted either way.
Smaller/thinner than older versions.
Supports -watt (-volt) power delivery, enough to charge full-sized devices.
Supports data speeds up to and video delivery.
General USB Pros and Cons:
Pros: Ubiquitous; provides both power and data; backward compatible with adapters.
Cons: Speed is relatively slow compared to specialized internal connections; quality degrades with cable lengths exceeding .
Technical Necessity and Methods for Error Detection
Errors occur due to Interference (electrical noise in cables), Packet Switching Problems (lost packets), or Skewing (parallel bits arriving out of sync).
Parity Checks:
Counts the number of -bits in a data byte.
Even Parity: The total number of -bits must be even.
Odd Parity: The total number of -bits must be odd.
Parity Bit: The most significant (left-most) bit reserved for making the count even or odd.
Limitation: If an even number of bits (e.g., bits) are corrupted in one byte, the parity remains correct, and the error goes undetected.
Parity Block Check:
More robust than simple parity; involves sending multiple bytes with parity bits and adding a "Parity Byte" at the end.
The parity byte ensures each column of the block also complies with the parity (even or odd).
This allows for the precise identification and correction of single-bit errors.
Checksum:
A value calculated from a block of data using a predetermined algorithm.
The value is transmitted with the data.
The receiver recalculates the value; if it does not match the received checksum, an error has occurred.
Echo Check:
The receiver sends a copy of the received data back to the sender.
The sender compares the original with the returned copy.
Unreliable: If an error is found, it is unclear if it happened during the initial transmission or the return trip.
Automatic Repeat Request (ARQ):
Uses error detection codes and acknowledgments.
Positive Acknowledgment: Sent if data is correct.
Negative Acknowledgment: Sent if an error is found, requesting re-transmission.
Time-out: The sender waits a set time; if no acknowledgment is received, it re-transmits automatically until a limit is reached.
Check Digits:
A single digit added to a string (like ISBN or barcodes) to verify entry/input accuracy.
Detects: Incorrect digits, transposition (swapping digits), omitted/extra digits, or phonetic errors (thirteen vs. thirty).
ISBN-13 Calculation Method:
Add all odd-numbered digits (digits ).
Add all even-numbered digits (digits ) and multiply by .
Add the two results together.
Divide by to find the remainder.
If the remainder is , the check digit is . Otherwise, subtract the remainder from to find the check digit.
Data Security through Encryption
Purpose: Encryption does not prevent interception but makes the data meaningless/unintelligible to hackers.
Terminology:
Plaintext: The original, readable data.
Ciphertext: The scrambled, unreadable result of encryption.
Key: Information used by the algorithm to lock or unlock data.
Symmetric Encryption:
Uses a single shared key for both encryption and decryption.
Example: Caesar Cipher (shifting letters by a fixed value).
Main Challenge: Keeping the key confidential. If the key is intercepted, the security is compromised.
Asymmetric Encryption:
Uses two different but linked keys: a Public Key and a Private Key.
Public Key: Shared with everyone; used by the sender to encrypt the message.
Private Key: Kept secret by the receiver; used to decrypt the message.
This is more secure as the private key is never shared.
Questions & Discussion
Q: Describe how data is transmitted using half-duplex serial data transmission.
A: Data is sent down a single wire, one bit at a time. The data can be sent in both directions, but only one direction at a time (not simultaneously).
Q: State two benefits of using a USB connection.
A: It cannot be inserted incorrectly (symmetrical connectors like USB-C), supports different transmission speeds, is automatically detected (plug-and-play), downloads drivers automatically, and can power the device.
Q: Identify the byte transmitted incorrectly in an even parity system: Byte 1 (00110011), Byte 2 (01010100), Byte 3 (10110100), Byte 4 (01110111).
A: Byte 2 () is incorrect because it contains three -bits (odd count), while all other bytes have an even number of -bits.
Q: Explain what is meant by a check digit.
A: It is a validation method used to check data entry. A digit is calculated based on the data and appended to it. Upon input, the digit is recalculated; if the calculated digit differs from the appended digit, an error is detected.