An analog signal changes continuously: a microphone voltage, the brightness of a pixel. A digital signal is a sequence of numbers written in bits. Fiber communication carries almost only digital: a bit error can be detected and corrected, while analog distortion accumulates.
Sampling and quantization
To digitize a signal, it is measured at equal time intervals (sampling) and each measurement is rounded to the nearest of levels (quantization). By the Kotelnikov (Nyquist–Shannon) theorem, a signal with bandwidth up to is restored without loss if the sampling rate is at least twice the bandwidth.
Kotelnikov (Nyquist–Shannon) theorem
— sampling rate, Hz
— upper frequency of the signal spectrum, Hz
Uncompressed digital stream rate
— rate, bit/s
— sample resolution, bits
— number of channels (for example, 2 for stereo)
Quantization signal-to-noise ratio for a full-scale sine wave
— resolution, bits: each bit adds about 6 dB
Example: Telephone channel
Given: speech band 300–3400 Hz; sampling rate 8 kHz; 8 bits per sample
Hz — the condition is met with a margin for a non-ideal filter.
bit/s.
Answer: One telephone channel is 64 kbit/s. This is the basic digital channel (DS0) of the PDH and SDH hierarchies.
NRZ — the simplest code
In NRZ (non-return-to-zero) code the level is held for the whole bit period: "1" means light, "0" means little light. The fundamental frequency of NRZ is half the bit rate, so NRZ is bandwidth-efficient. Its weak spot: a long run of identical bits looks like a constant level with no edges.
The sequence 10110010 in NRZ, RZ and Manchester codes.
Why a line code is needed
Clock recovery. The receiver tunes its oscillator by the edges (a CDR circuit). Without transitions it "drifts", and bits start being read away from the middle of the period.
DC balance. Receiver amplifiers are usually AC-coupled. If ones outnumber zeros for a long time, the decision threshold "drifts".
Control symbols and checking. A code can contain symbols that are not in the data: start of frame, line idle; a forbidden combination indicates an error.
8b/10b, 64b/66b and scrambling
The 8b/10b code replaces each byte with a 10-bit word with an almost equal number of ones and zeros: a run of identical bits is no longer than 5, and the running disparity stays within ±1. The price is 25 % overhead. The 64b/66b code adds a two-bit header to 64 data bits and passes the data through a self-synchronizing scrambler: the overhead is only 3.125 %. SDH, OTN and GPON use frame scrambling without overhead: the stream is added modulo 2 to a pseudo-random sequence known to both sides.
Line rate of an mB/nB code
— line (symbol) rate
— payload data rate
— data bits / code bits: 8/10, 64/66
Line codes of optical interfaces
Code
Overhead
Where it is used
Example line rate
8b/10b
25 %
1000BASE-X (SX/LX), Fibre Channel up to 8G, XAUI
1.25 GBd for 1 Gbit/s
64b/66b
3,125 %
10GBASE-R (SR/LR/ER), 25G, 100G Ethernet
10.3125 GBd for 10 Gbit/s
Frame scrambler
0 %
SDH (G.707), OTN, GPON (G.984.3, polynomial )
GPON downstream 2.48832 Gbit/s
Lesson problems
Compact disc: sampling rate 44.1 kHz, 16 bits per sample, 2 channels. What is the uncompressed digital stream rate? (kbit/s)
What is the theoretical quantization signal-to-noise ratio of a 12-bit ADC (full-scale sine wave)? (dB)
A 1000BASE-LX interface carries 1 Gbit/s of payload with 8b/10b code. What is the line rate? (GBd)
A 10GBASE-LR interface carries 10 Gbit/s with 64b/66b code. What is the line rate? (GBd)
The XAUI interface has 4 lanes of 3.125 GBd each with 8b/10b code. What total payload rate does it carry? (Gbit/s)
Why are GPON and SDH streams scrambled before transmission?
So that the stream has no long runs of identical bits and the receiver holds the clock
So that subscribers on one tree cannot read each other's data
To narrow the signal spectrum and reduce fiber attenuation
To add check bits for error correction
How does the required channel bandwidth change if NRZ is replaced by Manchester code at the same data rate?
It roughly doubles
It halves, because every bit is a transition
It does not change: bandwidth is set only by the data rate
It does not change: bandwidth is set by the laser wavelength
Sources
IEEE 802.3-2022, clauses 36 (8b/10b) and 49 (64b/66b)