Computer Networks UNIT 1
Computer Networks UNIT 1
Unit 1:
CH 1: Introduction to Data Communication and Networking
• Introduction
• Fundamental concepts
• Data communications
• Protocols
• Standards
• Signal propagation
• Analog and digital signals
• Bandwidth of a signal and a medium
CH 2: Analog and Digital transmission
• signal, Analog transmission
• Baud Introduction
• Analog signal, Analog transmission
• Digital signal, Digital transmission
• Digital rate and bits per second
• Analog signal, Digital transmission
CH 3: Modes of data transmission
❖ Introduction
❖ Parallel and Serial communication
❖ Asynchronous, Synchronous communication
❖ Simplex, half duplex and full-duplex communication
1
Introduction to Data Communication and Networking
❖ Introduction
➢ Before we understand how computer networks and inter-networks work, it is
essential to know how data can be transmitted from a source to a destination in
the first place.
➢ This forms the basis for all data communications. The principle of signal
propagation is used for this purpose.
❖ Fundamental Concepts
➢ Basic Idea
Communication can be defined as the exchange of information between two
humans. Data communications can be defined the exchange of information
between two computers.
The figure shows one computer (sender) sending a message to another computer
(receiver) over a wire (called transmission medium).
2
Modem: MODEM receives data from the outside (Internet) and sends
data out (to the Internet). It is the first and only device between your
network and the Internet
❖ Data communications
➢ Data communication refers to the process of transferring data between
devices or systems over a transmission medium, enabling them to share
information.
➢ The data can be in the form of text, images, video, or any other type of digital
or analog information, and it is transmitted using various communication
technologies such as electrical signals, radio waves, or optical signals.
➢ The core goal of data communication is to ensure that information is
exchanged effectively, accurately, and securely between two or more devices.
➢ This is crucial for enabling everything from internet browsing and emailing to
cloud computing and real-time video calls.
Timely delivery: Data must travel from the sender to the receiver in a
finite amount of time. The term finite is quite vague, and would depend
on the reasons why data communication is taking place.
3
❖ Protocols
➢ A protocol is a set of rules and conventions that govern data
communications.
➢ The sender and the receiver, the two key parties in data communication, must
agree on a common set of rules, i.e., protocols before they can communicate
with each other.
➢ Example: Just as a person speaking only French cannot communicate with
another person who understands only English, two devices that are connected
need not necessarily be able to communicate with each other unless they agree
on a set of data communication protocols.
➢ Two devices wishing to communicate with each other cannot just begin data
transmission arbitrarily. That is, one device cannot simply start sending bit
streams to the other. The two devices must agree on a set of rules before this
transmission can begin. Otherwise, how would the receiver know what the
sender has sent? Conversely, how would the sender know if the receiver has
correctly received the data that it had sent?
4
❖ Standards
➢ Data communication standards can be classified into the following two
categories: de facto (which means by convention) and de jure (which means
by regulation).
➢ De facto standards can be further divided into proprietary and non-proprietary
standards.
Proprietary standard:
• Invented and owned by organizations.
• These standards gain popularity after the owner’s successful
usage. This is because once the products of the organization using
these standards are popular, the standards automatically gain
popularity.
• Another name for proprietary standards is “closed” because
they close off communication with devices/systems of other
vendors.
Non-proprietary standard:
• Non-proprietary or open standards are those that are developed by
an organization/committee/group, which become popular and
vendors start supporting them. They are open because anybody
adhering to those automatically gain access to all others following
those standards.
➢ De jure standards are the standards that have been legislated by an official
body. These are usually led by governments or government-appointed agencies.
❖ Signal propagation
➢ Propagation Is Nothing but Movement from One Place To Another.
➢ Signal Propagation Means Signal Moving from One Place to Another Place.
➢ Suppose you have a steel rod with two ends A and B, with X as an intermediate
point as shown in Fig. 1.3
➢ Now suppose that we apply heat to end A (either by immersing it in hot water
or a furnace) as shown in Fig. 1.4.
➢ Initially, the heat would be felt only at the end of A.
➢ However, after some time, we would also feel the heat at point X.
➢ Why does this happen? This is where the principle of energy transfer
(transmission) and consequently signal propagation comes into the picture.
5
➢ The electrical signal behaves exactly in the same way. Instead of applying heat,
we apply voltage to the electrical wire A-X-B.
➢ Instead of atoms oscillating and transferring kinetic energy, the electrons
transfer electrical charge to adjacent electrons and the graph of voltage versus
time, i.e., electrical signal, you get at point A in the wire is reproduced at point
X after some finite propagation delay and the same is reproduced at point B
after a little more propagation delay.
➢ If this were not true, telephone systems would be impossible. When we talk on
the telephone, our speech generates sound waves, which generate electrical
signals of similar shape as the sound waves.
➢ These signals traverse across the telephone wires through various
switches/exchanges and reach the telephone set of the receiver.
➢ At the receiver’s end, the electrical signal generates sound waves of similar
shape.
➢ Due to the principle of signal propagation discussed above, the shape of the
signal traverses as it was generated, and therefore, we hear the same speech.
6
Digital Signals
7
❖ Bandwidth of a signal and a medium
8
2. Period: The signal reaches the peak and returns to its original starting position
in time T. This time taken for the completion of one cycle is called period, which
is shown as 1/10th of a second in the figure. This is because the particle in our
example of Fig. 1.8(a) was rotating at 10 revolutions per second.
The Time It Takes for One Wave to Complete (One Cycle)
Relationship With Frequency Period= 1/Frequency
Example: If The Frequency Is 2 Hz (2 Wave Per Second).
The Period Is Period=1/2 (0.5) Seconds Per Wave.
9
The Position of The Wave at a Specific Time
Example: Imagine 2 people jumping on the Trampoline:
If they jump together, they are in “Phase”
If one jumps and the other one is landing, they are
“Out of the phase”;
10
Analog and Digital transmission
o There are two major types of signals:
1. Analog Signal
2. Digital Signal
o Analog Signal Can Be Transmitted as It Is, That Is, As an Analog Signal.
o Alternatively, An Analog Signal Can Be Transmitted as A Digital Signal, By
Encoding the Signal By certain methods.
o A Digital Signal Can Be Transmitted as It Is, That Is, As A Digital Signal, Or
It Can Be Encoded As An Analog Signal Before Transmission.
a. There are possible combinations available now:
2. Analog Signal, Analog Transmission
3. Digital Signal, Digital Transmission
4. Digital Signal, Analog Transmission
5. Analog Signal, Digital Transmission
11
❖ Digital signal, Digital transmission
o Information from a computer is in the form of digital signals.
o A digital signal has an Infinite bandwidth, whereas any medium has
only a limited bandwidth.
o A regenerative repeater is a device that amplifies and regenerates a digital signal
to improve data quality.
o We show three points on the path: A, B and C. At point A, the signal is in its
original digital form. It gets distorted at point B. However, you can still
recognize the signal as 0100101.
o The repeater recognizes the bits and outputs the signal in its original form at point C
o Therefore, as the signal is generated, and enters any medium at that point itself,
only limited frequencies are permissible on the medium depending upon its
bandwidth (this has nothing to do with the noise).
o If we add all the frequencies admitted on the medium, the resultant signal
would not be the same as a digital signal. Therefore, the signal is distorted from
the original digital signal to begin with.
o As it traverses over the medium, noise adds further distortion. Beyond a certain
distance, the signal becomes unrecognizable from the original one.
Therefore, hardware equipment called aregenerative repeater or repeater is
used to regenerate the digital signal as shown in Fig. 2.2
o However, only one repeater will not do; many such repeaters as shown in Fig.
2.3 will be required on the line.
o The distance between the repeaters is very crucial. We may like to increase
that distance as much as possible to reduce the cost but then there is also a
disadvantage of this modification.
o If this distance is very large, the original signal may get so distorted that it
may be difficult to differentiate between 0 and 1.
o Reconstruction of the original signal, therefore, would become very difficult
or at best erroneous.
12
❖ Digital rate and bits per second
Digital rate refers to the speed at which digital data (like 0s and 1s) is
transmitted or processed. It tells us how much data is sent or received in a
certain amount of time.
Bits per Second (bps)
• Bits per second (bps) is the unit used to measure digital rate.
• "Bits" are the smallest unit of digital data (like 0 or 1).
• Per second means how many bits are sent or received in one second.
Example:
If a digital rate is 100 bps, it means 100 bits (0s and 1s) are transmitted every
second.
Higher bps = Faster data transfer.
If you download a file, a higher bps means the file downloads faster.
Internet speed is often measured in kilobits per second (Kbps), megabits per
second (Mbps), or gigabits per second (Gbps):
• 1 Kbps = 1,000 bps
• 1 Mbps = 1,000,000 bps
Bits per second (bps) tells us how quickly digital data (0s and 1s) is moving. More
bits per second means faster communication or internet speed.
13
o The idea is somehow to represent an analog signal into digital bits and then
transmit it as a digital signal. Pulse Code Modulation (PCM) is the most
popular.
The basic steps in PCM are given below
At Source:
1. Sample the analog signal at regular intervals say t as shown in the figure
2. Convert the analog signal into some discrete values.
3. Convert these values into binary numbers by assigning a fixed number of
bits for each value.
4. Convert the binary numbers as a digital signal by concatenating all these
binary numbers.
At destination:
1. Convert the digital signal into binary numbers.
2. Separate the discrete values of signals by using the number of bits for
each discrete value.
3. Reconstruct the original analog signal.
❖ Baud Introduction
o Definition: The number of signal changes or symbols transmitted per
second.
o Key Idea: A single signal change can represent one or more bits depending
on the encoding scheme.
o For example:
▪ If 1 signal = 1 bit, then Baud Rate = Bits per Second (bps).
▪ If 1 signal = 2 bits, then Baud Rate = bps / 2.
o Many people confuse between baud rate and bit rate or bits per second
(bps). They use these terms synonymously. However, there is a difference
between them.
o The baud rate is the number of times the signal level changes in a channel
per second.
o This signal level could be amplitude, frequency, or phase. As we know,
physically, the hardware limits the maximum number of times this signal
change can happen.
15
Modes of data transmission
❖ Introduction
o Digital data can be transmitted in a number ways from the source to the
destination. These modes of data transmission can be outlined as follows:
1. Parallel and Serial Communication
2. Asynchronous, Synchronous and Isochronous Communication
3. Simplex, Half-duplex and Full-duplex Communication
16
o Problem of Skew
o When the skew happens, the bits 10011001 are sent from the source to
the destination, but they traverse at different speeds.
17
o Serial Communication
o In Serial transmission, data is sent bit by bit from one computer to
another using a two-way path.
o Each bit has its timing. In Serial Transmission, 8 bits are sent at a time,
with extra bits at the start and end (called Parity Bits), which are 0 and
1.
o This method uses special cables to send data over long distances. The
data is sent in order. It uses a 9-pin cable shaped like a D to connect
data in a series.
o When data is sent over long distances, it's sent one bit at a time
(serially), rather than all bits at once (parallel). This is because serial
communication is more reliable and requires fewer wires.
o The sender converts parallel data (e.g., a byte, which is 8 bits) into a
serial stream (one bit at a time).
o At the destination, the measurement of signal values is done in the
middle of the bit durations as shown in Fig. 3.3.
o This is because if the values are taken at the edge or a point where The
problem of skew the bit value changes (shown as point A in the figure),
the reading will be indeterminate.
o At the destination, all the bits are collected, measured, and put
together as bytes in the memory of the destination. This requires
conversion from serial to parallel.
18
o In serial data transmission, we have to identify where the character
starts.
o We have to also identify the middle position of each bit interval so that
measurement can be taken.
o Normally, the transmitter and the receiver have two different clocks.
The point is to synchronize the clock of the receiver exactly with that
of the transmitter so that correct readings result and the bit values are
understood correctly.
o This is essentially a problem of synchronization.
19
o A line adapter or interface generally achieves this task of
synchronization. It achieves a few other things also. We will call it
only ‘serial interface’ in this text.
o Electronics devices called Universal Asynchronous Receiver
Transmitter (UART) and Universal Synchronous Asynchronous
Receiver Transmitter (USART) are examples of such an interface.
USART can be used for both the asynchronous and synchronous
transmission. On the other hand, UART is used only when the
transmission is asynchronous.
Asynchronous communication:
o In Asynchronous Transmission, data is sent in the form of bytes or
characters.
o This transmission is the half-duplex type transmission.
o In this transmission start bits and stop bits are added to data. It does not
require synchronization.
o Asynchronous transmission is like sending individual text messages
without knowing exactly when the other person will read them.
o The sender and receiver do not share a common clock signal.
o Instead, data is sent one byte or character at a time, with start and stop
bits indicating the beginning and end of each byte.
o Each piece of data is sent independently, with gaps in between, allowing
the receiver to process each byte as it arrives.
o It’s flexible and simpler to implement, especially useful for
communications where data is sent intermittently.
20
o This diagram illustrates asynchronous communication and the flow of
bits when transmitting data. Let's break it down step-by-step:
1. Idle State:
• When no data is being transmitted, the line stays in an idle
state (binary 1).
• This is the resting state of the communication line.
2. Start Bit:
• To begin the transmission of a character, the sender transmits
a start bit (binary 0).
• The start bit signals the receiver to prepare for incoming
data.
3. Data Bits (b₀ to b₇):
• After the start bit, the actual data (character) is transmitted as
data bits.
• In this example, 8 data bits (b₀ to b₇) are being sent.
• Each bit represents a portion of the character in binary form.
4. Parity Bit (P):
• After the data bits, a parity bit (P) is sent (optional).
• The parity bit is used for error detection:
• It ensures that the total number of 1s in the data bits
and the parity bit is even (even parity) or odd (odd
parity), depending on the agreement between sender
and receiver.
5. Stop Bits:
• Following the parity bit, stop bits are transmitted.
• In this case, 2 stop bits (binary 1) are used to signal the end
of the character.
• The stop bits also return the line to the idle state (binary 1).
6. Next Chapter:
• After the stop bits, the line remains idle until the next
character is ready to be sent.
• The process then repeats: start bit → data bits → parity bit
→ stop bits.
Synchronous Communication
o Synchronous data transmission is a data transfer method which is a
continuous stream of data signals accompanied by timing signals.
o It helps to ensure that the transmitter and the receiver are
synchronized with each other.
o This communication method is mostly used when large amounts of
data need to be transferred from one location to the other.
o In Synchronous Transmission, data is sent in the form of blocks or
frames. This transmission is the full-duplex type.
21
o Between sender and receiver synchronization is compulsory. In
Synchronous transmission, there is no gap present between data.
o It is more efficient and more reliable than asynchronous
transmission to transfer a large amount of data.
Isochronous Communication
o This method combines various approaches of asynchronous and
synchronous communications.
o In this method, as in the asynchronous method, each character has both
start and stop bits.
o However, in the isochronous method, the idle period between the two
characters cannot be random.
o For instance, all idle periods of no transmission consist of an exact
multiple of 1 character time interval.
o Therefore, if the time to transmit a character (including its parity, start,
and stop bits) is t, the time interval between characters cannot be random
as in the asynchronous method.
o It is also not 0 as in the synchronous method. It has to be t, 2t, 3t ... nt
where n is a positive integer in isochronous communication.
22
o Figure 3.10 depicts the differences between the three approaches.
o The main reason for using the isochronous method over asynchronous
method is speed.
o In practice, asynchronous transmission is limited to a data rate of 2,400
bits per second as per the timing precision of the transmitting and
receiving modems.
o By contrast, isochronous transmission can achieve data rates of up to
19,200 bits per second.
1. Simplex Communication:
❖ In simplex mode, the communication is unidirectional only.
❖ This is similar to a one-way street, where vehicles are allowed to drive only in
a single direction.
o Here, one of the communicating devices can only send data, whereas the
other can only receive it like in a radio or a TV nowadays. Keyboard to
computer monitor data transmission is a simple example of this. Another
example is shown in Fig. 3.12, where one host can only send data, whereas
the other can only receive it.
23
2. Half-Duplex Communication:
o Unlike what happens in the simplex mode, in case of half-duplex mode, both
devices can transmit; however, not at the same time.
o When one device is sending data, the other must only receive it, and vice
versa.
o This is conceptually similar to a street that has a single lane for vehicle
traffic.
o When vehicles from one side are coming, the vehicles from the other side
must wait.
o Thus, both sides take turns to send data in the case of half-duplex
transmission.
o This requires a definite turnaround time for the device to change from the
receiving mode to the transmitting mode.
o Due to this delay, half-duplex communication is slower. However, it is more
convenient than Simplex, as both devices can send and receive data.
o Half-duplex is normally implemented by using a two-wire circuit (1 for data,
1 for ground).
o In this case, the full bandwidth of the wire is used while sending the data in
either direction.
o Examples of half-duplex communication are conversations over a walkie-
talkie.
24
3. Full-Duplex Communication:
o In full-duplex (or simply duplex) communication mode, both the devices can
transmit data at the same time.
o It means that both devices are capable of sending as well as receiving data at
the same time.
o This is like a two-way street with traffic flowing in both directions at the
same time. This is shown in Fig. 3.15.
o It is also similar to a telephone conversion, where both parties can talk to
each other simultaneously.
o In a four-wire circuit, there are two wires for data and two for ground.
o Thus, we can have one data wire for transmission in each direction;
increasing the bandwidth and therefore the data rate.
25