Unit No 3
Unit No 3
3.0 Introduction
A communication system must be able to transform data from one device to another with accuracy. Data can be
corrupted during transmission. For reliable transmission, errors must be detected and corrected.
Consider a communication system in which the transmitted bit stream is 101101110. The transmitted electrical signal
corresponding to this bit stream and the received waveform are shown in Fig. 3.1. Due to noise introduced in the
transmission medium, the electrical signal is distorted. The receiver determines whether a 1 is transmitted or a 0 is
transmitted. In this case, the receiver decodes the bit stream as 101001010. At two places, the received bit is in error: 1
has become 0 in both places.
Transmission Impairments
For the above situation/condition, data communication requires error correction and detection methods. Error
detection and correction are essential processes in data communications and networks that ensure the integrity and
reliability of data transmitted across networks.
Error detection identifies errors in data transmission, while error correction allows a receiver to reconstruct the original
information when it has been corrupted during transmission.
Wireless communication is the fastest growing and most vibrant technological area in the communication field. Wireless
communication has evolved significantly over the years, with each generation (3G, 4G, and 5G) of mobile technology
introducing new capabilities and improvements.
Errors in the data are basically caused due to various impairments that occur during the process of transmission. When
an imperfect medium or environment exists in the transmission, it is prone to errors in the original data.
The three types of impairments or errors that can occur during transmission are:
1. Distortion
Distortion occurs when the received signal is different from the transmitted signal. Distortion means that the signal
changes its form or shape. The distortion of electrical signals occurs as they pass through metallic conductors. Delay
distortion occurs in guided medium. All frequency components of the signal may not "travel" at the same speed, which
can cause distortion.
2. Attenuation
Attenuation means loss of energy. In attenuation, the signal strength reduces over time. When a signal travels through
the transmission medium, it loses some of its energy to overcome the resistance of the medium.
3. Noise
Noise refers to unintentional voltages introduced onto a transmission line by various phenomena such as heat or
electromagnetic induction created by other sources. Due to noise, it is difficult to retrieve the original data or
information.
Noise is generated by all electrical and electronic devices, including motors, fluorescent lamps, power lines, etc., and can
interfere with the transmission of signals on a network.
3.1.1 Errors in Data Transmission
Errors can be introduced in data transmission by signal attenuation, signal distortion, noise, and so on. Errors occur due
to imperfections in the transmission media and in the operation of the network.
An error is defined as "any flaw or deviation that occurs while the information is transmitted from the source to the
destination in a computer network."
Types of Errors
Understanding the types of errors that can occur in data communications and network data transmission is crucial for
implementing effective error detection and correction techniques.
1. Single-bit Error
The term single-bit error means that only 1 bit of a given data unit (such as a byte, character, or packet) is changed from
1 to 0 or from 0 to 1.
Single-bit errors are relatively common and can arise/occur due to various factors such as electrical noise, interference,
or hardware malfunctions/issues.
Fig. 3.2 shows a single-bit error that occurs when one bit in a data unit is altered/modified during transmission, changing
from 0 to 1 or from 1 to 0.
2. Burst Error
The term burst error means that two or more bits in the data unit have changed from 0 to 1 or from 1 to 0.
The occurrences of burst errors include prolonged noise, signal degradation, or synchronization issues during
transmission.
Fig. 3.3 shows a burst error that involves the alteration/modification of two or more bits (multiple bits) in the data unit.
Data can be corrupted during transmission; for this reason, some techniques require that errors be detected and
corrected.
Error detection is the process of detecting errors caused by transmission impairments like noise during transmission
from sender to receiver. Error correction is the process of detecting errors and reconstructing the original, error-free
data.
Forward error correction is the process in which the receiver tries to guess the message by using redundant bits.
Correction by retransmission is a technique in which the receiver detects the occurrence of an error and asks the sender
to resend the message. The resending is repeated until a message arrives that the receiver believes is error-free.
Redundancy is an important concept for detecting and correcting errors during data transmission.
To be able to detect and/or correct errors in data transmission, we need to send extra bits (redundant bits) with the
data. These redundant bits are added by the sender and removed by the receiver.
Redundancy is achieved through various coding schemes like block coding and convolution coding.
The sender adds redundant bits through a process that creates a relationship between the redundant bits and
the actual data bits.
The receiver checks the relationships between the two sets of bits to detect or correct the errors.
3.2 Framing
Framing in data communications and networks uses frames (data bit streams) to send/receive data. Framing works by
breaking data into smaller, manageable units called frames.
1. Frame Header: It contains the source and destination addresses of the frame
Framing is essential for efficient data transfer because it allows for error detection and correction. By dividing the data
into smaller frames, if any frame is lost or corrupted during transmission, only that specific frame needs to be
retransmitted rather than the entire data packet.
Additionally, the header information helps in error checking and ensuring that the data is delivered accurately to the
intended recipient.
Frames can be of fixed or variable size. Framing can be of two types: fixed-size framing and variable-size framing.
In fixed-size framing, the size of the frame is fixed. In variable-size framing, each frame can have a different size.
Advantages of Framing:
1. Framing provides error detection and correction which ensure the integrity of the transmitted data over the
computer network.
2. Framing also helps ensure network security by preventing unauthorized access to data.
3. By dividing the total data into smaller frames, framing makes data transmission more efficient and lowers
network congestion, improving overall performance.
Disadvantages of Framing:
1. Framing adds overhead to the main data stream, which in turn reduces the content of actual data that can be
transmitted over the network.
2. Framing sometimes leads to delay in large networks, as multiple frames are transferred simultaneously.
The size of the frame is fixed in fixed-size framing. In fixed-size framing, there is no need for defining the boundaries of
the frames (the size itself can be used as a delimiter).
An example of fixed-size framing is the ATM WAN, which uses frames of fixed size called cells.
1. Fixed-size framing is simple and efficient, as all frames are of the same size.
2. Fixed-size framing also makes it easier to manage network resources, as it ensures that each frame takes up the
same amount of bandwidth.
3. It is used in high-speed networks where a large amount of data is being transmitted simultaneously.
1. Fixed-size framing may not be suitable for all types of data like video or audio data.
2. It can introduce additional overhead because some frames may contain unused space.
Variable-size framing involves dividing the data into frames of varying sizes. In variable-size framing, we need a way to
define the end of one frame and the beginning of the next.
An example of variable-size framing is Local Area Networks (LANs). Two approaches are used for this framing purpose: a
character-oriented approach and a bit-oriented approach.
In this type of framing, data to be carried are 8-bit characters from a coding system such as ASCII. The header, which
normally carries the source and destination addresses and other control information, and the trailer, which carries error
detection redundant bits, are also multiples of 8 bits.
To separate one frame from the next, an 8-bit (1-byte) flag is added at the beginning and the end of a frame. The flag,
composed of protocol-dependent special characters, signals the start or end of a frame.
Byte-oriented framing was popular when only text was exchanged by the data-link layers. The flag could be selected to
be any character not used for text communication.
Now, however, we send other types of information like graphics, audio, and video; any character used for the flag could
also be part of the information. If this happens, the receiver, when it encounters this pattern in the middle of the data,
thinks it has reached the end of the frame. To fix this problem, a byte-stuffing strategy was added to byte-oriented
framing.
In byte stuffing or character stuffing, a special byte is added to the data section of the frame when there is a character
with the same pattern as the flag. The data section is stuffed with an extra byte.
Character stuffing is the process of adding one extra byte whenever there is a flag or escape character in the text. Each
frame starts and ends with special bytes, called flag bytes.
The same bit pattern may occur in the data, creating confusion between control information and data. This is called a
lack of data transparency. Data transparency in data communication means we should be able to send any combination
of bits as data.
The sender's DLL (Data Link Layer) inserts a Special Escape Byte (ESC) just before each accidental flag byte in the data.
The DLL on the receiving end removes the ESC byte before the data are given to the network layer. This technique is
called byte stuffing or character stuffing (Example: BSC - Binary Synchronous Communication).
In this type of framing, the data section of a frame is a sequence of bits to be interpreted by the upper layer as text,
graphics, audio, video, and so on. However, in addition to headers (and possible trailers), we still need a delimiter to
separate one frame from another.
Most protocols use a special 8-bit pattern flag, 01111110, as the delimiter to define the beginning and the end of the
frame, as shown in Fig. 3.9.
The flag can create the same type of problem we saw in byte-oriented protocols, i.e., if the flag pattern appears in the
data, we need to somehow inform the receiver that this is not the end of the frame.
We do this by stuffing 1 single bit (instead of 1 byte) to prevent the pattern from looking like a flag. The strategy is called
bit stuffing.
Bit stuffing is a technique used to ensure that a specific bit pattern never occurs in the data transmitted over a
communications channel. Additional bits are added at the transmitting end and removed at the receiving end of the
channel as the data is processed.
Each frame begins and ends with a special bit pattern, 01111110 (a flag byte). Whenever the sender's data link layer
encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream.
When the receiver sees five consecutive 1 bits followed by a 0 bit, it automatically destuffs (deletes) the 0 bit.
For example, HDLC (High-level Data Link Control) uses bit stuffing for data transparency.