4.3.3 · D2Computer Networks

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

3,021 words14 min readBack to topic

Step 1 — What a "signal" actually is

WHAT. Before "capacity" means anything, we must agree what travels on the wire. It is not "a number" — it is a shape: voltage plotted against time.

WHY. Everything ahead (bandwidth, levels, noise) is a statement about what shapes the wire can carry. So we need the shape-vs-time picture first.

PICTURE. Look at the curve below. The receiver at the far end sees only this — one wavy line. It must reconstruct the bits from the wiggles alone.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s01 — A single signal drawn as voltage (vertical) against time (horizontal). This wavy magenta curve is the ONLY thing the receiver ever sees; every bit must be recovered from it.

  • ::: time, seconds, running left→right
  • ::: the voltage the wire holds at each instant

Step 2 — "Bandwidth" = how fast the wire is allowed to wiggle

WHAT. We compare two signals: a slow one and a fast one, sent into the same wire.

WHY this tool. We use frequency (wiggles per second) because a wire behaves like a gate: it passes slow shapes and blocks fast ones. The cut-off wiggle-speed is exactly . This is the physical fact every capacity formula rests on.

PICTURE. In the figure, the violet slow wave passes cleanly. The orange fast wave (above ) comes out crushed to almost a flat line — that lost wiggle is lost information.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s02 — Two waves sent into the same wire. The violet wave (frequency below ) passes cleanly; the orange wave (frequency above ) exits flattened. The wire blocks fast wiggles.


Step 3 — The fastest countable rate of symbols is

WHAT. We ask: given the wiggle speed-limit , how many separate symbols per second can the receiver still tell apart?

WHY and not . To see a symbol you need the signal to go up and come back — that is two edges per full wiggle. A wiggle of frequency therefore delivers distinguishable turning-points each second. This is the Sampling Theorem fact in disguise: a shape whose fastest wiggle is is fully pinned down by samples per second. Push past and neighbouring symbols smear into one — intersymbol interference.

PICTURE. The figure marks each turning-point of a bandwidth- wave with a dot: count them — two per cycle, giving per second.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s03 — One bandwidth- wave with a violet dot on every turning-point. There are two dots per cycle (one up-edge, one down-edge), so a frequency- wave yields readable symbols each second.

Rate ceiling if Hz?
symbols/sec

Step 4 — Each symbol can carry more than one bit: the factor

WHAT. Instead of only high/low, let each slot pick one of heights. How many bits does one such slot reveal?

WHY . With bits you can write different patterns. If a symbol must name one of possibilities, then , so . The logarithm is the tool that answers "how many yes/no questions ( bits) does it take to pin down one of choices?" — that is literally what counts.

PICTURE. The figure stacks voltage bands; each band is labelled with its 2-bit code (00 01 10 11). One symbol landing in a band = 2 bits delivered.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s04 — Four stacked voltage bands (), each tagged with its 2-bit code. A symbol landing in one band delivers bits at once.

Bits per symbol for ?
bits

Step 5 — Multiply the two: the Nyquist law

WHAT. We now own two independent facts:

  • Step 3: at most symbols each second.
  • Step 4: each symbol is worth bits.

Multiply symbols-per-second by bits-per-symbol → bits per second.

WHY multiply. Rate and payload are independent knobs. (symbols/sec) (bits/symbol) bits/sec, exactly like (steps/sec) (metres/step) metres/sec. This is the Nyquist capacity — the ceiling for a noiseless channel.

PICTURE. The figure shows the assembly line: boxes stream out per second, each box stamped with bits.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s05 — An assembly line: boxes leave the wire each second (top arrow), and every box is stamped with bits. Multiplying the two gives .


Step 6 — The degenerate question: why can't be infinite?

WHAT (the edge case Nyquist ignores). Nyquist assumed a perfect wire. Now add noise: a random voltage fuzz added to every symbol.

WHY it kills big . If levels are packed closer than the noise fuzz is tall, the receiver can't tell which band a symbol landed in — a 01 gets read as 10. So noise sets a hard cap on how many levels are usable.

PICTURE. Left panel: 4 well-spaced levels, noise bands (shaded) don't overlap → readable. Right panel: 16 crammed levels, noise bands overlap → unreadable mush.

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s06 — Left: 4 levels with orange noise-fuzz bands that stay separate (readable). Right: 16 levels crammed so their noise bands overlap (a symbol is misread). Noise fixes how many levels fit.


Step 7 — How many levels does noise actually allow?

WHAT. We count the number of safely separable levels given signal power and noise power .

WHY is the full swing. The receiver sees signal plus noise added together. For independent random quantities, powers add: the total average power at the receiver is . Turning that power into a voltage height (Step-7 definition: height ) gives a usable swing . That is the whole height of the voltage ruler.

WHY is the smallest safe gap. Each received symbol is jittered up or down by the noise. Because the noise is Gaussian with average power , its typical jitter is one standard deviation . If two levels sit closer than about this jitter, the bell curves of neighbouring levels overlap and symbols get confused. So the closest levels may be spaced is — that is the ruler's smallest readable rung.

WHY the "" (the honest constants). Dividing swing by gap:

The proportionality constants in "swing " and "gap " are the same constant (both are voltage-per- for the same wire), so they cancel in the ratio — that is why a clean number survives. The residual "" hides a small factor (how many standard deviations you demand between levels for a target error rate); tightening that factor changes by a constant multiplier, not its shape. Shannon's full proof replaces this counting heuristic with an exact information-theory argument and lands on the same formula.

PICTURE. A voltage ruler of total height , chopped into rungs each tall; the count of rungs is .

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s07 — A voltage ruler of height (magenta, total swing) sliced into rungs of height (violet, the noise jitter). The number of rungs that fit is .


Step 7b — The edge case: noise louder than signal ( dB)

WHAT this means for Shannon. Shannon's formula does not break here — it just returns a small positive capacity:

because is still greater than , so its is still positive. The channel is slow and noisy, not dead. Only if (no signal at all) does .

PICTURE. The ruler collapses: the total swing is barely taller than the single noise rung , so under one clean level fits — but Shannon still reads out a trickle of capacity.

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

Figure s07b — When the ruler height is barely above one noise rung : fewer than 2 clean levels fit (), yet the Shannon curve (violet) still returns a small positive .


Step 8 — Substitute → Shannon–Hartley

WHAT. Take Nyquist () and plug in the noise-limited from Step 7.

WHY. Nyquist gives the rate structure; Step 7 gives the largest the noise permits. Combining them yields the true ceiling — the one you cannot beat by cleverness. Here we treat as continuous (integer rounding is a later, rate-lowering step, so the result stays an upper bound).

The became a factor of because (a square root is a power of ), and that cancels the in .

PICTURE. The figure lines up the algebra visually: meets , they cancel to ; the under the log flattens to .

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s08 — The algebra collapse: , the square root pulls out a , the cancels the , leaving .


Step 9 — Using both together: which ceiling wins?

WHAT. Given a real channel, Shannon says the maximum bits/sec; Nyquist says how many levels you'd need to reach it. You take the smaller achievable rate.

WHY. Shannon is a wall you cannot climb over even with infinite . Nyquist then tells you the practical (whole-number) that just touches that wall.

PICTURE. A bar chart: Shannon ceiling as a solid wall, Nyquist rising with more levels until it just reaches the wall at the right integer .

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s09 — Violet bars: Nyquist rate for . Magenta line: the Shannon wall (6 Mbps). The orange dot marks , the smallest integer level count that reaches the wall.


The one-picture summary

Figure — Physical layer — encoding (NRZ, Manchester), bandwidth, Nyquist, Shannon-Hartley
Figure s10 — The whole chain in one frame: wire speed-limit symbols/sec → each worth bits → multiply = Nyquist → Gaussian noise caps at → substitute = Shannon.

The whole chain in one frame: wire wiggle-cap symbols/sec → each symbol worth bits → multiply for Nyquist → noise caps at → substitute → Shannon.

Recall Feynman retelling (cover and explain it back)

Imagine a conveyor belt of little boxes. The wire can only push out boxes every second — push faster and the boxes crash into each other (that's the bandwidth limit, and the "2" is because each box needs an up-edge and a down-edge to be seen). Into each box you can put a height — and if you allow different heights, each box carries bits, because it takes yes/no questions to name one of heights. Multiply boxes-per-second by bits-per-box and you get Nyquist: . Now the room gets foggy — noise. Fog blurs the heights, so if you use too many heights they blur into each other. The number of heights you can still tell apart is about : the total loudness you can swing is (signal and fog powers add), and the smallest safe step is one fog-wobble , and because those two heights use the same volts-per-loudness constant it cancels, leaving . Since heights must be whole levels you round that down — never below 2. Slot that back into Nyquist, the square root turns the into just , and out pops Shannon: — the true top speed no trick can beat, even when the fog is thicker than the signal (then you just get a slow trickle, not zero).


Connections

  • Parent topic
  • Sampling Theorem — source of the in Step 3
  • Signal-to-Noise Ratio — the used in Steps 7–8
  • Bandwidth vs Bit Rate — the baud vs bits relation of Step 4
  • Modulation (ASK, FSK, PSK, QAM) — how the levels are physically made
  • Data Link Layer — error-correcting codes that rescue the case