Вы находитесь на странице: 1из 1

Homework #4 Solutions

cs349 -- Networks
Questions 2, 3, 4, 5 from Chapter 2
2) Show the 4B/5B encoding, and the resulting NRZI signal,
for the following bit sequence:
message
4B/5B
signal

1110 0101 0000 0011


11100 01011 11110 10101
10111 10010 10100 11001

3) In the 4B/5B encoding, only two of the 5-bit codes end


in two 0s. How many possible 5-bit sequences are there
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?
00xxx is out (8 of them)
xxx00 is out (8 of them)
00x00 got double-counted (2 of them)
Total excluded sequences: 14
Legal sequences remaining: 18
Which is plenty to encode 4 bits!
4) Assuming a framin protocol that uses bit stuffing, show the
signal that corresponds to the following message:
message
signal

1101011111 01011111 101011111 10


11010111110010111110101011111010
^
^
^
|
|
|
stuffed bits

5) Suppose the following bits arrive over a link.


Show the resulting frame after any stuffed bits are
removed:
signal
message

1101011111010111110010111110110
1101011111 1011111 01011111 110

spaced indicate stuffed bits that have been removed


there appear to be no errors in this sequence

Вам также может понравиться