4.3.3 · D4Computer Networks

Exercises — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley

3,624 words16 min readBack to topic

Before we start, let us name every symbol the way a picture names it — no formula below uses a letter we have not first pointed at.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley

How to read Figure 1 (what is). The horizontal axis is frequency. The channel only passes the shaded band between and ; everything outside is blocked (killed). The blue double-arrow is — the width of the passable band. The key visual: a signal that tries to wiggle faster than falls off the right edge and cannot get through. That right edge is exactly why change-rate is capped, and why shows up in Nyquist (next figure).

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley

How to read Figure 2 (what is, and from sampling). Left panel: the voltage axis is sliced into horizontal buckets; one symbol picks a bucket, and 4 buckets label bits — this is the picture behind "more levels = more bits." Right panel: the Sampling Theorem made visual — a smooth bandwidth- wave (blue) is fully pinned down by dots taken times per second (yellow). Fewer than dots and a different wave could sneak through the same dots (you'd lose information); is the minimum that captures everything. That is the origin of the "2" in .


Level 1 — Recognition

Exercise 1.1

In NRZ-L, a receiver sees a flat high voltage held for the whole bit period. What bit is that, and what single word names the danger when this flat line lasts a long time?

Recall Solution

WHAT: In NRZ-L high voltage . So a held-high line is a run of 1s. WHY the danger: with no voltage change, there is no edge for the receiver to lock its clock onto. The receiver's internal "tick-tock" drifts and it miscounts how many identical bits passed. The word: synchronization loss (loss of clocking).

Exercise 1.2

Write down which capacity formula applies to a noiseless channel and which applies to a noisy channel.

Recall Solution
  • Noiseless → Nyquist: .
  • Noisy → Shannon: . The deeper reason (not just a name-match): on a noiseless line nothing limits how many levels you may use — so capacity is limited only by how fast you can push symbols, which is the term. Adding always helps, so is a free knob and Nyquist has no in it. On a noisy line, noise smears levels into each other, so noise itself caps how many levels are distinguishable — that is why Shannon's formula contains (the noise) instead of (the levels). In short: Nyquist limits speed of change; Shannon limits distinguishability.

Exercise 1.3

A symbol on a line can take one of distinct voltage levels. How many bits does one symbol carry?

Recall Solution

WHY : bits make distinct patterns. To label 8 levels we need , so .


Level 2 — Application

Exercise 2.1

A noiseless channel has bandwidth Hz and uses levels. Find the maximum bit rate.

Recall Solution

WHY Nyquist and not Shannon (the underlying principle): the channel is stated noiseless — there is no noise to smear levels, so the only thing capping us is how fast the signal can change, which the bandwidth fixes at symbols/sec (the sampling picture in Figure 2). Shannon's term is meaningless here because . So the right law is the one built purely from speed-of-change and levels: Nyquist. Step 1 (bits/symbol): . Step 2 (Nyquist):

Exercise 2.2

A telephone line has Hz and SNR dB. Find the Shannon capacity.

Recall Solution

WHY Shannon here: the problem gives an — that is a fingerprint of noise. A noisy line's true ceiling is set by how many levels noise still lets you tell apart, which is exactly what Shannon captures. Step 1 (dB → linear): SNR and are the same ratio; Shannon needs it linear. Step 2 (Shannon): , so (about kbit/s).

Exercise 2.3

A modem sends 2400 symbols per second, each symbol chosen from levels. What is the bit rate?

Recall Solution

WHY not equal to baud: "2400 symbols per second" is the baud (symbol rate). Bit rate equals baud only when . Here .


Level 3 — Analysis

Exercise 3.1

You must send data at bits/s over a noiseless line of bandwidth Hz. How many voltage levels must each symbol use?

Recall Solution

WHY Nyquist: noiseless again — no , so the level count is the free knob and Nyquist is the governing law. Set up Nyquist and solve for : Here is already a whole number, so is an exact power of two — no rounding needed. Sanity check: 4 levels = 2 bits/symbol, symbols/s bits/s. ✓

Exercise 3.2

Manchester encoding is used to transmit at a bit rate of Mbit/s. Manchester can place up to 2 transitions per bit, so its worst-case signalling rate is transitions/bit. Roughly how much minimum bandwidth does it demand, and how does that compare to NRZ at the same bit rate?

Recall Solution

WHERE the comes from (traced to Nyquist): Nyquist's sampling result (Figure 2, right panel) says a bandwidth- channel supports at most signal changes per second — the same that appears in . So if you must produce transitions per second, the channel needs The is not magic — it is literally Nyquist's solved for .

  • Manchester: up to transitions per bit at bits/s gives transitions/s, so MHz.
  • NRZ: at most transition per bit gives transitions/s, so MHz. Conclusion: Manchester needs about double the bandwidth of NRZ for the same bit rate. That extra bandwidth is the price you pay to get a guaranteed clock edge every bit.

Exercise 3.3

A noisy channel has MHz and (linear). (a) What is the Shannon ceiling? (b) If you tried to hit that ceiling with Nyquist, how many levels would you need?

Recall Solution

(a) Shannon: , so . (b) Match with Nyquist: solve with : is a whole number, so is already a power of two. So levels just reach the Shannon limit here.


Level 4 — Synthesis

Exercise 4.1

A channel has MHz and dB. You may also freely choose the number of levels . Find (a) the Shannon ceiling and (b) the levels needed for Nyquist to reach that ceiling. (c) Which number is the achievable rate?

Recall Solution

(a) Convert then Shannon: . , so (b) Nyquist match: , : Rounding to a power of two: must be a whole number, and for clean bits/symbol we use . The two candidate powers of two are () and (). To reach the ceiling you round up to (which slightly exceeds the Shannon rate — noise would then cause errors, so you actually cap at Shannon). (c) Achievable rate = the smaller limit = Shannon ≈ 39.87 Mbit/s. Nyquist with an integer power-of-two tells you the design ( to reach it, or to stay safely below); Shannon is the hard ceiling you cannot cross.

Exercise 4.2

Design decision: you must transmit Mbit/s reliably. Line A is noiseless with kHz. Line B is noisy with kHz and . For each, is Mbit/s achievable? If yes, state the levels or margin.

Recall Solution

Line A (Nyquist — because noiseless, is the free knob): need with : gives exactly , already a power of two → achievable with . ✓ Line B (Shannon — because given, noise is the limiter): , so Verdict: both work. Line A has room to grow (add levels); Line B is at its absolute Shannon edge — any drop in breaks it.


Level 5 — Mastery

Exercise 5.1

A satellite link has MHz. The engineers report SNR dB. Marketing wants Mbit/s. (a) Is that possible? (b) If not, what SNR (in dB) would be required, assuming is fixed?

Recall Solution

(a) Current ceiling: . , so 30 Mbit/s is NOT possible — the ceiling is only ~16 Mbit/s. (b) Solve for required : need with : Reading: to nearly double the bit rate you must raise SNR from 24 dB to ~45 dB — a huge power jump, because capacity grows only logarithmically with . This is why real designers widen or accept lower rates instead. See Signal-to-Noise Ratio and Bandwidth vs Bit Rate.

Exercise 5.2

Compare two encodings for a MHz noiseless line carrying binary data (): (a) NRZ maximum bit rate, (b) Manchester's effective maximum bit rate given it needs ~twice the bandwidth per bit. Explain the trade in one line.

Recall Solution

(a) NRZ, : (b) Manchester: it consumes ~2× bandwidth per bit, so in the same 5 MHz it delivers half the bit rate of NRZ: One-line trade: Manchester halves your throughput but buys a guaranteed clock edge every bit (self-clocking, no DC) — you pay speed for reliable synchronization.

Exercise 5.3 (capstone)

A noisy line: MHz, (linear). (a) Shannon ceiling. (b) Integer power-of-two you can safely use with Nyquist without exceeding Shannon. (c) The actual bit rate you deliver with that .

Recall Solution

(a) Shannon: , so . (b) Nyquist levels to match: , : is a whole number, so is an exact power of two — it hits the ceiling with no rounding needed, so is the safe choice. (c) Actual rate with : — right at the Shannon edge. ✓


Figures

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley

How to read Figure 3 (capacity vs SNR). The horizontal axis is SNR in dB; the vertical axis is Shannon capacity in Mbit/s, for a fixed MHz. The blue curve is . Follow it upward: it climbs fast at first, then flattens — that flatness is the log at work. The pink dot marks Exercise 5.1's real link (24 dB → ~16 Mbit/s); the yellow dot shows the SNR you'd need (~45 dB) just to touch the dashed 30 Mbit/s target line. The wide horizontal gap between the two dots for such a small vertical gain is the whole lesson: capacity grows only logarithmically with SNR.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley

How to read Figure 4 (Nyquist vs the Shannon ceiling). Horizontal axis = number of levels ; vertical axis = bit rate in Mbit/s (Exercise 5.3, MHz, ). The pink horizontal line is the Shannon ceiling (12 Mbit/s) — a hard limit you cannot cross. The blue rising curve is Nyquist : adding levels buys more bits, but only up to the ceiling. The yellow dot at is where Nyquist just touches Shannon — the safe design point. The shaded pink region above the ceiling is forbidden: those extra levels get smeared by noise and produce errors, not throughput.


Active Recall

Recall One-line answers (cover them)
  • What is ? ::: The channel's bandwidth , the width of passable frequencies (Hz).
  • What is ? ::: The number of distinct signal levels a symbol can take (carries bits).
  • 8 levels = how many bits/symbol? ::: bits.
  • Convert 30 dB to linear SNR. ::: .
  • Nyquist at , ? ::: bit/s.
  • Which rate do you actually deliver? ::: .
  • Why does Manchester halve throughput vs NRZ? ::: it needs ~2× bandwidth per bit (self-clocking cost).
  • Are "SNR" and "" the same? ::: yes — the same signal-to-noise power ratio (convert from dB first).

Connections

  • Sampling Theorem — source of the in Nyquist (Figure 2, right panel)
  • Signal-to-Noise Ratio — the (and its dB form) inside Shannon
  • Bandwidth vs Bit Rate — baud/level relationship used throughout
  • Modulation (ASK, FSK, PSK, QAM) — how the levels are physically built
  • Data Link Layer — what runs on top of these bits