Skip to content
Feb 25

Physical Layer: Signals, Encoding, and Transmission

MT
Mindli Team

AI-Generated Content

Physical Layer: Signals, Encoding, and Transmission

Every network conversation, from a simple text message to a streaming video, begins its journey as a raw stream of bits. The physical layer is the fundamental bedrock of networking, responsible for the actual transmission and reception of these bits across a physical medium. Understanding this layer is crucial because it defines the absolute limits of your network's speed, distance, and reliability, governing how 1s and 0s are transformed into electrical, optical, or radio wave signals that can travel over copper wire, fiber optic cable, or through the air.

The Role of the Physical Layer

The physical layer sits at the very bottom of the network protocol stack. Its primary function is to move the individual bits of a frame from one device to the next. It doesn't understand packets, addresses, or errors; its job is purely representation and transportation. This involves three key tasks: defining the physical characteristics of the interface and medium (like connector shapes or voltage levels), representing the bits as a signal, and transmitting that signal across the chosen transmission medium. The medium—whether twisted-pair copper, coaxial cable, fiber optics, or wireless spectrum—profoundly shapes the layer's design. Engineers must select the appropriate medium and signaling technique based on the required distance, data rate, cost, and environmental factors like electromagnetic interference.

From Bits to Signals: Encoding Schemes

A computer produces bits as discrete, abstract 1s and 0s. To send them, we must encode them into a physical signal—a time-varying electromagnetic wave. This encoding is not simply "high voltage for 1, low for 0." Sophisticated schemes are needed to solve problems like synchronization and signal integrity.

  • Non-Return to Zero (NRZ): This is a simple scheme where a positive voltage represents a 1 and a zero (or negative) voltage represents a 0. Its problem is baseline wander: a long string of identical bits (e.g., fifteen 1s) can look like a constant DC signal, making it difficult for the receiver's clock to stay synchronized to the bit boundaries. It also lacks a built-in mechanism for error detection.
  • Manchester Encoding: Used in classic Ethernet, this scheme solves the clock synchronization problem. It represents each bit by a mid-bit transition. A 1 is encoded as a low-to-high transition, and a 0 as a high-to-low transition. These guaranteed transitions make it a self-clocking signal, but the trade-off is that it requires twice the bandwidth of NRZ for the same data rate, as two signal periods are used to represent one bit.
  • 4B/5B Encoding: This scheme, used in technologies like Fast Ethernet and Fiber Channel, addresses the inefficiency of Manchester encoding. It works by taking 4-bit blocks of data and mapping them to predefined 5-bit codes. The key is that these 5-bit codes are chosen to have no more than one leading zero and no more than two trailing zeros, ensuring sufficient transitions to maintain clock synchronization. While it introduces 25% overhead (5 bits sent for every 4 data bits), it is more bandwidth-efficient than Manchester and avoids the DC balance problem of basic NRZ.

Transmission Impairments and Limitations

No physical medium is perfect. As a signal propagates, it degrades, limiting how far and how fast we can transmit data reliably. Three primary impairments define these limits.

  1. Attenuation: This is the loss of signal strength as it travels over distance. Energy is dissipated as heat in conductors or scattered in optical fiber. Attenuation is frequency-dependent; in guided media like copper, higher frequency components attenuate faster, distorting the signal shape. Repeaters or amplifiers are used to regenerate the signal periodically.
  1. Distortion: Different frequency components of a signal travel at slightly different speeds (a phenomenon called dispersion), causing them to arrive at the receiver at different times. This spreads out and blurs the signal pulses, a problem known as inter-symbol interference (ISI), where one symbol spills into the time slot of the next.
  1. Noise: Unwanted random energy inserted into the signal from external (e.g., motors, radio transmitters) or internal (e.g., thermal agitation of electrons) sources corrupts the signal. The most significant type is thermal noise, which is present in all electronic devices and transmission media. The quality of a signal is measured by the signal-to-noise ratio (SNR), which is the ratio of signal power to noise power, usually expressed in decibels (dB). A higher SNR means a cleaner, more decipherable signal.

Channel Capacity: The Nyquist and Shannon Theorems

How fast can we push data through a channel? Two landmark theorems provide the theoretical upper bounds.

The Nyquist Theorem states that for a noiseless channel, the maximum bit rate is limited by the channel's bandwidth. If a signal has discrete levels, the maximum data rate for a channel of bandwidth (in Hz) is: This formula tells us that doubling the bandwidth or increasing the number of signal levels can increase the data rate. However, in practice, increasing makes the signal more susceptible to noise, as the difference between levels becomes smaller.

The Shannon Capacity Theorem addresses the real-world problem of noise. It gives the absolute maximum data rate for a channel with a specific bandwidth and signal-to-noise ratio: Here, is the linear power ratio (not in dB). Shannon's result is a theoretical limit; actual systems operate below it. It shows that a channel's capacity can be increased by using more bandwidth or by improving the SNR. For example, a high-SNR fiber optic link has a vastly higher capacity than a low-SNR wireless link of the same bandwidth.

Common Pitfalls

  1. Confusing Bandwidth with Data Rate: Bandwidth (B) is the width of the frequency range the channel can carry, measured in Hertz (Hz). Data rate (C) is the speed at which data can be sent, measured in bits per second (bps). They are related by the capacity formulas but are not synonymous. You can have a high-bandwidth channel operating at a low data rate if the encoding scheme is inefficient or the SNR is poor.
  1. Misapplying the Capacity Theorems: The Nyquist formula () applies to a noiseless channel and defines the maximum signaling rate. Shannon's formula () gives the absolute error-free capacity limit for a noisy channel. A common error is using Nyquist's formula for a noisy channel or forgetting that Shannon's limit cannot be exceeded regardless of how clever your encoding is.
  1. Overlooking the Purpose of Complex Encoding: Students often wonder why we don't just use simple NRZ. The key is to see encoding schemes like Manchester and 4B/5B as engineering trade-offs to solve specific physical layer problems—clock recovery (synchronization) and DC balance—at the cost of some bandwidth overhead. The "best" scheme depends on the medium and the required performance.
  1. Assuming All Noise is External: While crosstalk and interference are major concerns, the fundamental and unavoidable limit is thermal noise (Johnson-Nyquist noise). It sets the baseline SNR for any system and is a primary factor in the Shannon limit calculation. Ignoring it leads to overly optimistic capacity estimates.

Summary

  • The physical layer is responsible for transmitting raw bit streams over a physical medium by converting bits into signals (electrical, optical, or radio waves).
  • Encoding schemes like NRZ, Manchester, and 4B/5B represent bits as physical signals, each making different trade-offs between synchronization, bandwidth efficiency, and complexity.
  • Signal quality is degraded by attenuation (loss of strength), distortion (change in shape), and noise (unwanted additions), all of which limit transmission distance and speed.
  • The Nyquist Theorem defines the maximum data rate for a noiseless channel based on its bandwidth and number of signal levels: .
  • The Shannon Capacity Theorem gives the absolute maximum error-free data rate for a noisy channel: , highlighting the critical roles of both bandwidth and signal-to-noise ratio.

Write better notes with AI

Mindli helps you capture, organize, and master any subject with AI-powered summaries and flashcards.