QUESTION: Suppose Alice wants to establish a 100 Mbit/sec data link layer connection to Bob over a copper wire.  Alice sends the data to Bob
as a 4B/5B encoded sequence that is transmitted using NRZI in the usual way. Unfortunately, Bob is not able to decode Alice's data stream because
he built his own network card using the wrong type of transceiver chip. Thus the hardware in Bob's network card incorrectly decodes the incoming
data stream as if it were transmitted using NRZ instead of using NRZI.

PART (a): Briefly explain the difference between NRZ and NRZI.

PART (b): Write a simple translator function (pseudocode will do) that will correct the design error in Bob's network card in software.  That is, your function should read the data coming out of Bob's network card one bit at a time, and write out the corresponding sequence of bits that would have been found by receiver chip that understood NRZI. [Note: You may assume that Bob's receiver found a zero bit just ahead of the first bit that was passed to your function.]



QUESTION: James the secret agent wants to listen in to the messages that Alice is sending to Bob over a direct link. James brings a special Q-brand listening device that is designed to detect NRZ data streams passing through the link. Unfortunately for James, Alice and Bob are using Manchester encoding rather than NRZ, so James must do some extra processing of the bit stream in order to see their messages.

PART (a): Suppose Alice and Bob are using a data rate of 10 Mbps over the link. To what data rate should James set his NRZ listening device to capture all the data? Why?

Part (b): Briefly explain the algorithm James must use to convert the NRZ data stream that is recorded by his listening device into an actual message that Alice sent to Bob.



QUESTION: 1000BASE-T is a standard for transmitting Ethernet frames at a speed of 109 bits/sec using all four of the available wires in a twisted pair cable simultaneously.

PART (a): The transmitter uses an encoder that selects a combination of voltage levels on the four wires for each byte (i.e., 8 bits) of data.  What is the baud rate of this scheme?  How many different voltage combinations would be needed to handle all possible data bytes? Could this be done by having the encoder pick one of four possible voltage levels for each of the four wires? Explain.

PART (b): In addition to the data bytes, the data link protocol must also be able to send a small number (say 10) of  "non-data" control symbols, such as idle, start-frame, end-frame, etc. To avoid the need to do bit stuffing at the data link layer, we want to define an additional, unique combination of voltage levels for each of these control symbols. How many voltage levels per wire are needed now?

PART (c): Briefly explain how an encoding scheme that uses one fixed combination of voltage levels for each byte of data can cause errors if the data contains long sequences of identical data bytes, for example, the black border on an image.

PART (d): Briefly explain how to solve the problem by adding a 9th "clock" bit to the data being sent by the decoder.  Does this change increase the number of voltage levels used compared to part (b)?



QUESTION: Recall that the distinctive feature in Manchester encoding that separates it from the other encoding schemes we talked about, such as NRZ and NRZI, is that Manchester always has state change in the middle of each bit (and possibly also at the boundary between bits), whereas the other schemes only allow state changes to take place at the boundary between bits.

PART (a): Briefly explain how to obtain the Manchester encoding for a message from its NRZ encoding and a clock signal that completes
"low" / "high" cycle every bit time.

PART (b): Suppose Alice was not paying attention during class on the day we discussed the Manchester code, so she accidentally used the NRZI encoding of her message (instead of its NRZ encoding) in combination with the clock signal. Find the simplest feature in Alice's encoded data sequence that Bob could use to decode it. (HINT: draw a diagram!)



QUESTION: Manchester encoding may be thought of as a "1B/2B" code, since each data bit gets expanded into a two-bit channel code symbol of
the form "01" or "10". Note that although there is always a change in the middle of the code word, it is possible for at most two consecutive bits to be the same (e.g., the pair of 1's that result if you send "01" followed by "10"). Find a "2B/3B" code in which pairs of data bits get expanded into a three-bit channel code symbol where (i) there is at least one change within the code word, and (ii) it is possible for at most three consecutive bits to be the same. [HINT: think of the restrictions we used in 4B/5B to limit the number of consecutive 0's.]



QUESTION: In this problem, we are going to estimate the limit on the bandwidth-delay product for a fiber optic channel caused by dispersion (i.e., spreading) of each pulse of light as it passes through the fiber. Therefore, we assume:
  1. The average speed of light is 2×108 meters/sec through fiber; and
  2. If Alice transmits a narrow pulse of light in one end of the the fiber then the fastest part of the pulse travels 1% faster than average and the slowest part ofthe pulse travels 1% slower than average.
PART (a): Suppose Alice is transmitting data over the fiber at 100 Mbps (i.e., 108 bits/sec). What is the distance (in meters) between consecutive bits travelling along the fiber?

PART (b): After travelling what distance (in meters) over the fiber will the fastest part of one pulse for one catch up to the slowest part of the
pulse for the previous bit?  How does you answer change if we increase the data rate to 1 Gbps (i.e., 109 bits/sec)?

PART (c): How much variation in speeds could we tolerate in a system that uses a data rate of 10 Gbps and spans a distance of 1 kilometer if we require the gap between consecutive pulses of light can only shrink to half its original value?