6.
3 Signal Encoding and Modulation
Encoding digital data using two voltage levels:
Data bits can be represented by two voltage levels (amplitudes), e.g., one level for 0 and
another for 1.
Other signal elements:
Besides voltage levels, data can be encoded by changing:
o Frequency (how often the signal oscillates)
o Phase (the shift in the wave pattern)
o Also, changing the speed of signal elements (how fast the signal changes).
Need for synchronization:
Transmitter and receiver must be synchronized to correctly interpret data timing. Without
synchronization, errors occur because the receiver may misread when bits start and end.
o Usually done by transmitting a clock signal alongside data.
Manchester encoding:
o Voltage changes (low to high or high to low) in the middle of each bit period.
o This helps with synchronization and error detection.
o Modulation Techniques
Modulation: Technique to send info by modifying characteristics of a carrier
electromagnetic wave:
o Amplitude Modulation (AM): Carrier’s amplitude changes with the data signal;
frequency and phase stay the same.
o Frequency Modulation (FM): Carrier’s frequency changes with the data signal.
o Phase Modulation (PM): Carrier’s phase changes with the data signal.
Digital-to-Analog Modulation: For digital data modulating an analog carrier:
o Amplitude Shift Keying (ASK): Carrier amplitude switches between two levels
to represent binary 1 and 0.
o Frequency Shift Keying (FSK): Carrier frequency switches to represent binary
data.
o Phase Shift Keying (PSK): Carrier phase changes to represent binary data.
Synchronization – Short Note
Synchronization is used to make sure that data streams are sent and received
correctly between two devices.
Usually, a clock signal is sent together with the data stream to help keep the timing
correct.
o This process is important to maintain proper signal timing so that the devices
can understand the data without errors.
Signal Encoding Schemes
Non-return to Zero Level (NRZ-L):
Uses two voltage levels for 0 and 1, voltage stays constant during the bit time.
Non-return to Zero Inverted (NRZ-I):
A transition (change) in voltage level represents a 1, no change represents a 0.
Manchester encoding:
Voltage changes halfway through the bit period (either low to high or high to low).
Error Control and Detection
Errors in transmission: Data bits can flip or change during transmission due to noise or
interference.
Error detection: Identifies when a bit has been corrupted.
Error correction: Fixes the corrupted bits to recover the original data.
Parity Check:
o Adds an extra bit (parity bit) to the data.
o The parity bit is set to make the total number of 1s either even (even parity) or
odd (odd parity).
o Helps detect if a bit error has occurred.
6.6 Local Area Network (LAN):
A LAN connects computers within a small area like a home, school, or university
campus.
Identifying devices (MAC addresses):
o MAC addresses are unique 48-bit addresses for each network interface.
o They are divided into 6 blocks separated by colons (e.g., 4A:8F:3C:4F:9E:3D).
o Each block is 8 bits, split into two 4-bit parts, shown in hexadecimal.
o MAC addresses help identify devices and ensure data reaches the right receiver.
Frames:
o At the Data Link layer, data is packaged into frames.
o A frame contains the data plus the MAC address of the sender and the next
device.
o Frames are created based on the quality of the connection between devices.
Protocol:
o A protocol defines how data is formatted and exchanged between devices.
o Medium Access Control (MAC) protocols control access to shared
communication channels.
o In bus topology, many devices share one medium, and MAC protocols prevent
data collisions by managing access order.
ALOHA, Slotted ALOHA, and Ethernet:
o ALOHA is a basic protocol for sharing a communication medium.
o Slotted ALOHA improves on ALOHA by dividing time into slots to reduce
collisions.
o Ethernet uses CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) to allow multiple devices to share the medium efficiently and avoid
collisions.
Broadcast and Unicast of messages:
o Broadcast sends messages to many recipients at once.
o Unicast sends messages directly from one computer to another using the
recipient’s unique address.
6.7 Gateway:
A gateway is a router that has all the information needed to route packets to their destination.
IP Address:
IP addresses are unique addresses assigned to each device on a network.
IPv4 is 32 bits long and can address about 4 billion devices.
IPv6 is 128 bits long and can address a huge number of devices.
Dotted Decimal Notation:
For easier reading, IP addresses are written in dotted decimal form.
The 32-bit IP is divided into 4 groups of 8 bits (octets).
Each octet is a decimal number between 0 and 255.
The octets are separated by dots.
Example: 11000000 10100000 00100000 0000101 → [Link]
Class D and Class E:
Two other classes used for multicast and experimental purposes.
Assignment of IP Addresses:
All devices on the same network share the same address prefix assigned by a central
authority (like ISPs).
The unique suffix for each device is assigned locally by the network admin.
Sub-netting:
A technique to solve IP address depletion in 32-bit addresses.
Each network gets a subnet mask to identify it uniquely.
All devices in a subnet share the same subnet mask.
Classless Inter-Domain Routing (CIDR):
Allows organizations to have any number of IP addresses instead of full class A, B, or C
blocks.
Helps reduce the growth of routing tables.
The Vanishing IP Address Space:
IPv4 has only 2^32 addresses and is running out due to high demand.
IPv6 solves this with a much larger address space.
Private IP Addresses:
Three ranges reserved for private use (not routed on the internet):
[Link] – [Link] ([Link]/8) — 16 million addresses
[Link] – [Link] ([Link]/12) — 1 million addresses
[Link] – [Link] ([Link]/16) — 64 thousand addresses
Dynamic Host Configuration Protocol (DHCP) Server:
Automatically assigns IP addresses to devices joining the network instead of manual assignment.
Finding Path to the Destination:
Data travels through routers to reach the destination.
Routing finds efficient paths between source and destination.
Routers communicate with each other and maintain routing tables showing reachable
destinations.
They exchange routing tables regularly to update route info.
Packet Switching:
Messages are broken into smaller chunks called packets.
Each packet has unique info and switching data in its header.
Packets are sent independently and may take different paths to the destination
6.8 Ports and Multiplexing:
Many network applications can run on the same computer.
To send data to the correct application on the destination machine, each application uses
a unique interface called a port.
Each port has a port number.
The combination of an IP address and a port number uniquely identifies a running
process on a device.
When different processes on different computers send data to the same destination, the IP
address plus port number ensures the correct process is identified.
This combining of IP addresses and port numbers to identify processes is called
multiplexing.
User Datagram Protocol (UDP):
UDP is a simple, no-frills transport protocol.
Used by applications like DNS and SNMP.
It is not connection-oriented, meaning it does not establish a connection before sending
data.
UDP does not have congestion control.
It does not guarantee ordered delivery of data.
Transmission Control Protocol (TCP):
TCP provides reliable, in-order delivery of data.
It is connection-oriented, meaning it establishes a connection before sending data.
Uses sequenced acknowledgments and retransmits lost packets.
Commonly used by applications like the web (HTTP) and email.
6.9🌐 DNS Process – When Accessing [Link]
🧭 Step 1:
You type [Link] in your browser. The browser contacts a DNS server.
🧭 Step 2:
Your ISP’s DNS server checks for the IP address (e.g., [Link]).
It sends a request up the DNS hierarchy, starting with the root server.
🧭 Step 3:
The .com DNS server points to the authoritative DNS server for [Link].
That server replies with the IP address.
🧭 Step 4:
The DNS server sends the IP ([Link]) back to your browser.
🧭 Step 5:
Your browser uses HTTP/HTTPS to send a request to the IP.
The server responds with the website content, which appears in your browser.
DNS lookup uses UDP – fast but not very secure.
Final website request uses HTTP/HTTPS, based on TCP/IP – secure and reliable.
A server computer stores a significant amount of data required by client computers.
The server provides various services to client computers.
When a client computer in a network requests specific data or services,
The server delivers the requested data or services to the client computer.
6.11 Threats to Computer Systems
Viruses: Programs that enter a system and run harmful tasks without the user's
knowledge.
Trojans: Malicious programs that trick users to enter the system by pretending to be
safe.
Malware: Software made to cause harm or damage to computers.
Phishing: A method of stealing sensitive info (like passwords or credit card numbers) by
pretending to be a trusted source.
Protection Against Unauthorized and Malicious Access
Firewalls: Block unauthorized access to or from a private network.
Antivirus Software: Finds and isolates harmful software trying to damage a computer.
User Awareness:
o Users must be educated on safe computer practices.
o Use strong passwords.
o Keep antivirus software regularly updated to protect against threats.