程序代写代做代考 algorithm COMP90007 Internet Technologies Week 4 Workshop

COMP90007 Internet Technologies Week 4 Workshop
Semester 2, 2021
Suggested solutions
© University of Melbourne 2021
1

Question 1 (Sampling)
■ Consider a telephone signal that is bandwidth limited to 4 kHz.
❑ (a) At what rate should you sample the signal so that you can completely reconstruct the signal?
min. sampling rate = 2 × 4000 = 8 kHz = 8000 samples/s
❑ (b) If each sample of the signal is to be encoded at 256 levels, how many bits are required for each sample?
256 possible values per sample requires log2(256) = 8 bits/sample
❑ (c) What is the minimum bit rate required to transmit this signal? 8 bits/sample × 8000 samples/sec = 64 kbps
Note: This is a direct application of the Sampling Theorem and forms the basics of the application of the theorem, i.e. without considering data rates.
2

Question 2 (Sampling)
■ Is the Sampling theorem true for optical fibre or only for copper wire?
• The Sampling theorem is a property of mathematics and has nothing to do with technology.
• The Sampling theorem is independent of the transmission medium. The Sampling theorem states that if you have a function which does not contain any frequency components (sines or cosines) above f, then by sampling at a frequency of 2f, you capture all the information there is.
3

Question 3 ( Rate)


Given a noiseless 4 kHz channel, what is the maximum data rate of the communication channel?
A noiseless channel can carry an arbitrarily large amount of information, e.g. there can be an infinite number of signalling levels, this is because there is no noise. This is a neat observation and the level information is not restricted by the question in any way. Shannon specifies a limit on the information rate based on given noise level.
4

Question 4 ( Rate)
■ The bandwidth of a television video stream is 6 MHz. How many bits/sec are sent if four-level digital signals are used? Assume a noiseless channel
The maximum baud rate is 12 M symbols/sec
Four levels of signalling provide: log2 4 = 2 bits/symbol
Hence, the total data rate is: 12 M symbols/sec × 2 bits/symbol = 24 Mbps
5

Question 4 ( Rate)
■ The bandwidth of a television video stream is 6 MHz. How many bits/sec are sent if four-level digital signals are used? Now assume a S/N of 20dB (i.e. 100).
Using Shannon’s theorem, we have: B x log(1+S/N)
= 6MHz x log2(1+100) = 6MHz x 6.65 = 39.9Mbps
Using Nyquist’s theorem, we have: 2B x log2 V =2*6MHzxlog2 4=12MHzx2=24Mbps
The bottleneck is therefore the Nyquist limit, giving a maximum channel capacity of 24Mbps.
6

Question 5 (Framing)
The following character encoding is used in a data link protocol:
A: 01000111 B: 11100011 FLAG: 01111110 ESC: 11100000
Show the bit sequence transmitted (in binary) for the four-character frame payload A B ESC FLAG, when each of the following framing methods are used:
(a) Character count
(b) Flag bytes with byte stuffing
(c) Starting and ending flag bytes, with bit stuffing
Answer:
1. 00000101 01000111 11100011 11100000 01111110 5 A B ‘ESC’ ‘FLAG’
2. 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110 FLAG A B ESC ‘ESC’ ESC ‘FLAG’ FLAG
3. 01111110 01000111 110100011 111000000 011111010 01111110 FLAG A B ‘ESC’ ‘FLAG’ FLAG
7

Question 6 (Framing)
The following data fragment occurs in the middle of a data stream for which the byte-stuffing algorithm as described in the lecture is used:
A B ESC C ESC FLAG FLAG D.
What is the output after stuffing?
Answer:
After stuffing we get:
A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D.
8