Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Character - Oriented Framing and Bit - Oriented Framing
Framing is a Data Link layer function that encapsulates packets from the Network Layer into frames. Data frames can be of fixed or variable length. In variable-length framing, frame sizes may differ, so a pattern of bits serves as a delimiter to mark frame boundaries.
The two types of variable-sized framing are:
- Character-oriented framing
- Bit-oriented framing
Character-Oriented Framing
In character-oriented framing, data is transmitted as a sequence of bytes using an 8-bit coding system like ASCII. This approach treats data as a stream of characters rather than individual bits.
The frame components include:
Frame Header ? Contains source and destination addresses in byte format.
Payload Field ? Contains the message data as a variable sequence of bytes.
Trailer ? Contains bytes for error detection and correction.
Flags ? Frame delimiters (1 byte each) marking frame start and end using protocol-specific special characters.
Character-oriented protocols work well for text transmission. However, when transmitting multimedia data, the flag byte pattern may appear within the message. To prevent false frame boundary detection, byte stuffing is used ? an escape character (ESC) is inserted before any data byte matching the flag pattern.
Disadvantages
- High overhead due to byte stuffing mechanism
- Conflicts with modern 16-bit or 32-bit character encoding systems
Bit-Oriented Framing
In bit-oriented framing, data is transmitted as a sequence of bits, allowing interpretation as both text and multimedia data in upper layers. This approach provides more flexibility than character-oriented framing.
The frame structure includes:
Frame Header ? Contains source and destination address bits.
Payload Field ? Contains the message as a variable sequence of bits.
Trailer ? Contains error detection and correction bits.
Flags ? 8-bit patterns (typically
01111110) serving as frame delimiters.
Since bit-oriented protocols can transmit any bit sequence, flag patterns may appear in the data. Bit stuffing prevents this issue: whenever five consecutive 1s are followed by a 0 in the message, an extra 0 is inserted after the five 1s. The receiver removes these stuffed 0s during frame processing.
Comparison
| Feature | Character-Oriented | Bit-Oriented |
|---|---|---|
| Data Unit | Bytes (8-bit characters) | Individual bits |
| Flag Format | Special character | Bit pattern (01111110) |
| Stuffing Method | Byte stuffing with ESC | Bit stuffing after 5 consecutive 1s |
| Best Use Case | Text transmission | Any data type (text/multimedia) |
Conclusion
Character-oriented framing works well for text data but has limitations with modern encoding and multimedia content. Bit-oriented framing provides greater flexibility by handling any bit sequence efficiently, making it more suitable for diverse data transmission requirements.
