COMPUTER NETWORK
ASSIGNMENT -2
MCA-IInd year
SUBMITTED BY SUBMITTED TO:
Mohd Ayan Mr. SANDEEP YADAV
2200520140034
Que-1. What do you mean by error detection and correction?
Explain various types of errors.
Ans 1: Error is a condition when the receiver’s information
does not match the sender’s information. During
transmission, digital signals suffer from noise that can
introduce errors in the binary bits traveling from sender to
receiver. That means a 0 bit may change to 1 or a 1 bit may
change to 0.
Data (Implemented either at the Data link layer or Transport
Layer of the OSI Model) may get scrambled by noise or get
corrupted whenever a message is transmitted. To prevent
such errors, error-detection codes are added as extra data to
digital messages. This helps in detecting any errors that may
have occurred during message transmission.
TYPES OF ERROR;
SINGLE-BIT ERROR:
A single-bit error refers to a type of data transmission error
that occurs when one bit (i.e., a single binary digit) of a
transmitted data unit is altered during transmission, resulting
in an incorrect or corrupted data unit.
E.g. sent data 10110011 received data 10110111. This is
error single bit error.
Multiple-Bit Error
A multiple-bit error is an error type that arises when more
than one bit in a data transmission is affected. Although
multiple-bit errors are relatively rare when compared to
single-bit errors, they can still occur, particularly in high-
noise or high-interference digital environments.
E.g. sent data 10110011 received data 10100001.
This is multiple bit error.
Burst Error
When several consecutive bits are flipped mistakenly in
digital transmission, it creates a burst error. This error causes
a sequence of consecutive incorrect values .
Burst Error
Ques.2: Differentiate between LRC and VRC.
Ans:
Vertical Redundancy Check Longitudinal Redundancy Check
S.No. (VRC) (LRC)
It stands for Vertical Redundancy It stands for Longitudinal Redundancy
1. Check. Check.
In this redundant bit called parity bit In this redundant row of bits is added to
2. is added to each data unit. the whole block.
3. VRC can detect single bit errors. LRC can detect burst errors.
4. It is also known as parity checker. It is also known as 2-D parity checker.
The advantage of using VRC is that it
can checks all single bit errors but
can check odd parity only in the case The advantage of using LRC over VRC is
5. of change of odd bits. that it can check all the burst errors.
If two bits in data unit is damaged and also
in other data unit the same bits are
It is not capable of checking the burst damaged at same position, then it is not
6. error in case of change of bits is even. capable of detecting such kind of error
Ques.3: Explain the Checksum error detection techniques
with advantages and disadvantages.
Ans: Checksum is the error detection method used by upper
layer protocols and is considered to be more reliable than
LRC, VRC and CRC. This method makes the use
of Checksum Generator on Sender side and Checksum
Checker on Receiver side.
Example –
If the data unit to be transmitted is 10101001 00111001, the
following procedure is used at Sender site and Receiver site.
Sender Site :
1010100 subunit 1
1 subunit 2
0011100
1
11100010 sum (using 1s complement)
00011101 checksum (complement of
sum)
At the Sender side, the data is divided into equal subunits of
n bit length by the checksum generator. This bit is generally
of 16-bit length. These subunits are then added together using
one’s complement method. This sum is of n bits. The
resultant bit is then complemented. This complemented sum
which is called checksum is appended to the end of original
data unit and is then transmitted to Receiver.
Receiver Site :
1010100 subunit 1
1 subunit 2
0011100
1
0001110 checksum
1 sum
1111111
1
00000000 sum's complement
Result is zero, it means no error.
Advantage :
The checksum detects all the errors involving an odd number
of bits as well as the error involving an even number of bits.
Disadvantage :
The main problem is that the error goes undetected if one or
more bits of a subunit is damaged and the corresponding bit
or bits of a subunit are damaged and the corresponding bit or
bits of opposite value in second subunit are also damaged.
This is because the sum of those columns remains
unchanged.
Que-5. What is pure and slotted aloha?
Ans: Pure Aloha:
Pure Aloha can be termed as the main Aloha or the original
Aloha. Whenever any frame is available, each station sends it,
and due to the presence of only one channel for
communication, it can lead to the chance of collision.
In the case of the pure aloha, the user transmits the frame and
waits till the receiver acknowledges it, if the receiver does not
send the acknowledgment, the sender will assume that it has
not been received and sender resends the acknowledgment.
Slotted Aloha is simply an advanced version of pure Aloha
that helps in improving the communication network. A
station is required to wait for the beginning of the next slot
to transmit. The vulnerable period is halved as opposed to
Pure Aloha.
Slotted Aloha helps in reducing the number of collisions by
properly utilizing the channel and this basically results in the
somehow delay of the users. In Slotted Aloha, the channel
time is separated into particular time slots.
Pure Aloha Slotted Aloha
In this Aloha, any station can transmit In this, any station can transmit the data
the data at any time. at the beginning of any time slot.
In this, The time is continuous and not In this, The time is discrete and globally
globally synchronized. synchronized.
Vulnerable time for Pure Aloha = 2 x Tt Vulnerable time for Slotted Aloha = Tt
In Pure Aloha, the Probability of In Slotted Aloha, the Probability of
successful transmission of the data successful transmission of the data
packet packet
= G x e-2G = G x e-G
In Pure Aloha, Maximum efficiency In Slotted Aloha, Maximum efficiency
= 18.4% = 36.8%
Que-4. Describe Cyclic Redundancy Check (CRC). If
message and divisor are 10101010,x 4 +x3 +1 respectively
then find the total bits and value of CRC.
Ans: CRC or Cyclic Redundancy Check is a method of
detecting accidental changes/errors in the
communicationchannel.
CRC uses Generator Polynomial which is available on both
sender and receiver side.
The Cyclic Redundancy Checks (CRC) is the most powerful
method for Error-Detection and Correction. It is given as a
k bit message and the transmitter creates an (n – k) bit
sequence called frame check sequence. The out coming frame,
including n bits, is precisely divisible by some fixed number.
Modulo 2 Arithmetic is used in this binary addition with no
carries, just like the XOR operation.
Redundancy means duplicacy. The redundancy bits used by
CRC are changed by splitting the data unit by a fixed divisor.
The remainder is CRC.
Ques: Explain sliding window protocol and Go-Back-N ARQ
protocol with its advantages and disadvantages.
Ans: The sliding window protocol is a method designed in the
network model that allows data exchange more efficiently and
within the scope of clearly defined steps in the channel.
In the sliding window protocol, some of the most important
features that are applied in a network model are as mentioned:
This protocol allows sharing multiple data frames from
the sender before receiving any acknowledgment from
the receiver side.
The data frames shared in the channel are defined by
the window size mentioned in the network model,
which defines the maximum number of frames that can
be transmitted at a time from the sender to the receiver
side before expecting any acknowledgment.
Each of the frames in the network model is assigned a
sequence number to increase the transmission
efficiency.
The data frames shared from the sender to the receiver
side are enclosed within a virtual sliding window,
which represents that these are awaiting
acknowledgment from the receiver side.
Advantages
In this protocol, a sender can share multiple frames and
then wait for the acknowledgment.
This protocol has much better efficiency in
comparison, with low time delay.
This protocol requires sorting for increased efficiency
and applies full-duplex transmission.
Disadvantages
In case the sender does not receive acknowledgement
from the receiver side, the network model becomes
inefficient.
Loss and wastage of bandwidth due to sharing multiple
frames simultaneously.
Go-Back-N ARQ:
The Go-Back-N ARQ protocol is a type of Automatic Repeat
reQuest (ARQ) protocol that provides reliable transmission
between network nodes. It uses acknowledgements and
timeouts to control transmission errors at the Data Link Layer
(DLL) of the OSI network model.
Advantages
Multiple frames can be simultaneous to the receiver
side.
Increase the efficiency of the data transfer and has
more control over the flow of frames.
Time delay is less for sharing data frames.
Disadvantages
The storage of data frames at the receiver side.
Retransmission of frames, when the acknowledgement
is not received by the sender end.
Que-8. Write short note on:
(i) Hamming Code
(ii) Stop and wait ARQ
(iii) CSMA
(iv) Packet switching
(v) Selective repeat ARQ
Ans: (i)Hamming Code:
Hamming Code is an error-detecting and error-correcting code
named after its inventor, Richard Hamming. It is used to
transmit data over a noisy communication channel, where
errors may occur during transmission. The code adds extra
parity bits to the data bits to create a codeword. These parity
bits help in detecting and correcting errors that may have
occurred during transmission. Hamming codes are widely
used in computer memory systems and communication
systems to ensure data integrity.
(ii) Stop-and-Wait ARQ (Automatic Repeat request ):
Stop-and-Wait ARQ is a simple automatic repeat request
protocol used in communication networks. In this protocol,
the sender sends a single data frame and then waits for an
acknowledgment from the receiver. If the sender receives an
acknowledgment within a specified time, it sends the next
frame. If an acknowledgment is not received in time or if it
indicates an error, the sender retransmits the same frame.
While simple, Stop-and-Wait ARQ can lead to inefficiencies
in terms of channel utilization.
(iii) CSMA (Carrier Sense Multiple Access):
CSMA is a network protocol used in Ethernet networks to
manage access to the communication channel. In CSMA, a
station listens to the channel before transmitting data. If the
channel is busy, the station waits until it becomes idle before
transmitting. This helps in reducing collisions and improving
the overall efficiency of the network. There are variations of
CSMA, such as CSMA/CD (Carrier Sense Multiple Access
with Collision Detection) used in traditional Ethernet
networks.
(iv) Packet Switching:
Packet switching is a network communication method where
data is broken down into small packets for transmission.
These packets are sent independently through the network and
can take different routes to reach the destination. Once all
packets arrive at the destination, they are reassembled to
reconstruct the original message. Packet switching is
contrasted with circuit switching, where a dedicated
communication path is established for the duration of the
communication. Packet switching is the basis for modern
computer networks, including the Internet.
(v) Selective Repeat ARQ (Automatic Repeat request ):
Selective Repeat ARQ is an automatic repeat request protocol
used in communication networks to ensure the reliable
delivery of data. In Selective Repeat ARQ, the sender is
allowed to send multiple frames before receiving an
acknowledgment. The receiver individually acknowledges
each correctly received frame, and if a frame is lost or
corrupted, only that specific frame is retransmitted. This
approach increases the efficiency of the communication
process compared to Stop-and-Wait ARQ, especially in
situations with higher latency or bandwidth-delay product.