UNI CS 3470Networking

Homework 3 (hand in 9/23/2016 in class)

______

You must show your work (if applicable) to get full credit for any answer! Hint: add spaces to this Word document for your answers, then draw right on it.

1.  Show the NRZ, Manchester, and NRZI encodings for the bit pattern shown below. Assume that the NRZI signal starts out low.

2.  (Similar to Chapter 2, Question 3 in textbook) Show the 4B/5B encoding, and the resulting NRZI signal, for the following bit sequence:

1 0 1 1 0 0 1 0 1 0 0 1 0 1 1 1

3.  In the 4B/5B encoding (Table 2.2 in your textbook), only two of the 5-bit codes used end in two 0s. How many possible 5-bit sequences are there (used by the existing code or not) that meet the stronger restriction of having at most one leading and at most one trailing 0? Could all 4-bit sequences be mapped to such 5-bit sequences?

4.  (Similar to Chapter 2, Question 7) Suppose the following sequence of bits arrives over a link:

1 0 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0

Show the resulting frame after any stuffed bits have been removed. Indicate any errors that might have been introduced into the frame.

5.  (Similar to Chapter 2, Question 18) Suppose we want to transmit the message 10001111 and protect it from errors using the CRC polynomial x3 + 1.

a)  Use polynomial long division to determine the message that should be transmitted.

b)  Suppose the leftmost bit of the message is inverted due to noise on the transmission link. What is the result of the receiver’s CRC calculation? How does the receiver know that an error has occurred?

6.  Create the error-detecting code to go along with the following bitstream using 2-D parity: 0101 1011 1100 1111 (Hint: Draw the 2-D axis.)

7.  Below is an example of the sliding window protocol. Please draw in the missing sender and receiver windows, as well as the missing arrows.

8.  Draw a timeline diagram for the sliding window algorithm with SWS = RWS = 3 frames, for the following two situations. Use a timeout interval of about 2 x RTT.

a)  Frame 4 is lost.

b)  Frames 4 through 6 are lost.