Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

National University of Technology

Computer Science Department


Semester Fall – 2023
Assignment no - 02
Course: Computer Networks
Course Code:CS4015

Name: Muhammad Shahzaib


Reg No: F20605016
Submitted to: Dr. Iqbal
Submission Date: -Dec-2023
Question no 1
Chapter no 3
Exercise no:22 What is the bit rate for each of the following signals?
a. A signal in which 1 bit lasts 0.001 s
Ans: Bit rate = 1/ (bit duration) = 1 / (0.001 s)
Bit rate = 1000 bps = 1 Kbps

b. A signal in which 1 bit lasts 2 ms


Ans: Bit rate = 1/ (bit duration)
Bit rate= 1 / (2 ms) = 500 bps
c. A signal in which 10 bits last 20 J-ls
Ans: Bit rate=1/(bit duration) = 1 / (20 μs/10)
Bit rate= 1 / (2 μs) = 500 Kbps
Exercise no 23: A device is sending out data at the rate of 1000 bps.
a. How long does it take to send out 10 bits?
Ans: Time= 10/1000= 0.01s
b. How long does it take to send out a single character (8 bits)?
Ans: Time=8/1000 =0.008s
Time =8ms
c. How long does it take to send a file of 100,000 characters?
Ans: First we convert characters into bits.
No of bits=8×100,000 characters=800,000 bits
Time=800,000/1000=800s
Exercise no 24: What is the bit rate for the signal in Figure 3.34?

Ans:16ns=8 bits
Bit rate= 8/16×10-9
= 0.5×10-9 =500Mbps
Exercise no 28: A non-periodic composite signal contains frequencies from 10 to
30 KHz. The peak amplitude is 10 V for the lowest and the highest signals and
is 30 V for the 20-KHz signal. Assuming that the amplitudes change gradually
from the minimum to the maximum, draw the frequency spectrum.
Ans: As it is clear mention that signal is non periodic, so the frequency domain is made
up of continuous spectrum.

Exercise no 33: If the bandwidth of the channel is 5 Kbps, how long does it take
to send a frame of 100,000 bits out of this device?
𝑚𝑒𝑠𝑠𝑎𝑔𝑒 𝑠𝑖𝑧𝑒
Ans: Transmission time= 𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ
100,000
Transmission time= =20s
5000𝑏𝑝𝑠

Exercise no 34: The light of the sun takes approximately eight minutes to reach the
earth. What is the distance between the sun and the earth?

Ans: Speed of light= 3×108 m/s = 3×105 km/s


Time in seconds to reach earth= 8×60s=480sec
Distance Between Sun and Earth= 3×105 km/s × 480sec
Distance Between Sun and Earth= 144,000,000 km

Exercise no 35:A signal has a wavelength of 1 μm in air. How far can the front
of the wave travel during 1000 periods?
Ans: Distance= wavelength × time duration
Distance = 1 × 1000 =1000 μm= 1mm
Exercise no 38:A file contains 2 million bytes. How long does it take to download
this file using a 56-Kbps channel? 1-Mbps channel?
Ans: No of Bits file contain =2,000,000 × 8 =16,000,000 b
At 56 Kbps Channel:
16,000,000𝑏
Time= =289 s
56000𝑏𝑝𝑠

At 1Mbps Channel:
16,000,000𝑏
Time= =16s
1×106 𝑏𝑝𝑠

Exercise no 43: We need to upgrade a channel to a higher bandwidth. Answer


the following questions:
a. How is the rate improved if we double the bandwidth?

Ans: C = B log2 (1 + SNR) Here, B stands for bandwidth

The data rate is doubled (C2 =2*C1) .By doubling the bandwidth (2B), the capacity (i.e.
data rate) is doubled.Therefore, bandwidth is directly proportional to the number of bits
sent or to the rate.

b. How is the rate improved if we double the SNR?

Ans: C= B log2 (1 + 2*SNR) The data rate is doubled

❖ C= ≈ B log2 (2*SNR+)
❖ C=B log2 (2) + B log2 (SNR)
❖ C= B + C
Exercise no 44: We have a channel with 4 KHz bandwidth. If we want to send
data at 100 Kbps, what is the minimum SNRdB? What is SNR?
𝑆𝑁𝑅𝑑𝐵
Ans: Minimum SNRdB:Capacity= 𝐵𝑎𝑛𝑑𝑤𝑖𝑡ℎ × 3

3×𝐶 3×100,000𝑏𝑝𝑠
SNRdB= =
𝐵 4000𝐻𝑧

Minimum SNRdB=75

SNR: SNRdb=10 log10 SNR


SNR=10SNRdB/10 =1075/10
SNR=107.5 =31622776.602
Exercise no 47: How many bits can fit on a link with a 2 ms delay if the
bandwidth of the link is :
a. 1 Mbps?
Ans: Number of bits = bandwidth × delay = 1 Mbps × 2 ms = 2000 bits
b. 10 Mbps?
Ans: Number of bits = bandwidth × delay = 10 Mbps × 2 ms = 20,000 bits

b. 100 Mbps?
Ans: Number of bits = bandwidth × delay = 100 Mbps × 2 ms = 200,000 bits

Exercise no 48: What is the total delay (latency) for a frame of size 5 million
bits that is being sent on a link with 10 routers each having a queuing time of
2 μs and a processing time of 1 μs. The length of the link is 2000 Km. The speed
of light inside the link is 2 x 108 mls. The link has a bandwidth of 5 Mbps.
Which component of the total delay is dominant? Which one is negligible?
Ans: Latency = processing time + queuing time + transmission time + propagation time
❖ Processing time = 10 × 1 μs = 10 μs = 0.000010 s
❖ Queuing time = 10 × 2 μs = 20 μs = 0.000020 s
❖ Transmission time = 5,000,000 / (5 Mbps) = 1 s
❖ Propagation time = (2000 Km) / (2 × 108) = 0.01 s
❖ Latency = 0.000010 + 0.000020 + 1 + 0.01 = 1.01000030 s
Negligible:
The transmission time is dominant here because the packet size is huge.
Question no 2
Chapter no 4
Exercise no 15: Draw the graph of the NRZ-L scheme using each of the
following data streams, assuming that the last signa11evel has been positive.
From the graphs, guess the bandwidth for this scheme using the average
number of changes in the signal level.

(C) . 01010101

( d ). 00110011
Exercise no 18: Repeat Exercise 15 for the differential Manchester scheme.
(C) . 01010101

( d ). 00110011
Exercise no 21: Find the 8-bit data stream for each case depicted in Figure
4.36.

Ans(a). NRZ-I: 10011001.


(b). Differential Manchester: 11000100.
(c). AMI: 01110001.
Exercise no 23: A Manchester signal has a data rate of 100 Kbps. Using Figure
4.8, calculate the value of the normalized energy (P) for frequencies at 0 Hz,
50 KHz, 100 KHz.
Ans:(a). f /N = 0/100 = 0 → P = 0.0
(b). f /N = 50/100 = 1/2 → P = 0.3
(c). f /N = 100/100 = 1 → P = 0.4
(d). f /N = 150/100 = 1.5 → P = 0.0
Exercise no 29: What is the maximum data rate of a channel with a bandwidth
of 200 KHz if we use four levels of digital signaling.
Ans: The maximum data rate can be calculated as
N max = 2 × B × n b
N max= 2 × 200 KHz × log 2 4 = 800 kbps

Exercise no 30: An analog signal has a bandwidth of 20 KHz. If we sample this


signal and send it through a 30 Kbps channel what is the SNRdB?
Ans: We can first calculate the sampling rate (fs) and the number of bits per sample (nb)
❖ f max = 0 + 4 = 4 KHz .
❖ f s = 2 × 4 = 8000 sample/s
❖ We then calculate the number of bits per sample.
30,000
❖ nb = = 3.75
8000
❖ We need to use the next integer nb= 4. The value of SNR dB is
❖ SNR dB = 6.02 × nb + 1.72 = 25.8
Exercise no 31: We have a baseband channel with a 1-MHz bandwidth. What
is the data rate for this channel if we use one of the following line coding
schemes?
(a). NRZ-L
Data rate=2 ×B
Date rate= 2 × 1MHz= 2Mbps
(b). Manchester
Data rate=1 ×B
Date rate= 1 × 1MHz= 1Mbps
Exercise no 32: We want to transmit 1000 characters with each character
encoded as 8 bits.
a. Find the number of transmitted bits for synchronous transmission.
Ans: No of transmitted bits= 1000 × 8=8000 bits.
b. Find the number of transmitted bits for asynchronous transmission.
Ans: No of transmitted bits = 1000 × 10 =10000 bits
c. Find the redundancy percentage in each case.
Ans: (a) Redundancy percentage=0%. Because no extra bits used in synchronous
transmission

(b) Redundancy percentage= we send 2000 extra for 8000 required bits Because
in asynchronous transmission we sent 1 start bit at beginning and 1 or more stop bits at
the end or each byte
𝑒𝑥𝑡𝑟𝑎 𝑏𝑖𝑡𝑠 2000
so redundancy percentage = × 100 = × 100 = 25 %.
𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 𝑏𝑖𝑡𝑠 8000

You might also like