Wednesday, 11 January 2017

Computer Networks problems and solutions for UGC NET/GATE exam - Set 6

26.       Using the generator (divisor) polynomial x3 + x + 1 for CRC, what frame will be transmitted for the data M = x7 + x5 + x3 + 1?
Solution
M(x)=10101001
C(x)=1011
r=3
T(x) = 10101001 111
Note:
Cyclic Redundancy Check: A major goal in designing error detection algorithms is to maximize the probability of detecting errors using only a small number of redundant bits.

Add k bits of redundant data to an n-bit message

Represent n-bit message as n-1 degree polynomial

Algorithm for computing the checksum
1. shift left r bits (append r zero bits to low order end of the frame), i.e., M(x)xr
2. divide the bit string corresponding to G(x) into (xr)M(x).
3. subtract (or add) remainder of M(x)xr / G(x) from M(x)xr using XOR, call the result T(x). Transmit T(x).
27.       Using the generator (divisor) polynomial x4 + x + 1 for CRC, what frame will be transmitted for the data M = x7 + x5 + x3 + 1?
Solution
M(x)=10101001
C(x)=10011
r=4
T(x) = 10101001 1100
28.       A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete slots, with each of the n hosts attempting to use the channel with probability p during each slot. What fractions of the slots are wasted due to collisions?
Solution
The fraction of the slots are wasted due to collisions is

1 - the fraction of the slots without collisions.

Two situations are without collisions:

1) Successful transmission. One station transmits and the rest of them idle. The probability is n x p x (1 - p)^(n - 1).
2) All stations are idle. The probability is (1 - p)^n.

Hence, the fraction that are wasted is
1 - n x p x (1 - p)^(n - 1) - (1 - p)^n.
29.       What is the maximum data rate for a noiseless 1-MHz channel if QAM-256 is used?
Solution
Maximum data rate = 2 B log2 V
= 2 x 1 x log2 256
= 2 x 8 = 16 Mbps
30.       If a binary signal is sent over a 1-MHz channel whose signal-to-noise ratio is 20 dB, what is the maximum achievable data rate?
Solution
Signal-to-Noise ratio (S/N) = 20 dB
    => 10 log10(S/N)=20
=> log10 S/N = 2,
=> S/N =102 = 100
Now, from Shannon's theorem we know,
Max. data rate = B log2(1 + S/N) bits/sec
= 1 x log2 101 = 6.658 Mbps or about 7 Mbps
Note:
The Shannon-Hartley theorem states that the channel capacity is given by
C = B log2(1 + S/N)
where C is the capacity in bits per second, B is the bandwidth of the channel in Hertz, and S/N is the signal-to-noise ratio.

Tuesday, 10 January 2017

Computer Networks problems and solutions for UGC NET/GATE exam - Set 5

21.       A movie DVD holds 120 minutes' movie and takes 5 GB (G is specified as 109 in this case). What is the bandwidth to play this movie DVD?
Solution
5 x 109 x 8 / (120 x 60) = 5.556 Mbps (1 GB = 109 B)
or
5 x 230 x 8 / (120 x 60) = 5.965 Mbps (1 GB = 230 B)
22.       It is desired to send a sequence of computer screen images over an optical fiber. The screen is 480 x 640 pixels, each pixel being 24 bits. There are 60 screen images per second. How much bandwidth is needed, and how many microns of wavelength are needed for this band at 1.30 microns?
Solution
The data rate Δf is 480 x 640 x 24 x 60 bps, which is 442 Mbps. For simplicity, let us assume 1 bps/Hz.
Δf = c Δλ/λ2
Δλ = λ2 Δf/c
where Δf is the bandwidth range, c is the light speed, Δλ is the wavelength range, and lambda is a certain wavelength.
We have Δf = 4.42 x 108, so
          Δλ = 2.5 x 10-6 microns.
The range of wavelengths used is very short.
or If we assume 8 bps/Hz, Δλ = 0.17 x 10-6 microns.
23.       An ADSL system using DMT allocates 3/4 of the available data channels to the downstream link. It uses QAM-64 modulation on each channel. What is the capacity of the downstream link?
Solution
There are 256 channels in all, minus 6 for POTS and 2 for control, leaving 248 for data. If 3/4 of these are for downstream, that gives 186 channels for downstream. ADSL modulation is at 4000 baud, so with QAM-64 (6 bits/baud) we have 24,000 bps in each of the 186 channels.
The total bandwidth is then 4.464 Mbps downstream.
Note:
Discrete multitone (DMT) is a method of separating a Digital Subscriber Line (DSL) signal so that the usable frequency range is separated into 256 frequency bands (or channels) of 4.3125 KHz each. DMT uses the fast Fourier transform (FFT) algorithm for modulation and demodulation. Dividing the frequency spectrum into multiple channels allows DMT to work better when AM radio transmitters are present. Within each channel, modulation uses quadrature amplitude modulation (QAM).
QAM (quadrature amplitude modulation) is a method of combining two amplitude-modulated (AM) signals into a single channel, thereby doubling the effective bandwidth. QAM is used with pulse amplitude modulation (PAM) in digital systems, especially in wireless applications.
POTS, Short for plain old telephone service, which refers to the standard telephone service that most homes use. In contrast, telephone services based on high-speed, digital communications lines, such as ISDN and FDDI, are not POTS. The main distinctions between POTS and non-POTS services are speed and bandwidth.


24.       In a typical mobile phone system with hexagonal cells, it is forbidden to reuse a frequency band in an adjacent cell. If 840 frequencies are available, how many can be used in a given cell?
Solution
Each cell has six other adjacent cells, in a hexagonal grid. If the central cell uses frequency group A, its six adjacent cells can use B, C, B, C, B, and C respectively. In other words, only 3 unique cells are needed. So the answer is 840/3 = 280 frequencies.
25.       If the bit string 0111110111110111110 is subjected to bit stuffing, what output string will be transmitted?
Solution
The output is 0111110011111001111100.
Note:
In data transmission and telecommunication, bit stuffing is the insertion of non information bits into data. Stuffed bits should not be confused with overhead bits (nondata bits).
- Call a flag six consecutive 1s
- On transmit, after five 1s in the data, insert a 0
- On receive, a 0 after five 1s is deleted

Thursday, 5 January 2017

Circuit Switching, Message Switching and Packet Switching

Circuit Switching, Message Switching and Packet Switching

Switching is a technology to connect two end-points.

In circuit switching a physical path is set up between two end-points duration of the connection.

In message switching no physical path is established. The message is stored and forwarded to the destination.

In packet switching no physical path is established. The message is divided into packets, stored and forwarded to the destination.

Packet switching can reduce delay and improve throughput.

Thursday, 29 December 2016

Computer Networks problems and solutions for UGC NET/GATE exam - Set 4

16.       Calculate the power of a signal with dBm = −30.
Solution
Sometimes the decibel is used to measure signal power in milliwatts. In this case, it is referred to as dBm and is calculated as dBm = 10 log10 Pm , where Pm is the power in milliwatts.
dBm = 10 log10 Pm => -30 = 10 log10 Pm
                            => log10 Pm = -3
                            => Pm = 10-3 mW
17.       The loss in a cable is usually defined in decibels per kilometer (dB/km). If the signal at the beginning of a cable with −0.3 dB/km has a power of 2 mW, what is the power of the signal at 5 km?
Solution
The loss in the cable in decibels is 5 × (−0.3) = −1.5 dB.
We can calculate the power as dB = 10log10P2/P1 = -1.5
log10P2/P1 = -0.15
P2/P1 = 10-0.15 = 0.71
P2 = 0.71P1 = 0.7 x 2 = 1.4 mW
18.       The power of a signal is 10 mW and the power of the noise is 1 μW; what are the values of SNR and SNRdB ?
Solution
The values of SNR and SNRdB can be calculated as follows:
                SNR = 10,000 μW / 1 μW = 10,000
                SNRdB = 10log1010,000 = 10log10104
                            = 10 x 4 = 40
Note:
In communication systems, noise is an error or undesired random disturbance of a useful information signal.
There are different types of noises.
Thermal - random noise of electrons in the wire creates an extra signal
Induced - from motors and appliances, devices act are transmitter antenna and medium as receiving antenna.
Crosstalk - same as above but between two wires.
Impulse - Spikes that result from power lines, lightning, etc.
Signal to Noise Ratio (SNR): To measure the quality of a system the SNR is often used. It is defined as the ratio of signal power to the noise power. It is usually given in dB and referred to as SNRdB.

The values of SNR and SNRdB for a noiseless channel are
SNR = signal power/0 = ∞
SNRdB = 10log10∞ = ∞
We can never achieve this ratio in real life; it is an ideal.
19.       Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with two signal levels. The maximum bit rate can be calculated as
Solution
C = 2 B log22n (C= capacity in bps, B = bandwidth in Hz)
= 2 x 3000 x log22 = 6000 bps
Note:
Nyquist Theorem: Nyquist gives the upper bound for the bit rate of a transmission system by calculating the bit rate directly from the number of bits in a symbol (or signal levels) and the bandwidth of the system (assuming 2 symbols/per cycle and first harmonic).
Nyquist theorem states that for a noiseless channel:
C = 2 B log22n
C = capacity in bps
B = bandwidth in Hz
2n = the number of signal levels
20.       Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with four signal levels (for each level, we send 2 bits). The maximum bit rate can be calculated as
Solution
C = 2 B log22n = 2 x 3000 x log24 = 12000 bps

Wednesday, 28 December 2016

Computer Networks problems and solutions for UGC NET/GATE exam - Set 3

11.       What is the bit rate for high-definition TV (HDTV)?
Solution
HDTV uses digital signals to broadcast high quality video signals.
The HDTV screen is normally a ratio of 16 : 9.
There are 1920 by 1080 pixels per screen, and the screen is renewed 30 times per second.
Twenty-four bits represents one color pixel.
1920 x 1080 x 30 x 24 = 1,492,992,000 bps = 1.5 Gbps
Note:
The TV stations reduce this rate to 20 to 40 Mbps through compression.
12.       What is the required bandwidth of a low-pass channel if we need to send 1 Mbps by using baseband transmission?
Solution
The answer depends on the accuracy desired.
a. The minimum bandwidth, is B = bit rate /2, or 500 kHz.
 
b. A better solution is to use the first and the third
    harmonics with  B = 3 × 500 kHz = 1.5 MHz.

c. Still a better solution is to use the first, third, and fifth
    harmonics with B = 5 × 500 kHz = 2.5 MHz.
Note:
A digital signal is a composite analog signal with an infinite bandwidth.

Baseband transmission of a digital signal that preserves the shape of the digital signal is possible only if we have a low-pass channel with an infinite or very wide bandwidth.

If the available channel is a bandpass channel, we cannot send the digital signal directly to the channel; we need to convert the digital signal to an analog signal before transmission.

In baseband transmission, the required bandwidth is proportional to the bit rate;
if we need to send bits faster, we need more bandwidth.

Bandwidth requirements
13.       We have a low-pass channel with bandwidth 100 kHz. What is the maximum bit rate of this channel?
Solution
The maximum bit rate can be achieved if we use the first harmonic. The bit rate is 2 times the available bandwidth, or 200 kbps.
14.       Suppose a signal travels through a transmission medium and its power is reduced to one-half. This means that P2 is (1/2)P1. In this case, the attenuation (loss of power) can be calculated as
Solution
10log10P2/P1 = 10log10 0.5P1/P1 = 10log10 0.5
                                        = 10(-0.3) = -3 dB
A loss of 3 dB (–3 dB) is equivalent to losing one-half the power.
Note:
Attenuation means loss of energy -> weaker signal
When a signal travels through a medium it loses energy overcoming the resistance of the medium.
Amplifiers are used to compensate for this loss of energy by amplifying the signal.
To show the loss or gain of energy the unit “decibel” is used.
dB = 10log10P2/P1
P1 - input signal
P2 - output signal
15.       A signal travels through an amplifier, and its power is increased 10 times. This means that P2 = 10P1 . In this case, the amplification (gain of power) can be calculated as
Solution
10log10P2/P1 = 10log10 10P1/P1
                            = 10log10 10 = 10(1) = 10 dB

Tuesday, 27 December 2016

Computer Networks problems and solutions for UGC NET/GATE exam - Set 2

6.       A nonperiodic composite signal has a bandwidth of 200 kHz, with a middle frequency of 140 kHz and peak amplitude of 20 V. The two extreme frequencies have an amplitude of 0. Draw the frequency domain of the signal.
Solution
The lowest frequency must be at 40 kHz and the highest at 240 kHz. Figure below shows the frequency domain and the bandwidth.
7.       A digital signal has eight levels. How many bits are needed per level?
Solution
We calculate the number of bits from the formula,
Number of bits per level = log28 = 3
Each signal level is represented by 3 bits.
Note:
Two digital signals: one with two signal levels and the other with four signal levels.
8.       A digital signal has nine levels. How many bits are needed per level?
Solution
We calculate the number of bits by using the formula.
Number of bits per level = log29 = 3.17
Each signal level is represented by 3.17 bits. However, this answer is not realistic. The number of bits sent per level needs to be an integer as well as a power of 2. For this example, 4 bits can represent one level.

9.       Assume we need to download text documents at the rate of 100 pages per sec. What is the required bit rate of the channel?
Solution
A page is an average of 24 lines with 80 characters in each line. If we assume that one character requires 8 bits (ascii), the bit rate is
100 x 24 x 80 x 8 = 1,536,000 bps = 1.536 Mbps
10.       A digitized voice channel, is made by digitizing a 4-kHz bandwidth analog voice signal. We need to sample the signal at twice the highest frequency (two samples per hertz). We assume that each sample requires 8 bits. What is the required bit rate?
Solution
The bit rate can be calculated as
2 x 4000 x 8 = 64,000 bps = 64 kbps

Saturday, 24 December 2016

Computer Networks problems and solutions for UGC NET/GATE exam - Set 1

1.       The power we use at home has a frequency of 60 Hz. The period of this sine wave can be determined as follows:
Solution
T = 1/f = 1/60 = 0.0166 s
= 0.0166 x 103 ms = 16.6 ms
2.       The period of a signal is 100 ms. What is its frequency in kilohertz?
Solution
First we change 100 ms to seconds, and then we calculate the frequency from the period (1 Hz = 10−3 kHz).
100 ms = 100 x 10-3 s = 10-1 s
f = 1/T = 1/10-1 Hz = 10 Hz
= 10 x 10-3 kHz = 10-2 kHz
Note:
Frequency is the rate of change with respect to time.
Change in a short span of time means high frequency.
Change over a long span of time means low frequency.
3.       A sine wave is offset 1/6 cycle with respect to time 0. What is its phase in degrees and radians?
Solution
We know that 1 complete cycle is 360°. Therefore, 1/6 cycle is
1/6 x 360 = 60o
= 60 x 2π/360 rad = π/3 rad = 1.046 rad
Note:
Phase describes the position of the waveform relative to time 0.
Three sine waves with the same amplitude and frequency, but different phases
4.       If a periodic signal is decomposed into five sine waves with frequencies of 100, 300, 500, 700, and 900 Hz, what is its bandwidth? Draw the spectrum, assuming all components have a maximum amplitude of 10 V.
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
B = fh - fl = 900 – 100 = 800 Hz
The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz (see Figure).
Note:
The bandwidth of a composite signal is the difference between the highest and the lowest frequencies contained in that signal.
5.       A periodic signal has a bandwidth of 20 Hz. The highest frequency is 60 Hz. What is the lowest frequency? Draw the spectrum if the signal contains all frequencies of the same amplitude.
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
B = fh - fl => 20 = 60 - fl => fl = 60 – 20 = 40 Hz

The spectrum contains all integer frequencies. We show this by a series of spikes (see Figure).