Computer Network Types
Computer Network Types
A computer network is a group of computers linked to each other that enables the
computer to communicate with another computer and share their resources, data, and
applications.
Wired Personal Area Network: Wired Personal Area Network is created by using the
USB.
MAN(Metropolitan Area Network)
o A metropolitan area network is a network that covers a larger geographic area by
interconnecting a different LAN to form a larger network.
o Government agencies use MAN to connect to the citizens and private industries.
o In MAN, various LANs are connected to each other through a telephone
exchange line.
o The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN,
OC-3, ADSL, etc.
o It has a higher range than Local Area Network(LAN).
WAN(Wide Area Network)
o A Wide Area Network is a network that extends over a large geographical area
such as states or countries.
o A Wide Area Network is quite bigger network than the LAN.
o A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fibre optic cable or satellite links.
o The internet is one of the biggest WAN in the world.
o A Wide Area Network is widely used in the field of Business, government, and
education.
o Mobile Broadband
o Last mile
o Private network
Internetwork
o An internetwork is defined as two or more computer network LANs or WAN or
computer network segments are connected using devices, and they are
configured by a local addressing scheme. This process is known
as internetworking.
o An interconnection between public, private, commercial, industrial, or
government computer networks can also be defined as internetworking.
o An internetworking uses the internet protocol.
o The reference model used for internetworking is Open System
Interconnection(OSI).
Types Of Internetwork:
1. Extranet: An extranet is a communication network based on the internet protocol
such as Transmission Control protocol and internet protocol. It is used for
information sharing. The access to the extranet is restricted to only those users who
have login credentials. An extranet is the lowest level of internetworking. It can be
categorized as MAN, WAN or other computer networks. An extranet cannot have a
single LAN, atleast it must have one connection to the external network.
Components:
Computer network components are the major parts which are needed to install the software.
Some important network components are NIC, switch, cable, hub, router, and modem.
Depending on the type of network that we need to install, some network components can also
be removed. For example, the wireless network does not require a cable.
Topology defines the structure of the network of how all the components are
interconnected to each other. There are two types of topology: physical and logical
topology.
Bus Topology
o The bus topology is designed in such a way that all the stations are connected
through a single cable known as a backbone cable.
o Each node is either connected to the backbone cable by drop cable or directly
connected to the backbone cable.
o When a node wants to send a message over the network, it puts a message over
the network. All the stations available in the network will receive the message
whether it has been addressed or not.
o The bus topology is mainly used in 802.3 (ethernet) and 802.4 standard networks.
o The configuration of a bus topology is quite simpler as compared to other
topologies.
o The backbone cable is considered as a "single lane" through which the message
is broadcast to all the stations.
o The most common access method of the bus topologies is CSMA (Carrier Sense
Multiple Access).
CSMA: It is a media access control used to control the data flow so that data integrity is
maintained, i.e., the packets do not get lost. There are two alternative ways of handling
the problems that occur when two nodes send the messages simultaneously.
Ring Topology
Star Topology
o Tree topology combines the characteristics of bus topology and star topology.
o A tree topology is a type of structure in which all the computers are connected
with each other in hierarchical fashion.
o The top-most node in tree topology is known as a root node, and all other nodes
are the descendants of the root node.
o There is only one path exists between two nodes for the data transmission. Thus,
it forms a parent-child hierarchy.
Mesh topology
o Mesh technology is an arrangement of the network in which computers are
interconnected with each other through various redundant connections.
o There are multiple paths from one computer to another computer.
o It does not contain the switch, hub or any central computer which acts as a central
point of communication.
o The Internet is an example of the mesh topology.
o Mesh topology is mainly used for WAN implementations where communication
failures are a critical concern.
o Mesh topology is mainly used for wireless networks.
o Mesh topology can be formed by using the formula:
Number of cables = (n*(n-1))/2;
7.6M
158
OOPs Concepts in Java
Hybrid Topology
o The combination of various different topologies is known as Hybrid topology.
o A Hybrid topology is a connection between different links and nodes to transfer
the data.
o When two or more different topologies are combined together is termed as
Hybrid topology and if similar topologies are connected with each other will not
result in Hybrid topology. For example, if there exist a ring topology in one
branch of ICICI bank and bus topology in another branch of ICICI bank,
connecting these two topologies will result in Hybrid topology.
Transmission modes
o The way in which data is transmitted from one device to another device is known
as transmission mode.
o The transmission mode is also known as the communication mode.
o Each communication channel has a direction associated with it, and transmission
media provide the direction. Therefore, the transmission mode is also known as a
directional mode.
o The transmission mode is defined in the physical layer.
o Simplex mode
o Half-duplex mode
o Full-duplex mode
Simplex mode
o In Simplex mode, the communication is unidirectional, i.e., the data flow in one
direction.
o A device can only send the data but cannot receive it or it can receive the data
but cannot send the data.
o This transmission mode is not very popular as mainly communications require the
two-way exchange of data. The simplex mode is used in the business field as in
sales that do not require any corresponding reply.
o The radio station is a simplex channel as it transmits the signal to the listeners but
never allows them to transmit back.
o Keyboard and Monitor are the examples of the simplex mode as a keyboard can
only accept the data from the user and monitor can only be used to display the
data on the screen.
o The main advantage of the simplex mode is that the full capacity of the
communication channel can be utilized during transmission.
Half-Duplex mode
o In a Half-duplex channel, direction can be reversed, i.e., the station can transmit
and receive the data as well.
o Messages flow in both the directions, but not at the same time.
o The entire bandwidth of the communication channel is utilized in one direction at
a time.
o In half-duplex mode, it is possible to perform the error detection, and if any error
occurs, then the receiver requests the sender to retransmit the data.
o A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie, one
party speaks, and another party listens. After a pause, the other speaks and first
party listens. Speaking simultaneously will create the distorted sound which
cannot be understood.
Layered Architecture
o The main aim of the layered architecture is to divide the design into small pieces.
o Each lower layer adds its services to the higher layer to provide a full set of
services to manage communications and run the applications.
o It provides modularity and clear interfaces, i.e., provides interaction between
subsystems.
o It ensures the independence between layers by providing the services from lower
to higher layer without defining how the services are implemented. Therefore,
any modification in a layer will not affect the other layers.
o The number of layers, functions, contents of each layer will vary from network to
network. However, the purpose of each layer is to provide the service from lower
to a higher layer and hiding the details from the layers of how the services are
implemented.
o The basic elements of layered architecture are services, protocols, and interfaces.
o Service: It is a set of actions that a layer provides to the higher layer.
o Protocol: It defines a set of rules that a layer uses to exchange the
information with peer entity. These rules mainly concern about both the
contents and order of the messages used.
o Interface: It is a way through which the message is transferred from one
layer to another layer.
o In a layer n architecture, layer n on one machine will have a communication with
the layer n on another machine and the rules used in a conversation are known
as a layer-n protocol.
Full-duplex mode
o In Full duplex mode, the communication is bi-directional, i.e., the data flow in
both the directions.
o Both the stations can send and receive the message simultaneously.
o Full-duplex mode has two simplex channels. One channel has traffic moving in
one direction, and another channel has traffic flowing in the opposite direction.
o The Full-duplex mode is the fastest mode of communication between devices.
o The most common example of the full-duplex mode is a telephone network.
When two people are communicating with each other by a telephone line, both
can talk and listen at the same time.
OSI Model
o OSI stands for Open System Interconnection is a reference model that
describes how information from a software application in one computer moves
through a physical medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network
function.
o OSI model was developed by the International Organization for Standardization
(ISO) in 1984, and it is now considered as an architectural model for the inter-
computer communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each
layer is assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be performed
independently.
o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related issues,
and they are implemented only in the software. The application layer is closest to
the end user. Both the end user and the application layer interact with the
software applications. An upper layer refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data
link layer and the physical layer are implemented in hardware and software. The
physical layer is the lowest layer of the OSI model and is closest to the physical
medium. The physical layer is mainly responsible for placing the information on
the physical medium.
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Physical layer
o The main functionality of the physical layer is to transmit the individual bits from
one node to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface
specifications.
o Line Configuration: It defines the way how two or more devices can be
connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-
duplex or full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the
information.
Data-Link Layer
o This layer is responsible for the error-free transfer of data frames.
o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or more devices.
o It is mainly responsible for the unique identification of each device that resides
on a local network.
o It contains two sub-layers:
o Logical Link Control Layer
o It is responsible for transferring the packets to the Network layer of
the receiver that is receiving.
o It identifies the address of the network layer protocol from the
header.
o It also provides flow control.
o Media Access Control Layer
o A Media access control layer is a link between the Logical Link
Control layer and the network's physical layer.
o It is used for transferring the packets over the network.
o Physical Addressing: The Data link layer adds a header to the frame that
contains a destination address. The frame is transmitted to the destination
address mentioned in the header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is
the technique through which the constant data rate is maintained on both the
sides so that no data get corrupted. It ensures that the transmitting station such
as a server with higher processing speed does not exceed the receiving station,
with lower processing speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic
Redundancy Check) that is placed to the Data link layer's trailer which is added to
the message frame before it is sent to the physical layer. If any error seems to
occurr, then the receiver sends the acknowledgment for the retransmission of the
corrupted frames.
o Access Control: When two or more devices are connected to the same
communication channel, then the data link layer protocols are used to determine
which device has control over the link at a given time.
Network Layer
Transport Layer
o The Transport layer is a Layer 4 ensures that messages are transmitted in the
order in which they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units
known as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point
connection between source and destination to deliver the data reliably.
Session Layer
Presentation Layer
o A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one
presentation format to another format.
o The Presentation layer is also known as the syntax layer.
Application Layer
TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer,
network layer, data link layer and physical layer.
o The first four layers provide physical standards, network interface,
internetworking, and transport functions that correspond to the first four layers
of the OSI model and these four layers are represented in TCP/IP model by a
single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of
them provides specific functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more
lower-level protocols.
Internet Layer
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the
entire TCP/IP suite.
ARP Protocol
7.6M
158
OOPs Concepts in Java
Next
Stay
ICMP Protocol
The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
Application Layer
Digital Transmission
Data can be represented either in analog or digital form. The computers used the digital
form to store the information. Therefore, the data needs to be converted in digital form
so that it can be used by a computer.
DIGITAL-TO-DIGITAL CONVERSION
Digital-to-digital encoding is the representation of digital information by a digital signal.
When binary 1s and 0s generated by the computer are translated into a sequence of
voltage pulses that can be propagated over a wire, this process is known as digital-to-
digital encoding.
o Unipolar Encoding
o Polar Encoding
o Bipolar Encoding
Unipolar
o Digital transmission system sends the voltage pulses over the medium link such
as wire or cable.
o In most types of encoding, one voltage level represents 0, and another voltage
level represents 1.
o The polarity of each pulse determines whether it is positive or negative.
o This type of encoding is known as Unipolar encoding as it uses only one polarity.
o In Unipolar encoding, the polarity is assigned to the 1 binary state.
o In this, 1s are represented as a positive value and 0s are represented as a zero
value.
o In Unipolar Encoding, '1' is considered as a high voltage and '0' is considered as a
zero voltage.
o Unipolar encoding is simpler and inexpensive to implement.
Unipolar encoding has two problems that make this scheme less desirable:
11M
259
Features of Java - Javatpoint
o DC Component
o Synchronization
Polar
o Polar encoding is an encoding scheme that uses two voltage levels: one is
positive, and another is negative.
o By using two voltage levels, an average voltage level is reduced, and the DC
component problem of unipolar encoding scheme is alleviated.
NRZ
NRZ-L: In NRZ-L encoding, the level of the signal depends on the type of the bit that it
represents. If a bit is 0 or 1, then their voltages will be positive and negative respectively.
Therefore, we can say that the level of the signal is dependent on the state of the bit.
NRZ-I: NRZ-I is an inversion of the voltage level that represents 1 bit. In the NRZ-I
encoding scheme, a transition occurs between the positive and negative voltage that
represents 1 bit. In this scheme, 0 bit represents no change and 1 bit represents a
change in voltage level.
RZ
It performs two signal changes to encode one bit that acquires more bandwidth.
Biphase
o Biphase is an encoding scheme in which signal changes at the middle of the bit
interval but does not return to zero.
Manchester
o It changes the signal at the middle of the bit interval but does not return to zero
for synchronization.
o In Manchester encoding, a negative-to-positive transition represents binary 1,
and positive-to-negative transition represents 0.
o Manchester has the same level of synchronization as RZ scheme except that it has
two levels of amplitude.
Differential Manchester
o It changes the signal at the middle of the bit interval for synchronization, but the
presence or absence of the transition at the beginning of the interval determines
the bit. A transition means binary 0 and no transition means binary 1.
o In Manchester Encoding scheme, two signal changes represent 0 and one signal
change represent 1.
Bipolar
o Bipolar encoding scheme represents three voltage levels: positive, negative, and
zero.
o In Bipolar encoding scheme, zero level represents binary 0, and binary 1 is
represented by alternating positive and negative voltages.
o If the first 1 bit is represented by positive amplitude, then the second 1 bit is
represented by negative voltage, third 1 bit is represented by the positive
amplitude and so on. This alternation can also occur even when the 1bits are not
consecutive.
AMI
Advantage:
o DC component is zero.
o Sequence of 1s bits are synchronized.
Disadvantage:
o This encoding scheme does not ensure the synchronization of a long string of 0s
bits.
B8ZS
o B8ZS stands for Bipolar 8-Zero Substitution.
o This technique is adopted in North America to provide synchronization of a long
sequence of 0s bits.
o In most of the cases, the functionality of B8ZS is similar to the bipolar AMI, but
the only difference is that it provides the synchronization when a long sequence
of 0s bits occur.
o B8ZS ensures synchronization of a long string of 0s by providing force artificial
signal changes called violations, within 0 string pattern.
o When eight 0 occurs, then B8ZS implements some changes in 0s string pattern
based on the polarity of the previous 1 bit.
o If the polarity of the previous 1 bit is positive, the eight 0s will be encoded as
zero, zero, zero, positive, negative, zero, negative, positive.
o If the polarity of previous 1 bit is negative, then the eight 0s will be encoded as
zero, zero, zero, negative, positive, zero, positive, negative.
HDB3
If the number of 1s bits is even, then the violation is made on the place of the first and
fourth consecutive 0s. If the polarity of the previous bit is positive, then violations are
negative, and if the polarity of the previous bit is negative, then violations are positive.
Next Topic
What is Transmission media?
o Transmission media is a communication channel that carries the information from
the sender to the receiver. Data is transmitted through the electromagnetic
signals.
o The main functionality of the transmission media is to carry the information in the
form of bits through LAN(Local Area Network).
o It is a physical path between transmitter and receiver in data communication.
o In a copper-based network, the bits in the form of electrical signals.
o In a fibre based network, the bits in the form of light pulses.
o In OSI(Open System Interconnection) phase, transmission media supports the
Layer 1. Therefore, it is considered to be as a Layer 1 component.
o The electrical signals can be sent through the copper wire, fibre optics,
atmosphere, water, and vacuum.
o The characteristics and quality of data transmission are determined by the
characteristics of medium and signal.
o Transmission media is of two types are wired media and wireless media. In wired
media, medium characteristics are more important whereas, in wireless media,
signal characteristics are more important.
o Different transmission media have different properties such as bandwidth, delay,
cost and ease of installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference
model, i.e., Physical layer.
o Bandwidth: All the factors are remaining constant, the greater the bandwidth of
a medium, the higher the data transmission rate of a signal.
o Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals
will get destroyed due to transmission impairment.
o Interference: An interference is defined as the process of disrupting a signal
when it travels over a communication medium on the addition of some unwanted
signal.
Guided Media
It is defined as the physical medium through which the signals are transmitted. It is also
known as Bounded media.
Twisted pair:
Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted
pair cable is from 0 to 3.5KHz.
A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern.
11M
240
Exception Handling in Java - Javatpoint
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.
o Category 1: Category 1 is used for telephone lines that have low-speed data.
o Category 2: It can support upto 4Mbps.
o Category 3: It can support upto 16Mbps.
o Category 4: It can support upto 20Mbps. Therefore, it can be used for long-
distance communication.
o Category 5: It can support upto 200Mbps.
o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.
Disadvantage:
o This cable can only be used for shorter distances because of attenuation.
Disadvantages
Coaxial Cable
o Coaxial cable is very commonly used transmission media, for example, TV wire is
usually a coaxial cable.
o The name of the cable is coaxial as it contains two conductors parallel to each
other.
o It has a higher frequency as compared to Twisted pair cable.
o The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-
conductive cover that separates the inner conductor from the outer conductor.
o The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).
Fibre Optic
o Fibre optic cable is a cable that uses electrical signals for communication.
o Fibre optic is a cable that holds the optical fibres coated in plastic that are used
to send the data by pulses of light.
o The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
o Fibre optics provide faster data transmission than copper wires.
Radio waves
o Radio waves are the electromagnetic waves that are transmitted in all the
directions of free space.
o Radio waves are omnidirectional, i.e., the signals are propagated in all the
directions.
o The range in frequencies of radio waves is from 3Khz to 1 khz.
o In the case of radio waves, the sending and receiving antenna are not aligned, i.e.,
the wave sent by the sending antenna can be received by any receiving antenna.
o An example of the radio wave is FM radio.
o A Radio wave is useful for multicasting when there is one sender and many
receivers.
o An FM radio, television, cordless phones are examples of a radio wave.
o Radio transmission is mainly used for wide area networks and mobile cellular
phones.
o Radio waves cover a large area, and they can penetrate the walls.
o Radio transmission provides a higher transmission rate.
Microwaves
10 Sec
Exception Handling in Java - Javatpoint
o Terrestrial microwave
o Satellite microwave communication.
Characteristics of Microwave:
Advantages Of Microwave:
o A satellite is a physical object that revolves around the earth at a known height.
o Satellite communication is more reliable nowadays as it offers more flexibility
than cable and fibre optic systems.
o We can communicate with any point on the globe by using satellite
communication.
The satellite accepts the signal that is transmitted from the earth station, and it amplifies
the signal. The amplified signal is retransmitted to another earth station.
o The coverage area of a satellite microwave is more than the terrestrial microwave.
o The transmission cost of the satellite is independent of the distance from the
centre of the coverage area.
o Satellite communication is used in mobile and wireless communication
applications.
o It is easy to install.
o It is used in a wide variety of applications such as weather forecasting, radio/TV
signal broadcasting, mobile communication, etc.
o Satellite designing and development requires more time and higher cost.
o The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
o The life of the satellite is about 12-15 years. Due to this reason, another launch of
the satellite has to be planned before it becomes non-functional.
Infrared
o An infrared transmission is a wireless technology used for communication over
short ranges.
o The frequency of the infrared in the range from 300 GHz to 400 THz.
o It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone
resides in the same closed area.
Characteristics Of Infrared:
o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared communication
in one room cannot be interrupted by the nearby rooms.
o An infrared communication provides better security with minimum interference.
o Infrared communication is unreliable outside the building because the sun rays
will interfere with the infrared waves.
What is Multiplexing?
Multiplexing is a technique used to combine and send the multiple data streams over a
single medium. The process of combining the data streams is known as multiplexing
and hardware used for multiplexing is known as a multiplexer.
History of Multiplexing
o Multiplexing technique is widely used in telecommunications in which several
telephone calls are carried through a single wire.
o Multiplexing originated in telegraphy in the early 1870s and is now widely used in
communication.
o George Owen Squier developed the telephone carrier multiplexing in 1910.
Concept of Multiplexing
o The 'n' input lines are transmitted through a multiplexer and multiplexer
combines the signals to form a composite signal.
o The composite signal is passed through a Demultiplexer and demultiplexer
separates a signal to component signals and transfers them to their respective
destinations.
Advantages of Multiplexing:
o More than one signal can be sent over a single medium.
o The bandwidth of a medium can be utilized effectively.
Multiplexing Techniques
Multiplexing techniques can be classified as:
Advantages Of FDM:
Disadvantages Of FDM:
o FDM technique is used only when low-speed channels are required.
o It suffers the problem of crosstalk.
o A Large number of modulators are required.
o It requires a high bandwidth channel.
Applications Of FDM:
o Wavelength Division Multiplexing is same as FDM except that the optical signals
are transmitted through the fibre optic cable.
o WDM is used on fibre optics to increase the capacity of a single fibre.
o It is used to utilize the high data rate capability of fibre optic cable.
o It is an analog multiplexing technique.
o Optical signals from different source are combined to form a wider band of light
with the help of multiplexer.
o At the receiving end, demultiplexer separates the signals to transmit them to
their respective destinations.
o Multiplexing and Demultiplexing can be achieved by using a prism.
o Prism can perform a role of multiplexer by combining the various optical signals
to form a composite signal, and the composite signal is transmitted through a
fibre optical cable.
o Prism also performs a reverse operation, i.e., demultiplexing the signal.
o Synchronous TDM
o Asynchronous TDM
Synchronous TDM
o The capacity of the channel is not fully utilized as the empty slots are also
transmitted which is having no data. In the above figure, the first frame is
completely filled, but in the last two frames, some slots are empty. Therefore, we
can say that the capacity of the channel is not utilized efficiently.
o The speed of the transmission medium should be greater than the total speed of
the input lines. An alternative approach to the Synchronous TDM is Asynchronous
Time Division Multiplexing.
Asynchronous TDM
o The difference between Asynchronous TDM and Synchronous TDM is that many
slots in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully
utilized. This leads to the smaller transmission time and efficient utilization of the
capacity of the channel.
o In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots
where m is less than n (m<n).
o The number of slots in a frame depends on the statistical analysis of the number
of input lines.
In the above diagram, there are 4 devices, but only two devices are sending the data,
i.e., A and C. Therefore, the data of A and C are only transmitted through the
transmission line.
Switching
o When a user accesses the internet or another computer network outside their
immediate location, messages are sent through the network of transmission
media. This technique of transferring the information from one computer
network to another network is known as switching.
o Switching in a computer network is achieved by using switches. A switch is a
small hardware device which is used to join multiple computers together with
one local area network (LAN).
o Network switches operate at layer 2 (Data link layer) in the OSI model.
o Switching is transparent to the user and does not require any configuration in the
home network.
o Switches are used to forward the packets based on MAC addresses.
o A Switch is used to transfer the data only to the device that has been addressed.
It verifies the destination address to route the packet appropriately.
o It is operated in full duplex mode.
o Packet collision is minimum as it directly communicates between source and
destination.
o It does not broadcast the message as it works with limited bandwidth.
Advantages of Switching:
Disadvantages of Switching:
Switching Modes
o The layer 2 switches are used for transmitting the data on the data link layer, and
it also performs error checking on transmitted and received frames.
o The layer 2 switches forward the packets with the help of MAC address.
o Different modes are used for forwarding the packets known as Switching
modes.
o In switching mode, Different parts of a frame are recognized. The frame consists
of several parts such as preamble, destination MAC address, source MAC address,
user's data, FCS.
o Store-and-forward
o Cut-through
o Fragment-free
Store-and-forward
o Store-and-forward is a technique in which the intermediate nodes store the
received frame and then check for errors before forwarding the packets to the
next node.
o The layer 2 switch waits until the entire frame has received. On receiving the
entire frame, switch store the frame into the switch buffer memory. This process
is known as storing the frame.
o When the frame is stored, then the frame is checked for the errors. If any error
found, the message is discarded otherwise the message is forwarded to the next
node. This process is known as forwarding the frame.
o CRC (Cyclic Redundancy Check) technique is implemented that uses a number of
bits to check for the errors on the received frame.
o The store-and-forward technique ensures a high level of security as the
destination network will not be affected by the corrupted frames.
o Store-and-forward switches are highly reliable as it does not forward the collided
frames.
Cut-through Switching
o Cut-through switching is a technique in which the switch forwards the packets
after the destination address has been identified without waiting for the entire
frame to be received.
o Once the frame is received, it checks the first six bytes of the frame following the
preamble, the switch checks the destination in the switching table to determine
the outgoing interface port, and forwards the frame to the destination.
o It has low latency rate as the switch does not wait for the entire frame to be
received before sending the packets to the destination.
o It has no error checking technique. Therefore, the errors can be sent with or
without errors to the receiver.
o A Cut-through switching technique has low wait time as it forwards the packets
as soon as it identifies the destination MAC address.
o In this technique, collision is not detected, if frames have collided will also be
forwarded.
Fragment-free Switching
Switching techniques
In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
Circuit Switching
o Circuit switching is a switching technique that establishes a dedicated path
between sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
o In case of circuit switching technique, when any user wants to send the data,
voice, video, a request signal is sent to the receiver then the receiver sends back
the acknowledgment to ensure the availability of the dedicated path. After
receiving the acknowledgment, dedicated path transfers the data.
o Circuit switching is used in public telephone network. It is used for voice
transmission.
o Fixed data can be transferred at a time in circuit switching technology.
11.2M
190
Hello Java Program for Beginners
o Circuit establishment
o Data transfer
o Circuit Disconnect
o Crossbar Switch
o Multistage Switch
Crossbar Switch
The Crossbar switch is a switch that has n input lines and n output lines. The crossbar
switch has n2 intersection points known as crosspoints.
Multistage Switch
o Multistage Switch is made by splitting the crossbar switch into the smaller units
and then interconnecting them.
o It reduces the number of crosspoints.
o If one path fails, then there will be an availability of another path.
o Once the dedicated path is established, the only delay occurs in the speed of
data transmission.
o It takes a long time to establish a connection approx 10 seconds during which no
data can be transmitted.
o It is more expensive than other switching techniques as a dedicated path is
required for each connection.
o It is inefficient to use because once the path is established and no data is
transferred, then the capacity of the path is wasted.
o In this case, the connection is dedicated therefore no other data can be
transferred even if the channel is free.
Message Switching
o Message Switching is a switching technique in which a message is transferred as
a complete unit and routed through intermediate nodes at which it is stored and
forwarded.
o In Message Switching technique, there is no establishment of a dedicated path
between the sender and receiver.
o The destination address is appended to the message. Message Switching
provides a dynamic routing as the message is routed through the intermediate
nodes based on the information available in the message.
o Message switches are programmed in such a way so that they can provide the
most efficient routes.
o Each and every node stores the entire message and then forward it to the next
node. This type of network is known as store and forward network.
o Message switching treats each message as an independent entity.
Advantages Of Message Switching
o Data channels are shared among the communicating devices that improve the
efficiency of using available bandwidth.
o Traffic congestion can be reduced because the message is temporarily stored in
the nodes.
o Message priority can be used to manage the network.
o The size of the message which is sent over the network can be varied. Therefore,
it supports the data of unlimited size.
o The message switches must be equipped with sufficient storage to enable them
to store the messages until the message is forwarded.
o The Long delay can occur due to the storing and forwarding facility provided by
the message switching technique.
Packet Switching
o The packet switching is a switching technique in which the message is sent in one
go, but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
o Every packet contains some information in its headers such as source address,
destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the
message.
o If the correct order of the packets is reached, then the acknowledgment message
will be sent.
Approaches Of Packet Switching:
There are two approaches to Packet Switching:
o In the above diagram, A and B are the sender and receiver respectively. 1 and 2
are the nodes.
o Call request and call accept packets are used to establish a connection between
the sender and receiver.
o When a route is established, data will be transferred.
o After transmission of data, an acknowledgment signal is sent by the receiver that
the message has been received.
o If the user wants to terminate the connection, a clear signal is sent for the
termination.
Node takes routing decisions to forward Node does not take any routing decision.
the packets.
Congestion cannot occur as all the packets Congestion can occur when the node is busy, and
travel in different directions. does not allow other packets to pass through.
It is more flexible as all the packets are It is not very flexible.
treated as an independent entity.
o Framing & Link access: Data Link Layer protocols encapsulate each network
frame within a Link layer frame before the transmission across the link. A frame
consists of a data field in which network layer datagram is inserted and a number
of data fields. It specifies the structure of the frame as well as a channel access
protocol by which frame is to be transmitted over the link.
o Reliable delivery: Data Link Layer provides a reliable delivery service, i.e.,
transmits the network layer datagram without any error. A reliable delivery
service is accomplished with transmissions and acknowledgements. A data link
layer mainly provides the reliable delivery service over the links as they have
higher error rates and they can be corrected locally, link at which an error occurs
rather than forcing to retransmit the data.
o Flow control: A receiving node can receive the frames at a faster rate than it can
process the frame. Without flow control, the receiver's buffer can overflow, and
frames can get lost. To overcome this problem, the data link layer uses the flow
control to prevent the sending node on one side of the link from overwhelming
the receiving node on another side of the link.
o Error detection: Errors can be introduced by signal attenuation and noise. Data
Link Layer protocol provides a mechanism to detect one or more errors. This is
achieved by adding error detection bits in the frame and then receiving node can
perform an error check.
o Error correction: Error correction is similar to the Error detection, except that
receiving node not only detect the errors but also determine where the errors
have occurred in the frame.
o Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes can transmit
the data at the same time. In a Half-Duplex mode, only one node can transmit
the data at the same time.
Error Detection
When data is transmitted from one device to another device, the system does not
guarantee whether the data received by the device is identical to the data transmitted
by another device. An Error is a situation when the message received at the receiver end
is not identical to the message transmitted.
Types Of Errors
Single-Bit Error:
The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.
In the above figure, the message which is sent is corrupted as single-bit, i.e., 0 bit is
changed to 1.
9.7M
236
C++ vs Java
Single-Bit Error does not appear more likely in Serial Data Transmission. For example,
Sender sends the data at 10 Mbps, this means that the bit lasts only for 1 ?s and for a
single-bit error to occurred, a noise must be more than 1 ?s.
Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if eight wires
are used to send the eight bits of a byte, if one of the wire is noisy, then single-bit is
corrupted per byte.
Burst Error:
The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.
The Burst Error is determined from the first corrupted bit to the last corrupted bit.
The duration of noise in Burst Error is more than the duration of noise in Single-Bit.
The number of affected bits depends on the duration of the noise and data rate.
o Single Parity checking is the simple mechanism and inexpensive to detect the
errors.
o In this technique, a redundant bit is also known as a parity bit which is appended
at the end of the data unit so that the number of 1s becomes even. Therefore, the
total number of transmitted bits would be 9 bits.
o If the number of 1s bits is odd, then parity bit 1 is appended and if the number of
1s bits is even, then parity bit 0 is appended at the end of the data unit.
o At the receiving end, the parity bit is calculated from the received data bits and
compared with the received parity bit.
o This technique generates the total number of 1s even, so it is known as even-
parity checking.
o If two bits in one data unit are corrupted and two bits exactly the same position
in another data unit are also corrupted, then 2D Parity checker will not be able to
detect the error.
o This technique cannot be used to detect the 4-bit errors or more in some cases.
Checksum
A Checksum is an error detection technique based on the concept of redundancy.
Checksum Generator
A Checksum is generated at the sending side. Checksum generator subdivides the data
into equal segments of n bits each, and all these segments are added together by using
one's complement arithmetic. The sum is complemented and appended to the original
data, known as checksum field. The extended data is transmitted across the network.
Suppose L is the total sum of the data segments, then the checksum would be ?L
1. The Sender follows the given steps:
2. The block unit is divided into k sections, and each of n bits.
3. All the k sections are added together by using one's complement to get the sum.
4. The sum is complemented and it becomes the checksum field.
5. The original data and checksum field are sent across the network.
Checksum Checker
A Checksum is verified at the receiving side. The receiver subdivides the incoming data
into equal segments of n bits each, and all these segments are added together, and then
this sum is complemented. If the complement of the sum is zero, then the data is
accepted otherwise data is rejected.
1. The Receiver follows the given steps:
2. The block unit is divided into k sections and each of n bits.
3. All the k sections are added together by using one's complement algorithm to get the
sum.
4. The sum is complemented.
5. If the result of the sum is zero, then the data is accepted otherwise the data is discarde
d.
o In CRC technique, a string of n 0s is appended to the data unit, and this n number
is less than the number of bits in a predetermined number, known as division
which is n+1 bits.
o Secondly, the newly extended data is divided by a divisor using a process is
known as binary division. The remainder generated from this division is known as
CRC remainder.
o Thirdly, the CRC remainder replaces the appended 0s at the end of the original
data. This newly generated unit is sent to the receiver.
o The receiver receives the data followed by the CRC remainder. The receiver will
treat this whole unit as a single unit, and it is divided by the same divisor that was
used to find the CRC remainder.
If the resultant of this division is zero which means that it has no error, and the data is
accepted.
If the resultant of this division is not zero which means that the data consists of an error.
Therefore, the data is discarded.
Let's understand this concept through an example:
CRC Generator
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at
the end of the data as the length of the divisor is 4 and we know that the length
of the string 0s to be appended is always one less than the length of the divisor.
o Now, the string becomes 11100000, and the resultant string is divided by the
divisor 1001.
o The remainder generated from the binary division is known as CRC remainder.
The generated value of the CRC remainder is 111.
o CRC remainder replaces the appended string of 0s at the end of the data unit,
and the final string would be 11100111 which is sent across the network.
CRC Checker
o Line discipline
o Flow Control
o Error Control
Line Discipline
o Line Discipline is a functionality of the Data link layer that provides the
coordination among the link systems. It determines which device can send, and
when it can send the data.
o ENQ/ACK
o Poll/select
END/ACK
11M
259
Features of Java - Javatpoint
Working of END/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver
is available to receive the data or not.
The receiver responses either with the positive acknowledgement(ACK) or with the
negative acknowledgement(NACK) where positive acknowledgement means that the
receiver is ready to receive the transmission and negative acknowledgement means that
the receiver is unable to accept the transmission.
o If the response to the ENQ is positive, the sender will transmit its data, and once
all of its data has been transmitted, the device finishes its transmission with an
EOT (END-of-Transmission) frame.
o If the response to the ENQ is negative, then the sender disconnects and restarts
the transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the ENQ
frame was lost during the transmission and makes three attempts to establish a
link before giving up.
Poll/Select
The Poll/Select method of line discipline works with those topologies where one device
is designated as a primary station, and other devices are secondary stations.
Working of Poll/Select
o In this, the primary device and multiple secondary devices consist of a single
transmission line, and all the exchanges are made through the primary device
even though the destination is a secondary device.
o The primary device has control over the communication link, and the secondary
device follows the instructions of the primary device.
o The primary device determines which device is allowed to use the communication
channel. Therefore, we can say that it is an initiator of the session.
o If the primary device wants to receive the data from the secondary device, it asks
the secondary device that they anything to send, this process is known as polling.
o If the primary device wants to send some data to the secondary device, then it
tells the target secondary to get ready to receive the data, this process is known
as selecting.
Select
o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the secondary
device for the upcoming transmission by transmitting a Select (SEL) frame, one
field of the frame includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an acknowledgement
that indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device sends
two or more data frames to the intended secondary device. Once the data has
been transmitted, the secondary sends an acknowledgement specifies that the
data has been received.
Poll
o The Poll mode is used when the primary device wants to receive some data from
the secondary device.
o When a primary device wants to receive the data, then it asks each device
whether it has anything to send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the
NACK (Negative Acknowledgement) means that it has nothing to send. Now, it
approaches the second secondary device, it responds with the ACK means that it
has the data to send. The secondary device can send more than one frame one
after another or sometimes it may be required to send ACK before sending each
one, depending on the type of the protocol being used.
Flow Control
o It is a set of procedures that tells the sender how much data it can transmit
before the data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the sending device to stop
the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they are
processed.
o Stop-and-wait
o Sliding window
Stop-and-wait
o In the Stop-and-wait method, the sender waits for an acknowledgement after
every frame it sends.
o When acknowledgement is received, then only next frame is sent. The process of
alternately sending and waiting of a frame continues until the sender transmits
the EOT (End of transmission) frame.
Advantage of Stop-and-wait
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all the
way to the receiver, and an acknowledgement travels all the way before the next frame
is sent. Each frame sent and received uses the entire time needed to traverse the link.
Sliding Window
o The Sliding Window is a method of flow control in which a sender can transmit
the several frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the another due
to which capacity of the communication channel can be utilized efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver end.
o The window can hold the frames at either end, and it provides the upper limit on
the number of frames that can be transmitted before the acknowledgement.
o Frames can be acknowledged even when the window is not completely filled.
o The window has a specific size in which they are numbered as modulo-n means
that they are numbered from 0 to n-1. For example, if n = 8, the frames are
numbered from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1 frames
can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that it
wants to receive. For example, to acknowledge the string of frames ending with
frame number 4, the receiver will send the ACK containing the number 5. When
the sender sees the ACK with the number 5, it got to know that the frames from 0
through 4 have been received.
Sender Window
o At the beginning of a transmission, the sender window contains n-1 frames, and
when they are sent out, the left boundary moves inward shrinking the size of the
window. For example, if the size of the window is w if three frames are sent out,
then the number of frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number which
will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been
sent out and no acknowledgement has arrived, then the sender window contains
only two frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which
means that 0 through 3 frames have arrived undamaged and the sender window
is expanded to include the next four frames. Therefore, the sender window
contains six frames (5,6,7,0,1,2).
Receiver Window
o At the beginning of transmission, the receiver window does not contain n frames,
but it contains n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but it
represents the number of frames that can be received before an ACK is sent. For
example, the size of the window is w, if three frames are received then the
number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the number
equal to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window contains
seven spaces for seven frames. If the one frame is received, then the receiver
window shrinks and moving the boundary from 0 to 1. In this way, window
shrinks one by one, so window now contains the six spaces. If frames from 0
through 4 have sent, then the window contains two spaces before an
acknowledgement is sent.
Error Control
Error Control is a technique of error detection and retransmission.
This technique works on the principle that the sender will not transmit the next frame
until it receives the acknowledgement of the last transmitted frame.
o The sending device keeps a copy of the last transmitted frame until the
acknowledgement is received. Keeping the copy allows the sender to retransmit
the data if the frame is not received correctly.
o Both the data frames and the ACK frames are numbered alternately 0 and 1 so
that they can be identified individually. Suppose data 1 frame acknowledges the
data 0 frame means that the data 0 frame has been arrived correctly and expects
to receive data 1 frame.
o If an error occurs in the last transmitted frame, then the receiver sends the NAK
frame which is not numbered. On receiving the NAK frame, sender retransmits
the data.
o It works with the timer. If the acknowledgement is not received within the allotted
time, then the sender assumes that the frame is lost during the transmission, so it
will retransmit the frame.
o In this case, the sender keeps the copies of all the transmitted frames until they
have been acknowledged. Suppose the frames from 0 through 4 have been
transmitted, and the last acknowledgement was for frame 2, the sender has to
keep the copies of frames 3 and 4 until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The NAK
frame tells the sender that the data have been received damaged. Since the
sliding window is a continuous transmission mechanism, both ACK and NAK must
be numbered for the identification of a frame. The ACK frame consists of a
number that represents the next frame which the receiver expects to receive. The
NAK frame consists of a number that represents the damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost
acknowledgements. Suppose then n-1 frames have been sent before receiving
any acknowledgement. The sender waits for the acknowledgement, so it starts
the timer and waits before sending any more. If the allotted time runs out, the
sender retransmits one or all the frames depending upon the protocol used.
Two protocols used in sliding window ARQ:
o Damaged Frame: When the frame is damaged, then the receiver sends a NAK
frame.
In the above figure, three frames have been transmitted before an error discovered in
the third frame. In this case, ACK 2 has been returned telling that the frames 0,1 have
been received successfully without any error. The receiver discovers the error in data 2
frame, so it returns the NAK 2 frame. The frame 3 is also discarded as it is transmitted
after the damaged frame. Therefore, the sender retransmits the frames 2,3.
o Lost Data Frame: In Sliding window protocols, data frames are sent sequentially.
If any of the frames is lost, then the next frame arrive at the receiver is out of
sequence. The receiver checks the sequence number of each of the frame,
discovers the frame that has been skipped, and returns the NAK for the missing
frame. The sending device retransmits the frame indicated by NAK as well as the
frames transmitted after the lost frame.
o Lost Acknowledgement: The sender can send as many frames as the windows
allow before waiting for any acknowledgement. Once the limit of the window is
reached, the sender has no more frames to send; it must wait for the
acknowledgement. If the acknowledgement is lost, then the sender could wait
forever. To avoid such situation, the sender is equipped with the timer that starts
counting whenever the window capacity is reached. If the acknowledgement has
not been received within the time limit, then the sender retransmits the frame
since the last ACK.
Selective-Reject ARQ
A single additional bit can detect the error, but cannot correct it.
For correcting the errors, one has to know the exact position of the error. For example, If
we want to calculate a single-bit error, the error correction code will determine which
one of seven bits is in error. To achieve this, we have to add some additional redundant
bits.
7.6M
158
OOPs Concepts in Java
Suppose r is the number of redundant bits and d is the total number of the data bits.
The number of redundant bits r can be calculated by using the formula:
2r>=d+r+1
The value of r is calculated by using the above formula. For example, if the value of d is
4, then the possible smallest value that satisfies the above relation would be 3.
To determine the position of the bit which is in error, a technique developed by R.W
Hamming is Hamming code which can be applied to any length of the data unit and
uses the relationship between data units and redundant units.
Hamming Code
Parity bits: The bit which is appended to the original data of binary bits so that the total
number of 1s is even or odd.
Even parity: To check for even parity, if the total number of 1s is even, then the value of
the parity bit is 0. If the total number of 1s occurrences is odd, then the value of the
parity bit is 1.
Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of
parity bit is 1. If the total number of 1s is odd, then the value of parity bit is 0.
o An information of 'd' bits are added to the redundant bits 'r' to form d+r.
o The location of each of the (d+r) digits is assigned a decimal value.
o The 'r' bits are placed in the positions 1,2,.....2 k-1.
o At the receiving end, the parity bits are recalculated. The decimal value of the
parity bits determines the position of an error.
1. The position of r1 = 1
2. The position of r2 = 2
3. The position of r4 = 4
We observe from the above figure that the bit positions that includes 1 in the first
position are 1, 3, 5, 7. Now, we perform the even-parity check at these bit positions. The
total number of 1 at these bit positions corresponding to r1 is even, therefore, the
value of the r1 bit is 0.
Determining r2 bit
The r2 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the second position.
We observe from the above figure that the bit positions that includes 1 in the second
position are 2, 3, 6, 7. Now, we perform the even-parity check at these bit positions. The
total number of 1 at these bit positions corresponding to r2 is odd, therefore, the
value of the r2 bit is 1.
Determining r4 bit
The r4 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the third position.
We observe from the above figure that the bit positions that includes 1 in the third
position are 4, 5, 6, 7. Now, we perform the even-parity check at these bit positions. The
total number of 1 at these bit positions corresponding to r4 is even, therefore, the
value of the r4 bit is 0.
Suppose the 4th bit is changed from 0 to 1 at the receiving end, then parity bits are
recalculated.
R1 bit
The bit positions of the r1 bit are 1,3,5,7
We observe from the above figure that the binary representation of r1 is 1100. Now, we
perform the even-parity check, the total number of 1s appearing in the r1 bit is an even
number. Therefore, the value of r1 is 0.
R2 bit
The bit positions of r2 bit are 2,3,6,7.
We observe from the above figure that the binary representation of r2 is 1001. Now, we
perform the even-parity check, the total number of 1s appearing in the r2 bit is an even
number. Therefore, the value of r2 is 0.
R4 bit
The bit positions of r4 bit are 4,5,6,7.
We observe from the above figure that the binary representation of r4 is 1011. Now, we
perform the even-parity check, the total number of 1s appearing in the r4 bit is an odd
number. Therefore, the value of r4 is 1.
o The binary representation of redundant bits, i.e., r4r2r1 is 100, and its
corresponding decimal value is 4. Therefore, the error occurs in a 4 th bit position.
The bit value must be changed from 1 to 0 to correct the error.