0% found this document useful (0 votes)
4 views14 pages

CN Unit 2 imp q

Framing in the Data Link Layer organizes data into frames for reliable communication, with byte-oriented and bit-oriented protocols offering different methods for data packaging. Byte-oriented framing uses characters and requires byte stuffing, while bit-oriented framing utilizes bit sequences and bit stuffing, making it more versatile for various data types. Wireless LAN (WLAN) and Bluetooth technologies rely on these framing methods to ensure effective data transmission across networks.

Uploaded by

asatle231305.ec
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)
4 views14 pages

CN Unit 2 imp q

Framing in the Data Link Layer organizes data into frames for reliable communication, with byte-oriented and bit-oriented protocols offering different methods for data packaging. Byte-oriented framing uses characters and requires byte stuffing, while bit-oriented framing utilizes bit sequences and bit stuffing, making it more versatile for various data types. Wireless LAN (WLAN) and Bluetooth technologies rely on these framing methods to ensure effective data transmission across networks.

Uploaded by

asatle231305.ec
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/ 14

51.

FRAMING - BYTE AND BIT ORIENTED PROTOCOL

The Data Link Layer in networking is responsible for framing, which is the process of packaging data into
frames to facilitate reliable communication between nodes on a network. Each frame is distinguishable,
containing control information such as sender and receiver addresses, and error-checking bits to ensure data
integrity.

Framing is the process by which the data-link layer organizes data into frames to make transmission
manageable and distinguishable. The physical layer transmits raw bits, but framing ensures that these bits
are grouped so each frame can be recognized independently. This includes adding sender and destination
addresses to define communication endpoints.

Frames are usually smaller sections of data, reducing error impact—if an error occurs, only the affected
frame needs retransmission, not the entire message.

Frame Size: Frames can be fixed or variable in size. Fixed-size frames, as seen in ATM networks, do not
require boundaries. Variable-size frames, common in LANs, need a method to mark frame boundaries.

Character-Oriented Framing: In this approach, frames are composed of 8-bit characters (ASCII). A
special 1-byte flag at both ends of the frame marks its boundaries, aiding in start and end identification for
each frame.

Types of Framing

Framing can be categorized into Byte-Oriented (or Character-Oriented) Framing and Bit-Oriented
Framing. Each has unique approaches to ensure that frames are correctly interpreted by both the sender and
the receiver.

Byte-Oriented (Character-Oriented) Framing

In byte-oriented framing, data is packed in units called characters or bytes. This approach is commonly
used when the data consists of 8-bit characters, such as those in ASCII encoding.

1. Structure:
o A byte-oriented frame includes a header, data section, and a trailer.
o The header typically contains the source and destination addresses and other control
information, while the trailer contains error detection bits.
2. Frame Boundaries:
o A flag byte (usually 1 byte in size) is added at the beginning and end of each frame to mark
boundaries. This flag separates frames and prevents data confusion.
3. Byte Stuffing:
o When the data to be transmitted includes a byte with the same pattern as the flag, byte
stuffing is used.
o In byte stuffing, an extra byte, known as the escape (ESC) character, is added before any
byte that resembles a flag. This ensures that the actual data is not mistakenly interpreted as a
frame boundary.
o If the ESC character itself appears in the data, an additional ESC character is added to signify
that it is part of the data and not a flag.
4. Complications:
o Byte-oriented protocols are well-suited for ASCII-based text data. However, they face
challenges with multimedia data (audio, video, etc.), where encoding is not limited to 8-bit
characters.
o Furthermore, in systems that use larger character sets, such as Unicode (16-bit or 32-bit),
byte-oriented framing becomes less efficient, leading to a trend toward bit-oriented protocols.

Bit-Oriented Framing

In bit-oriented framing, frames are constructed from sequences of bits rather than bytes, making it highly
adaptable for various types of data, including text, images, and multimedia.
1. Structure:
o Similar to byte-oriented frames, bit-oriented frames include header information, a data
section, and optionally, a trailer for error detection.
o This approach does not rely on bytes as structural units, allowing for greater flexibility with
data encoding.
2. Frame Boundaries:
o To mark the start and end of a frame, an 8-bit flag pattern (01111110) is used as a delimiter.
This pattern signals the beginning and the end of a frame.
3. Bit Stuffing:
o Bit stuffing is used to avoid misinterpretation of data that contains the flag pattern.
o When the sender encounters five consecutive 1s in the data, it inserts an extra 0 bit to ensure
that the pattern does not match the flag. This prevents confusion between actual data and
frame delimiters.
o At the receiver’s end, the extra stuffed 0 is removed, preserving the original data pattern.
4. Advantages:
o Bit-oriented framing is not dependent on character encoding standards and can accommodate
varied data types.
o The flexibility of bit-oriented framing allows it to support both low-level text and multimedia
data with greater efficiency.

Comparison: Byte-Oriented vs. Bit-Oriented Framing

Feature Byte-Oriented Framing Bit-Oriented Framing


Data Structure Characters (8-bit bytes) Bits
Boundary Marker Flag byte Flag pattern (01111110)
Stuffing Method Byte stuffing (escape character) Bit stuffing (0 after five 1’s)
Best Use Case Text and ASCII-based data Multimedia, graphics, and diverse data
Encoding Compatibility Limited to 8-bit characters Supports varied encoding schemes

Summary

Framing is essential for differentiating messages and ensuring reliable data transmission at the data-link
layer. Byte-oriented framing relies on characters and requires byte stuffing, which can be challenging with
multimedia. Bit-oriented framing uses bit sequences and bit stuffing, making it versatile and efficient for
various data types. Together, these protocols form the backbone of data-link layer communication,
supporting both error detection and frame synchronization to maintain robust and consistent data transfer
across networks.
2. WIRELESS LAN - 802.11

Wireless LAN (WLAN) is a widely used technology for providing wireless connectivity, allowing devices
to connect without cables. WLANs are commonly found in colleges, offices, and public places, driven by
the rapid growth in wireless communication technology. The IEEE 802.11 standard governs WLANs,
covering both physical and data-link layers. Often referred to as "wireless Ethernet," WLAN is also known
as WiFi, a term popularized in the United States. WiFi Alliance, a global nonprofit, certifies devices that
meet WiFi standards.

IEEE 802.11 WLAN Architecture

The architecture of IEEE 802.11 WLAN consists of two types of services:

1. Basic Service Set (BSS)


2. Extended Service Set (ESS)

Basic Service Set (BSS):

 BSS serves as the fundamental building block of WLAN, comprising wireless stations and optionally
an access point (AP).
 Types of BSS:
o Ad Hoc Architecture: Stations form a network without an AP, communicating directly
within the BSS.
o Infrastructure BSS: Includes an AP, allowing for broader network access.

Extended Service Set (ESS):

 ESS is made up of multiple BSSs connected via a distribution system (wired or wireless).
 It includes two types of stations:
o Mobile stations: Regular stations within a BSS.
o Stationary stations: APs connected to a wired LAN.
 Communication between a station in a BSS and one outside occurs via the AP.

Types of Station Mobility

The IEEE 802.11 standard categorizes stations based on their mobility:

1. No-transition mobility: Station remains within a BSS.


2. BSS-transition mobility: Station can move between BSSs within the same ESS.
3. ESS-transition mobility: Station can move between different ESSs (continuity is not guaranteed).

MAC Sublayer in IEEE 802.11

The MAC sublayer in IEEE 802.11 defines two protocols:

1. Distributed Coordination Function (DCF)


o Uses CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) as the access
method.
o Frame Exchange Process:
 RTS/CTS Handshake: To avoid collisions, the sender requests to send (RTS) and the
receiver replies with clear to send (CTS).
 Network Allocation Vector (NAV): A timer preventing other stations from using the
channel during transmission.
2. Point Coordination Function (PCF)
o An optional, centralized access method using polling, typically implemented in an
infrastructure network.
o Allows priority access for time-sensitive traffic.
o Repetition Interval: Combines PCF (contention-free) and DCF (contention-based) traffic.

Frame Structure and Types

The IEEE 802.11 MAC frame includes nine fields, of which key fields are:

 Frame Control (FC): Identifies frame type and other control information.
 Duration/ID: Defines transmission duration or ID.
 Addresses: Contains up to four address fields depending on frame type.
 Sequence Control: Manages fragmentation and order of frames.
 Frame Body: Contains payload information.
 Frame Check Sequence (FCS): Ensures error detection.

Frame Types:

1. Management Frames: Handle initial communication between stations and APs.


2. Control Frames: Manage channel access and acknowledgment.
3. Data Frames: Carry data and control information.

Addressing Mechanism

IEEE 802.11 uses four addressing fields depending on the values of To DS and From DS:

 Case 1: Direct communication within a BSS (To DS = 0, From DS = 0).


 Case 2: Frame originates from AP to a station within the BSS (To DS = 0, From DS = 1).
 Case 3 and 4: Other combinations for AP-to-AP or multi-ESS communication.

This structure supports seamless communication within and across WLANs, enabling robust connectivity
solutions.
3. BLUETOOTH

Bluetooth is a wireless technology designed for creating short-range networks among diverse devices, such
as phones, computers, and peripherals, allowing them to communicate seamlessly. It operates on a concept
of forming spontaneous networks, known as ad hoc networks. When Bluetooth-enabled devices come
within range, they detect each other automatically and can form a network, or piconet. Originally developed
by Ericsson and named after the Danish king Harald Blaatand (Bluetooth), it’s now widely used in
numerous applications, from wireless peripherals to medical monitoring.

2.7.1 Bluetooth Architecture

The architecture of Bluetooth is designed around two main network types:

1. Piconet: This is the core Bluetooth network structure, where up to eight devices—one primary and
up to seven secondary devices—can communicate. The primary device controls the synchronization,
and communication can be one-to-one or one-to-many. Devices not actively communicating stay in
a parked state, waiting to be activated by the primary device.
2. Scatternet: Multiple piconets can link together to form a larger, interconnected network called a
scatternet. In this setup, a device may serve as a secondary device in one piconet and act as a primary
device in another, effectively bridging the two networks.

2.7.2 Bluetooth Devices

Bluetooth devices are equipped with short-range radio transmitters, enabling a maximum data rate of 1
Mbps over the 2.4 GHz ISM band. Since this frequency range is shared with other devices, Bluetooth may
experience interference, particularly with IEEE 802.11b Wi-Fi networks.

2.7.3 Bluetooth Layers

Bluetooth’s protocol stack is divided into various layers, with L2CAP (Logical Link Control and
Adaptation Protocol) being equivalent to the LLC layer in traditional LANs. It’s responsible for handling
data transfer, with specific functions for:

 Multiplexing: Managing data from multiple sources and directing it appropriately.


 Segmentation and Reassembly: Breaking down large data packets and reassembling them at the
destination.
 Quality of Service (QoS): Ensuring reliable data transfer by adjusting for varying conditions.
 Group Management: Enabling logical group formation similar to multicasting.

Baseband Layer

The Baseband Layer corresponds to the MAC layer in traditional LANs, utilizing TDMA (Time-Division
Multiple Access) for communication slots, each lasting 625 microseconds. Bluetooth uses a TDD-TDMA
scheme, allowing half-duplex communication through time slots assigned alternately for sending and
receiving data.

2.7.4 Communication Modes in Bluetooth

Bluetooth supports two communication setups:

1. Single-Secondary Communication: If only one secondary device exists, the communication


alternates between the primary and secondary in even and odd slots, respectively.
2. Multiple-Secondary Communication: When multiple secondary devices are connected, each one
listens to the primary in even slots. However, only one responds in odd slots if the message is
directed to it.

2.7.5 Link Types in Bluetooth

Bluetooth supports two link types, based on the priority of latency or data integrity:

 SCO (Synchronous Connection-Oriented) Link: Prioritizes low latency, ensuring timely data
delivery for applications like audio, though it sacrifices error correction.
 ACL (Asynchronous Connectionless) Link: Prioritizes data integrity, resending corrupted packets
but with slightly higher latency.

2.7.6 Frame Format

Bluetooth frames come in one-slot, three-slot, or five-slot formats. A slot is the basic time unit of 625
microseconds, with different frame types offering varying data capacities. Each frame includes:

 Access Code: Used for synchronization and identifying the primary device.
 Header: Contains subfields for addressing, type, flow control, acknowledgment, sequencing, and
error correction.
 Payload: Carries the main data, which can be up to 2740 bits.

2.7.7 Radio Layer

The radio layer of Bluetooth operates in the 2.4 GHz ISM band, divided into 79 channels of 1 MHz each. It
employs Frequency Hopping Spread Spectrum (FHSS) to reduce interference, hopping 1600 times per
second.

2.7.8 Modulation

Bluetooth uses Gaussian Frequency Shift Keying (GFSK) for signal modulation. A frequency deviation
above or below the carrier frequency represents bits 1 and 0, respectively. This efficient modulation
enhances Bluetooth’s data transmission reliability and reduces the chance of data loss.
4. ARP

The Address Resolution Protocol (ARP) is a crucial protocol in the Network layer of the OSI model. Its
primary role is to map a device's logical address (IP address) to its physical address (MAC address) to
facilitate communication over the network. Here’s a detailed explanation of ARP's operation, components,
and functionality:

1. Introduction to ARP

 Most applications use IP addresses to identify devices on a network. However, the actual
communication on a local network happens using MAC (Media Access Control) addresses, which
are unique identifiers at the Data Link layer (Layer 2) of the OSI model.
 ARP bridges this gap by translating IP addresses into MAC addresses. This ensures that a device can
locate the hardware address (MAC address) corresponding to an IP address on the local network
before initiating communication.

2. How ARP Works

 When a device needs to send data to another device, it checks its local cache to see if the IP address-
to-MAC address mapping is already available. If not, ARP initiates a process to discover the MAC
address.
 ARP works by sending a broadcast request packet to all devices in the local network. The request
asks, "Who has IP address X.X.X.X?" This broadcast packet contains the sender's IP and MAC
addresses and the target’s IP address.

3. ARP Request and Reply Mechanism

 ARP Request: The ARP request is sent in a broadcast frame so that all devices in the network
receive it. Each device checks if the requested IP address matches its own.
 ARP Reply: Only the device with the matching IP address responds. It sends an ARP reply directly
(unicast) to the requester, containing both its IP address and MAC address.
 After receiving the ARP reply, the source device now has the necessary MAC address of the
destination device. This information is then used to encapsulate the data packet at the Data Link
layer for transmission.

4. Caching Mechanism

 ARP uses a caching mechanism to store IP-to-MAC address mappings temporarily. Once a mapping
is obtained, it is cached to reduce the frequency of ARP requests, enhancing efficiency.
 Each entry in the ARP cache has a limited lifetime and is periodically refreshed. If an IP-to-MAC
mapping is not used for a set period, it is removed from the cache to free up space.

5. ARP Packet Format

 An ARP packet consists of the following fields:


o Hardware Type: Specifies the type of hardware used at the Data Link layer. Ethernet is
designated as type 1.
o Protocol Type: Specifies the protocol at the Network layer. IPv4 is represented by 0x0800.
o Operation Code: Defines the type of ARP packet (request or reply).
o Sender Hardware Address and Sender Protocol Address: Contains the MAC and IP
addresses of the sender.
o Target Hardware Address and Target Protocol Address: Contains the MAC and IP
addresses of the intended receiver.
 The ARP packet is encapsulated within an Ethernet frame for transmission across the network.

6. Types of ARP

 Proxy ARP: A device (usually a router) responds to an ARP request on behalf of another device,
useful in segmented networks.
 Gratuitous ARP: A device sends an ARP request for its own IP address to check for IP conflicts or
to update other devices’ ARP tables.
 Inverse ARP (InARP): Allows a device to determine another device's IP address when only its
MAC address is known. Commonly used in Frame Relay networks.

7. Advantages of ARP

 Efficiency in Address Resolution: Quickly retrieves the MAC address, enabling smooth
communication at the Data Link layer.
 Seamless Device Communication: Devices can communicate without manual configuration of
MAC addresses.
 Reduced Network Traffic: By caching resolved addresses, ARP minimizes the need for repeated
broadcasts.

8. Limitations and Security Concerns

 Vulnerability to ARP Spoofing: Malicious actors can impersonate another device by sending false
ARP replies, leading to Man-in-the-Middle attacks.
 Scalability Challenges: In large networks, frequent ARP broadcasts can increase network traffic,
affecting performance.
 Limited Lifetime of Cache Entries: The ARP cache entries need periodic refreshing, which can
introduce delays if entries are not available.

9. ARP in Network Communication

 ARP is essential for efficient IP-to-MAC address translation, making it fundamental in both IPv4
networks and local Ethernet-based LANs. It ensures that packets are routed correctly at the Data
Link layer, bridging the IP layer with the physical layer.

10. Conclusion

 ARP is a simple yet vital protocol that enables network communication by linking logical IP
addresses to physical MAC addresses. While it provides crucial functionality in local network
environments, network administrators should implement security measures like Dynamic ARP
Inspection (DAI) to mitigate vulnerabilities associated with ARP-based attacks.

Diagram of ARP Request and Reply: In a typical ARP interaction, Device A (IP: X) broadcasts an ARP
request, asking for the MAC address of Device B (IP: Y). Device B responds with its MAC address,
allowing Device A to communicate with Device B at the Data Link layer.

This detailed explanation of ARP covers its purpose, functioning, packet format, and importance in modern
networks, providing a complete overview suitable for a comprehensive 15-mark answer.
5. STOP AND WAIT PROTOCOL

Introduction
The Stop-and-Wait Protocol is a fundamental data transmission method that provides essential flow and
error control. It is often used in situations where simplicity is prioritized, ensuring that each frame is
acknowledged before sending the next one. This protocol is widely applicable for simple data link control
tasks, where reliable data delivery is essential.

The protocol operates on a basic principle: after sending each frame, the sender pauses and waits for an
acknowledgment from the receiver. If the acknowledgment is received within a set time, the sender
transmits the next frame. Otherwise, it retransmits the previous frame, assuming the data was either lost or
corrupted.

Mechanics of the Stop-and-Wait Protocol

1. Frame Transmission and Timer


o The sender sends a single data frame to the receiver and immediately starts a timer.
o The timer specifies the maximum time the sender will wait for an acknowledgment from the
receiver.
o If the acknowledgment arrives before the timer expires, the sender stops the timer and
proceeds to send the next frame.
o If the timer expires before the acknowledgment is received, the sender assumes the frame was
either lost or corrupted during transmission and retransmits the frame.
2. Error Control
o Error control in Stop-and-Wait is achieved by incorporating a Cyclic Redundancy Check
(CRC) in each frame. This CRC detects any corruption in the transmitted data.
o When the receiver receives a frame, it checks the CRC. If the data is valid, it sends an
acknowledgment (ACK) back to the sender.
o If the CRC is incorrect, indicating data corruption, the receiver discards the frame and sends
no acknowledgment. This lack of response serves as an implicit notification to the sender that
the frame needs retransmission.
o This "silent discard" approach simplifies error handling but can result in delays since the
sender must wait for the timer to expire before retransmitting.
3. Flow Control
o Flow control is inherently managed in the Stop-and-Wait Protocol, as the sender transmits
only one frame at a time and waits for an acknowledgment before proceeding.
o This approach prevents the sender from overwhelming the receiver with data, as the protocol
ensures that only one frame is in transit at any given time.
o The flow control mechanism is simple and effective, especially in cases where network
congestion or limited buffer space could disrupt data transmission.
4. Acknowledgments and Retransmissions
o The Stop-and-Wait Protocol uses a basic acknowledgment-based scheme, ensuring that each
frame reaches the receiver before the next frame is sent.
o The receiver sends an ACK for each successfully received frame.
o If an acknowledgment is not received within the set time, the sender retransmits the frame.
This retransmission ensures that data eventually reaches the receiver, even if errors or
temporary disruptions occur.
Advantages of Stop-and-Wait Protocol

1. Simplicity and Ease of Implementation


o The Stop-and-Wait Protocol is one of the simplest protocols to implement. It requires
minimal computational overhead and is easy to understand, making it suitable for basic data
link layer implementations.
2. Reliable Delivery
o The protocol provides reliable data transmission by using acknowledgments and
retransmissions. If a frame is lost or corrupted, the sender resends it, ensuring that every
frame reaches the receiver successfully.
3. Flow Control Benefits
o By waiting for an acknowledgment after each frame, Stop-and-Wait naturally limits the data
flow, preventing the sender from overwhelming the receiver’s buffer capacity. This is
beneficial in networks with limited resources or low buffer capacities.

Disadvantages of Stop-and-Wait Protocol

1. Inefficiency on High-Latency Links


o The Stop-and-Wait Protocol is inefficient on networks with high latency, such as satellite or
long-distance terrestrial links. Due to its wait-and-acknowledge approach, the sender remains
idle during each waiting period, leading to considerable downtime and underutilization of
bandwidth.
2. Low Throughput
o Since only one frame is sent at a time, Stop-and-Wait often leads to low throughput. In
networks with high data rates, the protocol’s restrictive frame-by-frame transmission can
significantly limit data flow, reducing overall performance.
3. Inability to Handle Large Data Volumes Efficiently
o The protocol’s one-frame-at-a-time approach is not suitable for applications that require high
data throughput. For applications where large volumes of data need to be transmitted
efficiently, protocols with more sophisticated flow control, such as sliding window protocols,
are more appropriate.

Example of Stop-and-Wait Protocol

Imagine a sender and receiver communicating using Stop-and-Wait:

1. The sender sends Frame 1 and starts a timer.


2. The receiver gets Frame 1, checks its integrity using CRC, and, if no errors are found, sends an
ACK.
3. Upon receiving the ACK for Frame 1, the sender sends Frame 2.
4. If Frame 2 is corrupted or the ACK is lost, the sender will not receive the expected acknowledgment
before the timer expires.
5. The sender, realizing the timeout, resends Frame 2, assuming it was either lost or corrupted in transit.

Conclusion
The Stop-and-Wait Protocol is a straightforward but effective method for ensuring reliable data
transmission. It provides fundamental flow and error control by transmitting frames sequentially and using
acknowledgments for each frame. While this simplicity is advantageous in low-latency or small-scale
networks, the protocol’s limitations in efficiency and throughput make it unsuitable for high-latency or high-
volume data networks. In these cases, more advanced protocols, like sliding window mechanisms, offer
better alternatives.
6. ERROR DETECTION - CHECKSUM, CRC AND. PARITY CHECK

Introduction
Error detection techniques play a critical role in ensuring data integrity across networks and communication
channels. These methods identify whether data has been corrupted during transmission, allowing the system
to request a retransmission or take corrective action. Three primary techniques—Checksum, Cyclic
Redundancy Check (CRC), and Parity Check—are widely used due to their simplicity and effectiveness.

1. Checksum
The checksum method is an error-detection technique primarily used in network protocols (like TCP/IP) to
verify data integrity.

 Process:
o Data is divided into fixed-sized segments (e.g., 16 or 32 bits).
o All segments are added together using binary addition.
o The sum, called the “checksum,” is then appended to the data and sent to the receiver.
o At the receiver end, the data segments are added again, and the result is compared with the
transmitted checksum.
o If the values match, the data is assumed to be correct; if not, an error is detected.
 Example:
Suppose the data is divided into four 8-bit segments:
o Data segments: 1001 0101, 1100 1100, 0111 0010, and 0011 1010
o Sum: 1001 0101 + 1100 1100 + 0111 0010 + 0011 1010 = 10110 0001
o The carry (1) is added back, resulting in the checksum: 0110 0001.
 Advantages:
o Simple to implement.
o Effective for detecting small errors (single-bit errors).
 Disadvantages:
o Less effective for detecting certain error types (e.g., if errors occur in multiple segments).

2. Cyclic Redundancy Check (CRC)


CRC is a more robust error-detection method than checksum and is widely used in digital networks and
storage devices. It detects errors by treating data as a polynomial and performing division with a predefined
“generator polynomial.”

 Process:
o Data is represented as a binary polynomial.
o A predefined generator polynomial (e.g., 1011 for a 4-bit CRC) is used to divide the data
polynomial.
o The remainder of this division becomes the CRC value, appended to the data before
transmission.
o At the receiver end, the same generator polynomial divides the received data.
o If the remainder (CRC) is zero, the data is assumed to be error-free; otherwise, an error is
detected.
 Example:
Suppose we have data bits 11010011101100 and a 4-bit generator polynomial 1011.
o Data is padded with three zero bits to match the generator length, becoming
11010011101100000.
o Division is performed using XOR operations, resulting in a remainder, which is the CRC.
o The remainder (e.g., 0010) is then appended to the data.
 Advantages:
o Highly reliable and can detect burst errors (i.e., errors affecting multiple bits).
o Used in protocols like Ethernet and Bluetooth due to its high detection rate.
 Disadvantages:
o Complex to implement in software without hardware support.
o Slightly slower compared to parity checks due to division calculations.

3. Parity Check
Parity Check is the simplest form of error detection, often used for single-bit error detection in memory
systems and simple communications.

 Process:
o An additional bit (parity bit) is added to the data to make the total number of 1s in the data
even (even parity) or odd (odd parity).
o If using even parity, the parity bit is set to 1 if the total number of 1s in the data is odd (to
make it even).
o If using odd parity, the parity bit is set to 1 if the total number of 1s in the data is even (to
make it odd).
o At the receiver, the parity bit is checked by counting the number of 1s.
o If the parity doesn’t match, an error is detected.
 Example:
o For an 8-bit data 10011010 using even parity:
 The total number of 1s is 4 (even), so the parity bit is set to 0 to maintain even parity.
 Data sent: 100110100.
 If one bit flips during transmission, the parity will be odd, indicating an error.
 Advantages:
o Extremely simple and fast to implement.
o Useful for single-bit error detection.
 Disadvantages:
o Ineffective for detecting burst errors or errors involving an even number of bit flips.
o Limited application in high-reliability systems due to low detection accuracy.
Comparison of Checksum, CRC, and Parity Check

Feature Checksum CRC Parity Check


Complexity Moderate Higher Low
Error Moderate (good for small High (effective for burst Low (only detects single-bit
Detection errors) errors) errors)
Data link layers, digital
Usage Networking (e.g., TCP/IP) Simple memory checks
storage
Efficiency Moderate High High

Conclusion
Error detection mechanisms are essential in maintaining data integrity during transmission. While Checksum
provides a simple approach to error detection suitable for networking, CRC offers higher reliability and can
detect burst errors, making it ideal for more complex systems. Parity Check, while basic, is useful for low-
complexity systems that require minimal error detection capabilities. Each method has strengths and
weaknesses, and the choice of technique depends on the application’s requirements for complexity,
reliability, and efficiency.

You might also like