Professional Documents
Culture Documents
Chapter 3: Sample Questions, Problems and Solutions Bölüm 3: Örnek Sorular, Problemler Ve Çözümleri
Chapter 3: Sample Questions, Problems and Solutions Bölüm 3: Örnek Sorular, Problemler Ve Çözümleri
ANS:
a) 00000100 01000111 11100011 11100000 01111110
b) 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110
c) 01111110 01000111 110100011 11100000 011111010 0111110
ANS:
d) 01111110 11010101 10100011 10100011 10101001 10100011 10100011 10100011
01111110 01111110
e) 01111110 11010101 10100011 10101001 10100011 011111010 0111110
(Chapter 3, Problem 3)
Given the output after byte-stuffing: FLAG A B ESC ESC C ESC ESC ESC FLAG
ESC FLAG D F FLAG. What is the original data?
ANS:
A B ESC C ESC FLAG FLAG D F
(Chapter 3)
Given the output after byte-stuffing: FLAG A B ESC ESC C ESC ESC ESC FLAG
ESC FLAG D FLAG. What is the original data?
ANS:
A B ESC C ESC FLAG FLAG D
(Chapter 3)
A B ESC C ESC FLAG FLAG D is given. This data fragment occurs in the middle
of a data stream for which the byte-stuffing algorithm described in the text is used.
What is the output after stuffing?
ANS:
After stuffing, we get
A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D
(Chapter 3)
A bit string, 0111101111101111110, needs to be transmitted at the data link layer. What
is the string actually transmitted after bit stuffing?
ANS:
The output is 011110111110011111010
(Chapter 3, Problem 9)
Eight bit messages are transmitted using a Hamming code. How many check bits are
needed to ensure that receiver can detect and correct single bit errors? Show the bit
pattern transmitted for the message 11001010. Assume that odd parity is used in the
Hamming code.
ANS:
m+r+1≤2r , m=8
8+r+1≤2r, r=4
n=m+r=8+4=12
1 2 3 4 5 6 7 8 9 10 11 12
20 21 22 23
? ? 1 ? 1 0 0 ? 1 0 1 0
3=20+21=1+2
5=20+22=1+4
6=21+22=2+4
7=20 +21+22=1+2+4
9=20+23=1+8
10=21+23=2+8
11=20 +21+23=1+2+8
12=22+23=4+8
Check bit 20 is used for data in positions 3, 5, 7, 9, 11 so its value is 1 because of 110111
Check bit 21 is used for data in positions 3, 6, 7, 10, 11 so its value is 1 because of 100011
Check bit 22 is used for data in positions 5, 6, 7, 12 so its value is 0 because of 10000
Check bit 23 is used for data in positions 9, 10, 11, 12 so its value is 1 because of 10101
ANS:
The encoded value is 101001001111
ANS:
X 7 + X 5 +1 X 3 +1
-------------
X7 + X4 X4 + X2 + X
---------------
X 5 + X 4 +1
X5 + X2 +0
----------------
X 4 + X 2 +1
X4 + X
---------------
X 2 + X + 1 is remainder
A bit stream 10101010 is transmitted using the standard CRC method. The generator
polynomial is x3+x2+1. Show the actual bit string transmitted. Suppose the second bit
from the left is inverted during transmission. Show that this error is detected at the
receiver’s end.
ANS:
The frame is 10101010
The generator is 1101= x3+x2+1
So we must append 3 zeros to the message: 10101010000
10101010000 1101
1101 11011110
01111
1101
1001
1101
01000
1101
01010
1101
01110
1101
110 is remainder
11101010110 1101
1101 10101010
001110
1101
001110
1101
001111
1101
00100 is a remainder
As we see the remainder is different from zero.
Thus, the receiver detects the error and can ask for a retransmission.
A channel has a bit rate of 4 Kbps and a propagation delay of 20 msec. For what range
of frame sizes does stop-and-wait give an efficiency of at least 50 percent?
ANS:
Efficiency will be 50% when the time to transmit the frame equals the round-trip
propagation delay. At a transmission rate of 4 bits/ms, 160 bits takes 40 ms. For frame
sizes above 160 bits, stop-and-wait is reasonably efficient.
Frames of 1000 bits are sent over a 1-Mbps channel using a geostationary satellite whose
propagation time from the earth is 270 msec. Acknowledgements are always
piggybacked onto data frames. The headers are very short. Three-bit sequence numbers
are used. What is the maximum achievable channel utilization for
a) Stop-and-wait.
b) Protocol 5.
c) Protocol 6.
ANS:
Let t=0 denote the start of transmission. At t=1 msec, the first frame has been fully
transmitted. At t=271 msec, the first frame has fully arrived. At t=272 msec, the frame
acknowledging the first one has been fully sent. At t=542 msec, the acknowledement-
bearing frame has fully arrived. Thus, the cycle is 542 msec. A total of k frames are sent
in 542 msec, for an efficiency of k/542. Hence
a) k=1, efficiency=1/542=0,18%
b) k=7, efficiency=7/542=1,29%
c) k=4, efficiency=4/542=0,74%
(Chapter 3, Problem 29-2)
Frames of 10000 bits are sent over a 1-Mbps channel using a geostationary satellite
whose propagation time from the earth is 270 msec. Acknowledgements are always
piggybacked onto data frames. The headers are very short. Three-bit sequence numbers
are used. What is the maximum achievable channel utilization for
a) Stop-and-wait.
b) Protocol 5.
c) Protocol 6.
ANS:
Let t=0 denote the start of transmission. At t=10 msec, the first frame has been fully
transmitted. At t=280 msec, the first frame has fully arrived. At t=290 msec, the frame
acknowledging the first one has been fully sent. At t=580 msec, the acknowledement-
bearing frame has fully arrived. Thus, the cycle is 580 msec. A total of k frames are sent
in 542 msec, for an efficiency of k/542. Hence
d) k=1, efficiency=1/580=0,17%
e) k=7, efficiency=7/580=1,21%
f) k=4, efficiency=4/580=0,69%
A 100-km-long cable runs at the T1 data rate. The propagation speed in the cable is 2/3
the speed of light in vacuum. How many bits fit in the cable?
ANS:
The propagation speed in the cable is 200,000 km/sec, or 200 km/msec, so a 100-km
cable will be filled in 500 microsec. Each T1 frame is 193 bits sent in 125 microsec. This
corresponds to four frames, or 772 bits on the cable.
A 50-km long cable run at the T1 data rate. The propagation speed in the cable is 2/3 the
speed of light in vacuum. How many bits fit in the cable?
ANS:
The propagation speed in the cable is 200,000 km/sec, or 200 km/msec.
So a 50 km cable will be filled in 250 µsec.
Each T1 frame is 193 bits sent in 125 µsec.
This corresponds to two frames, or 386 bits on the cable.