0% found this document useful (0 votes)
7 views

Chapter 2 Classwork Notes

Chapter 2 discusses data transmission, focusing on the structure of data packets, which include a header, payload, and trailer. It explains packet switching, its advantages, and various methods of data transmission, including serial and parallel transmission, as well as simplex, half-duplex, and full-duplex communication. The chapter also covers USB technology and error detection methods to ensure data integrity during transmission.

Uploaded by

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

Chapter 2 Classwork Notes

Chapter 2 discusses data transmission, focusing on the structure of data packets, which include a header, payload, and trailer. It explains packet switching, its advantages, and various methods of data transmission, including serial and parallel transmission, as well as simplex, half-duplex, and full-duplex communication. The chapter also covers USB technology and error detection methods to ensure data integrity during transmission.

Uploaded by

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

Chapter 2 – Data Transmission

The Structure of a Data Packet


When data is transmitted over a network, it is broken down into small units called packets to make
transmission manageable and efficient. Each packet consists of three main parts:
1. Packet Header
Contains essential information needed for successful delivery:
• Destination Address:
o Usually an IP address.
o Identifies where the packet is being sent.
• Packet Number:
o Indicates the position of the packet in the sequence.
o Allows the destination device to reassemble the data in the correct order.
• Originator’s Address:
o The IP address of the sending device.
o Useful for tracing and requesting retransmission if needed.
2. Payload
• This is the actual piece of data from the file being transmitted.
• Each packet carries a small portion of the total data.
3. Trailer (Footer)
Includes:
• End of Packet Marker:
o Indicates the end of the packet.
• Error Detection Data:
o Helps identify whether the packet has been corrupted during transmission.
Terminologies
internet protocol(IP) address: the unique address that is given to a device when it is connected to a
network.
packet: a small unit of data.
2.2 Packet switching
What is Packet Switching?
When data is transmitted over a network, it is broken into smaller units called packets.
The method used to send these packets is called packet switching.
Key Features of Packet Switching:
• Each packet is sent individually.
• Packets can travel different paths across the network.
• A router helps decide the best path for each packet.
• The packets may arrive out of order at the destination.
• Once all packets are received, they are reordered to recreate the original data.
Role of Routers:
• A router is a device that directs data packets through the network.
• At every step, the router decides the best path to send a packet toward its destination.
• Different packets can go through different routers depending on network conditions (e.g.,
traffic, errors).

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
Terminologies:
network: computers and devices that are joined together using cables or wireless technology.
router: a network component that examines a data packet to obtain its destination address and then
forward the packet to this address.
2.3 Methods of data transmission
There are different ways in which data can be transmitted between devices.
These methods are grouped into two categories:
1. Based on How Data is Sent:
Serial Data Transmission
In serial transmission, data is sent one bit at a time along a single wire from one device to another.

Advantages and Disadvantages of Serial Transmission


Advantages Disadvantages

Data is sent one bit at a time, so it arrives Data transmission is slower than parallel
in correct sequence. transmission.
Less chance of data skew or Requires extra bits (start and stop bits) to show
interference, meaning fewer errors. when transmission begins and ends.

Uses only one wire – cheaper to make


and buy.

more suitable for the transmission of data over long distances.


Parallel data transmission:
What is it?
• In parallel data transmission, data is sent across multiple wires at the same time.
• Each wire carries one bit, so multiple bits are transmitted simultaneously.

Advantages:
• Faster transmission: Since multiple bits are sent at once, data is transferred more quickly.
• Used inside computers: Many computers and devices use parallel transmission internally, so
there's no need to convert data to serial form.
Disadvantages:
• Data skew: Bits may arrive at slightly different times and need to be reordered, which can cause
errors.
• More interference: Using many wires increases the chance of electrical interference.
• Expensive: More wires mean cables are costlier to make and buy.
• Short-distance use only: Due to skew and interference, parallel transmission works best over short
distances (usually up to 5 meters).
Note:
Parallel transmission is fast but best for short distances. It’s commonly used inside computers, but not
ideal for long-distance communication.
2. The Direction of Transmission
• This category includes:
o Simplex
o Half-Duplex
o Full-Duplex
It refers to how data flows between devices — one way, two-way alternately, or two-way simultaneously.
Simplex Data Transmission
What is it?
• Data is sent in only one direction — from one device to another.
• A transmission method where data is transmitted in a single direction only.
• The receiver cannot respond or send data back.

Examples:
1. Keyboard to Computer
o The keyboard sends signals (key presses) to the computer.
o No data is sent from the computer back to the keyboard.
2. Television Broadcast
o The TV station sends signals to your television.
o Your TV just receives — it doesn’t send data back.
3. Radio Broadcast
o Radio stations transmit audio signals.
o Radios only receive — they don’t transmit anything back.
4. Fire Alarm System
o A sensor sends an alert to the central system.
o The sensor doesn’t receive data back from the system.
5. Microphone to Speaker (in a basic setup)
o The microphone sends audio signals to the speaker.
o The speaker doesn't send anything back.
6. Digital Billboard Display
o The control system sends data to update the billboard.
o The billboard doesn’t send anything back to the control system.
Half-Duplex Transmission
What is it?
• Data can be sent in both directions, but only one way at a time.
• A transmission method where data is transmitted in both directions , but only one direction at a
time.
• Devices take turns to send data.
• While one device is sending, the other must wait.
Key Point:
• Half-duplex is two-way, but not simultaneous.

Examples:
1. Walkie-Talkies
o You press a button to talk. The other person listens.
o To reply, they wait for you to stop, then press their button.
2. Two-Way Radios
o Often used by security teams, drivers, etc.
o Communication goes one way at a time.
3. Older Internet Communication (e.g., CB Radio Chat or Dial-Up Systems)
o Sent data in bursts in one direction, then switched.
4. Intercom Systems (Push-to-Talk)
o You press a button, speak, release, and then listen.
For advanced understanding:
• If two half-duplex channels are used at the same time (in opposite directions), it can simulate full-
duplex performance.
• This can be done using two separate communication lines.
How is it done?
• One channel sends data from Device A to Device B.
• Another channel sends data from Device B to Device A.
• These happen simultaneously, using two different lines or frequencies.
Examples:
1. Telephone Landlines
o In many traditional telephone systems, one wire pair carries your voice to the other person,
while another wire pair carries their voice back to you.
o Technically, it’s like using two half-duplex paths to create a full-duplex experience.
2. Two-Way Satellite Communication
o Uses one frequency to send data (uplink) and another to receive data (downlink).
o Each path is half-duplex, but both are active at once = full-duplex effect.
Full-Duplex Transmission
What is it?
• Data can be sent and received in both directions at the same time.
• A transmission method where data is transmitted in both directions at the same time.
• There is no need to wait for the other device to stop sending.

Key Point:
• Two-way, simultaneous communication – both devices can send and receive at the same time.
Examples:
1. Telephone Conversation
o Both people can talk and listen at the same time.
o It's full-duplex — like a natural conversation.
2. Video Calls (Zoom, Teams, FaceTime, etc.)
o You can speak while hearing the other person’s voice.
3. Mobile Phone Calls
o Similar to landlines — data flows in both directions continuously.
4. Modern Network Communication (e.g., Ethernet)
o Computers and servers send and receive data simultaneously for faster performance.
Types of Transmission Combinations
When two devices communicate, their connection is classified by:
1. The Direction of Transmission:
o Simplex
o Half-Duplex
o Full-Duplex
2. The Method of Sending Data Bits:
o Serial (one bit at a time)
o Parallel (multiple bits at once)
Examples of combinations:
• Serial Simplex – e.g., keyboard to computer
• Parallel Half-Duplex – e.g., older printers
• Serial Full-Duplex – e.g., phone calls over the internet

• Serial-Simplex
o Data is transmitted one bit at a time in a single direction on one wire
• Serial-Half-duplex
o Data can be transmitted in both directions on a single wire but only one bit at a time can be
transmitted in one direction at a time
• Serial-Full-duplex
o Data can be transmitted in both directions at the same time on a single wire one bit at a time
• Parallel-Simplex
o Multiple wires transmit one bit at a time in one direction
• Parallel-Half-duplex
o Multiple wires send multiple bits of data in both directions but only one direction at a time
• Parallel-Full-duplex
o Multiple wires send multiple bits of data in both directions at the same time

2.4 The Universal Serial Bus (USB) Interface – Student Notes


What is USB?
• USB stands for Universal Serial Bus.
• It is used to connect devices to a computer and transfer data.
Different USB Terms Explained:
USB Port
• The slot on a computer where you plug in a USB device or cable.
USB Cable
• A wire used to connect devices (like a mouse or printer) to a computer.
• Allows for data transfer and sometimes power delivery.
USB Device
• A device that uses the USB interface.
• Examples: USB pen drives, USB keyboard, USB mouse, external hard drives.
USB Connection
• The communication link between the computer and USB device.
• Uses serial data transmission – sends one bit at a time.
USB = Serial Transmission (but fast!)
• USB uses serial data transmission, just like sending one word at a time.
• BUT — it’s designed for high-speed transfer, unlike basic serial connections.
Examples:
• Plugging in a USB pen drive to transfer files.
• Using a USB charger to charge your phone.
• Connecting a USB mouse or keyboard to a laptop.
• Using a USB cable to transfer photos from your phone to your computer.
Advantages of USB Interface
1. Universal Standard
o USB is widely used – most computers and devices have USB ports.
2. Easy to Connect
o The cable only fits one way, so there are fewer connection errors.
3. Plug and Play
o When you plug in a USB device:
▪ It is automatically detected.
▪ Drivers (software) are usually downloaded the first time.
▪ Later, it works instantly—no need to reinstall drivers.
4. High-Speed Data Transfer
o USB connections allow for relatively fast transmission of data.
5. Power Supply Feature
o USB can power devices (like fans, lamps, speakers).
o It can also charge devices (like mobile phones, tablets).
Disadvantages of USB Interface
1. Limited Cable Length
o USB cables are usually limited to about 5 metres in length.
2. Not the Fastest Option
o While USB is fast, it’s not as fast as Ethernet for data transfer (especially in large
networks).

• 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
2.5 Detecting errors in data transmission
Why Do We Need Error Detection?
When data is sent from one device to another, things can go wrong due to:
• Interference
• Signal loss
• External noise
This may cause:
• Data to be lost
• Extra data to be added
• Data to change during transmission
Real-Life Problems Caused by Transmission Errors:
Error Problem That May Happen
Password is changed User may not be able to log in
Address is incorrect Important email or post may not reach the person
Customer details incorrect Product or service may not be delivered correctly
Accurate data is very important, so we use error detection methods to check if data was received
correctly.
Common Error Detection Methods:
1. Parity Check
o Adds an extra bit to the data to help check if bits were changed during transmission.
2. Checksum
o A calculated total from the data is sent along with the data.
o The receiving device calculates the total again to check if the data is correct.
3. Echo Check
o The receiver sends the data back to the sender.
o The sender checks if the returned data matches what was sent.
Parity check
What is a Parity Check?
A parity check is a simple method used to detect errors in data transmission by adding an extra bit called
the parity bit to each 7-bit data byte.
Parity Check: A type of error detection method that adds an additional bit (parity bit) to each byte to
ensure an odd or even total of 1s.
How It Works:
• The parity bit is added to make the total number of 1s in the byte either even or odd—depending
on the type of parity used.
There are two types of parity:
Type What it means
Even parity Total number of 1s (including parity bit) is even
Odd parity Total number of 1s (including parity bit) is odd

Structure of a Byte with Parity:

[Parity Bit] + [7 Bits of Actual Data]


Example: 1 0 0 0 0 0 1 0 → Total 1s = 2 (Even)
Example 1 – Odd Parity
Data: 0100100 (2 ones)
→ Add parity bit 1 to make total ones = 3 (odd)
Sent byte: 1 0100100
Example 2 – Even Parity
Data: 0110000 (2 ones)
→ Add parity bit 0 to keep total ones = 2 (even)
Sent byte: 0 0110000
Error Detection at the Receiver:
• The receiving device counts the number of 1s in the received byte.
• If the number does not match the expected parity (odd or even), then an error is detected.

How Does the Receiver Know Which Parity Method Is Used?


When devices communicate, they must agree in advance on how data will be sent. This includes:
Whether Even or Odd Parity is Used
Before transmission starts:
• The sender and receiver must agree on the parity method (even or odd).
• This setting is often pre-configured in the hardware or software that manages communication.
• It is usually part of the communication protocol (rules both devices follow).
Where is This Set?
• In serial communication, parity settings are defined in the transmission settings (e.g., in UART
communication: 8 data bits, no parity, 1 stop bit — written as 8N1, or 7 data bits + even parity as
7E1).
• For USB or other connections, it's handled automatically by the communication protocol used by
the system.
How do errors occur?
• When using parity bits, an error occurs when the number of total bits does not match the agreed
parity
• Bits can be flipped or changed due to interference on a wire or wirelessly due to weather or other
signals

A parity check may fail to detect an error if two or more bits are changed, but the total number of 1s
still matches the expected parity.
Checksum:
A checksum is like a math-based safety check for your data. It helps detect if anything went wrong during
data transmission.
• A checksum is a value that can be used to determine if data has been corrupted or altered
• It indicates whether data differs from its original form but does not specify where
• Checksums are calculated using an algorithm and the value is added to the transmission
• The receiving device re-calculates the checksum and compares to the original
• If the checksums do not match, it is assumed an error has occurred

How It Works:
1. Before transmission:
o A value is calculated from the data using a formula (e.g., modulus 11 or just adding
numbers together).
o This value is called the checksum.
o The checksum is sent along with the data.
2. After transmission:
o The receiver does the same calculation on the received data.
o It then compares the result to the checksum it received.
o If both match — the data is likely correct.
o If they don't — there was an error in transmission.

Real-Life Example:
Think of sending a package with a list of items written on a paper.
You add them:
"5 apples + 3 bananas + 2 oranges = 10 fruits"
You write 10 on the paper and send it.
If the person on the other side opens the box and counts only 9 fruits — they’ll know something’s missing
or wrong.
Message: 25,20,41
25+20+40 = 75 mod 10 = 5
Data sent = 25,20,41,5
Receiver check
Alternative method (add value , 1st complement then add it with data infront )
Echo Check
Definition:
An Echo Check is a method used to detect errors during data transmission between two devices.
A type of error detection method that sends a copy of the transmitted data back to the sender to be
compared with the original data sent.
How It Works:
1. The Sending Device sends data to the Receiving Device.
2. The Receiving Device sends the same data back to the Sending Device (this is called the echo).
3. The Sending Device compares:
o If the data matches → No error detected.
o If the data does not match → An error is detected.
Why Use Echo Check?
• To ensure data has been sent and received correctly.
• To detect errors in communication.
• Often used in networks, modems, and early data transmission systems.
Automatic repeat request (ARQ)
Definition:
When an error is detected after data transmission, the data often needs to be retransmitted to ensure it
arrives correctly.
A type of error detection method that uses acknowledgement and timeout to see if data has arrived
correctly after transmission.
How ARQ Works:
• After data is sent, the Receiving Device checks for errors.
• It sends back an Acknowledgement (ACK):
o Positive Acknowledgement: "Data received correctly!"
o Negative Acknowledgement: "Data had errors, please resend!"
• If the sending device doesn’t receive any reply within a set time (called a timeout), it assumes
something went wrong and retransmits the data.
Terminologies:
acknowledgement: a message that is sent from one device to another to indicate whether data is received
correctly.
timeout: a period of time that is set and used to wait for an acknowledgement to be received.
Positive Acknowledgement Method
The Sending Device sends the first data packet.
The Receiving Device receives the packet and checks for errors.
If the data is error-free, the Receiving Device sends a Positive Acknowledgement (ACK) back to the
sender.
When the Sending Device receives this ACK, it sends the next data packet.
If the Sending Device does not receive an ACK within a certain time (called a timeout):
• It resends the same data packet.
The device will keep resending the data packet until:
• It receives a Positive Acknowledgement, or
• It reaches a set maximum limit (example: 20 attempts). After that, it stops resending.
How the Negative Acknowledgement Method Works:
1. The Sending Device transmits the first data packet.
2. The Receiving Device receives the data packet and checks it for errors.
3. If no errors are found, the Receiving Device takes no further action.
4. If errors are detected, the Receiving Device sends a Negative Acknowledgement (NAK) back to
the sender.
5. When the Sending Device receives the NAK, it knows the data was received incorrectly and
resends the data packet.
6. The Sending Device sets a Timeout after sending each packet.
If no NAK is received during this period, it assumes the packet was received correctly and sends the
next data packet.

Checkdigit
What is a Check Digit?
A check digit is a special number added to data (like barcodes or ISBN numbers) to help detect errors
during data entry.
check digit: a type of error detection method that is used for data entry. A calculation is performed on the
data entered to create a value. Check digit values are compared to see if the data entered is correct.
Errors can happen when:
• A person types data manually (typing mistake).
• A machine scans data automatically (e.g., barcode scanners).
How a Check Digit Works:
1. A Check Digit is calculated from the original data before it is used (for example, in barcodes or
ISBN numbers).
This digit is stored along with the data.
2. When the data is entered or scanned, the check digit is recalculated from the entered data.
3. If the calculated check digit matches the stored check digit:
→ The data is correct!
4. If the two check digits do not match:
→ The data is incorrect and an error has happened.
Important:
• Check Digit is mainly used for detecting typing or scanning errors.
• Do not confuse this with a Checksum — although both detect errors, their methods and uses are
different!
Examples of Where Check Digits Are Used:
• Barcodes (used in shops for products).
• ISBN Numbers (used for books).
• Credit Card Numbers.
• National ID Numbers (in some countries).
2.6 Encryption
Why Protect Data During Transmission?
• When data is sent between devices (transmitted), it can be stolen by hackers.
• Personal information like names, bank details, and passwords is valuable.
• Hackers may try to steal this data and use it for personal gain.
What is Encryption?
• Encryption is a method used to protect data during transmission.
• It turns meaningful data into scrambled, unreadable code — so even if a hacker steals it, they
won’t understand it!
• A method of securing data for storage or transmission that scrambles it and makes it meaningless.
How Encryption Works:
Term Meaning
Plain Text The original, readable data (before encryption).
Encryption Key A special algorithm or code used to scramble the data.
Cipher Text The scrambled, unreadable data after encryption.
Decryption Using the key to turn cipher text back into plain text.

Key Points to Remember:


• Encryption does not stop hackers from stealing data.
• But it makes the stolen data meaningless unless the hacker also has the decryption key.
Two Main Types of Encryption:
1. Symmetric Encryption
The same key is used for both encryption and decryption.
Both sender and receiver must have the same secret key.
Process:
1. Plain Text is encrypted into Cipher Text using an Encryption Key.
2. The Cipher Text and Encryption Key are sent (usually separately) to the receiving device.
3. The same key is used by the receiver to decrypt the Cipher Text back to Plain Text.
Key Points:
• Simple and fast method.
• Suitable for personal data on your computer or storage device.
• Less secure for network communication because: → A hacker could intercept both the Cipher Text
and Key if sent across a network!

2. Asymmetric Encryption
Uses two different keys — a public key (for encryption) and a private key (for decryption).
Safer for online communication, since the private key is never shared.
Process:
1. Plain Text is encrypted into Cipher Text using the Public Key.
2. The Cipher Text is sent to the receiving device.
3. The Private Key (kept secret) is used to decrypt the Cipher Text back into Plain Text.
Key Points:
• Public Key: Shared openly; anyone can use it to encrypt data for you.
• Private Key: Kept secret; only you (or your device) use it to decrypt the data.
• More secure for communication over networks and the internet.
• Commonly used in email encryption, SSL/TLS certificates, and secure websites.
Extra Note on Asymmetric Encryption:
• The process can also work in reverse.
• A Private Key is used to encrypt and a Public Key is used to decrypt.
• This method is often used for Digital Signatures.
Digital Signatures:
• A Digital Signature proves that the data came from the correct sender.
• It ensures both:
1. Authenticity — the data is from a trusted source.
2. Integrity — the data has not been altered.
Where is this used?
• Digital Signatures are used in security protocols like:
o SSL (Secure Sockets Layer) — protects websites.
o You will learn more about this in Chapter 5: Applications of the Internet.

****************************

You might also like