How a message becomes light

Optical communications
Information theory
Interactive
An interactive visual essay following one tiny message as it turns into bits, then flashes of light, then back again, and what goes wrong on the way.
Author

Kavit Tolia

Published

October 28, 2026

You press send.

A fraction of a second later, someone else reads your message.

In between, for most of its journey, your message was not text at all.

It was light, travelling through a glass thread thinner than a hair.

This essay follows one tiny message on that journey: from the thing you typed, to numbers, to flashes of light, and back again.

To keep things clear, we will make one big simplification. The sender and the receiver are joined by a single fibre-optic cable. No routers, no exchanges, no undersea links. Just one strand of glass.

Even with that simplification, something interesting happens.

Sending is easy. The hard part is the receiver deciding what was sent.

Pick a message

Choose something small to send.

Each option is only a few bytes long, so we can follow every piece of it.

Everything becomes a number

A computer cannot store a letter.

It can only store numbers, and in the end, only one kind: a bit, something that is either 0 or 1.

A single bit can only answer one yes-or-no question. But eight bits together, a byte, can take 2⁸ = 256 different patterns. That is enough to give every letter, digit and punctuation mark its own pattern.

So the letter H becomes the number 72, and 72 becomes the byte 01001000.

Here is your message, written out the way a computer stores it:

Notice what the emoji costs.

👋 is one symbol on your screen, but it takes four bytes: as many as four letters. Text on the web is stored with a scheme called UTF-8, which keeps common characters short and gives rarer ones longer codes.

The icon is simpler still: one bit per pixel, 1 for lit and 0 for dark.

The important point is that none of these numbers is natural.

The bits mean nothing on their own. They mean “H” only because sender and receiver have agreed on the same table.

Bits become light

Now the bits have to travel.

The simplest way to send them through a fibre is also the oldest: switch a laser on for a 1 and off for a 0.

This is called on–off keying. It is still used in many shorter links, such as the fibre that brings broadband into homes.

Each 1 becomes a short burst of light. Each 0 is a gap.

The receiver’s job will be to look at the light that arrives and work out, slot by slot, whether the laser was on or off.

The drawing is a lie

There is a problem with the picture above.

It shows three wiggles of light per bit. The real number is very different.

Long-distance fibre links use infrared light with a wavelength of around 1550 nanometres. That light oscillates about 193 trillion times per second.

Even at a modest 10 billion bits per second, each bit lasts long enough for about 19,000 of those oscillations.

So the wiggles in the rest of this essay are a cartoon.

What matters is the overall brightness in each bit slot, not the individual oscillations. That turns out to be exactly what the receiver measures.

The fibre fights back

Light does not cross a fibre for free.

Even the purest glass absorbs and scatters a little of it. A typical modern fibre loses about 0.2 decibels per kilometre, which means the light halves in power roughly every 15 km.

After 100 km, only about 1% of the light is left.

Meanwhile, the receiver has its own noise: tiny random fluctuations from its electronics. That noise does not care how far the light has come. It is the same at 1 km as at 200 km.

So the receiver turns the volume up. It amplifies whatever arrives until the “on” level is the same size as before.

But amplifying the signal also amplifies the noise.

Drag the slider to lengthen the fibre.

Send again transmits the same message over the same fibre, with fresh random noise. Near the edge, try it a few times: sometimes the message survives, sometimes it does not.

The received trace is drawn after the receiver has turned the volume up, so “on” always sits at the same height. What changes as the fibre gets longer is how much the noise has been amplified along with it.

The receiver has to decide

Look at the third strip again.

The receiver never sees bits. It only sees a brightness that wobbles.

So once per bit, in the middle of each slot, it takes one measurement (the dots) and makes a decision:

  • above the dashed threshold, call it a 1;
  • below it, call it a 0.

On a short fibre this is trivially easy. The dots sit far from the line and every decision is right.

On a long fibre, the noise is large enough to push some dots across the line. The receiver cannot know that it happened. It simply makes the wrong call, and passes the wrong bit on.

Two humps

One message is only a handful of bits, so it is a noisy way to judge a link.

Instead, imagine sending a few thousand random bits down the same fibre and plotting every measurement the receiver takes.

There are two humps: one for every time the laser was off, one for every time it was on.

Each hump has a width, set by the noise. The distance between them is set by the signal.

Errors are the parts of each hump that spill over the threshold into the other’s territory.

Engineers summarise this with a single number, the Q-factor: the gap between the two levels divided by the spread of the noise. In our simplified receiver,

\[ Q = \frac{\text{gap between the on and off levels}}{2 \times \text{noise spread}} \]

and the fraction of bits that end up on the wrong side is

\[ \text{error rate} = \tfrac{1}{2}\,\operatorname{erfc}\!\left(\frac{Q}{\sqrt{2}}\right) \]

A Q-factor of 6 gives about one error in a billion bits. For decades that was the classic target for a working link.

The cliff

Every 15 km, the light halves. Because the noise stays fixed, the Q-factor halves too.

But the error rate does not halve. It explodes.

Drag the fibre length slowly from 100 km to 150 km. (This slider is linked to the one above.)

For shorter fibres, the error rate is too small to draw. Then it climbs a wall.

Over the same 45 km in which the light merely fades to an eighth, the error rate goes from one in a billion to one in four:

Fibre length Q-factor Errors
100 km 6 about 1 in a billion
115 km 3 about 1 in 700
130 km 1.5 about 1 in 15
145 km 0.75 about 1 in 4

So a link does not fade gracefully, the way a radio station slowly turns to hiss.

A digital link works almost perfectly, until quite suddenly it does not.

That is why so much of optical engineering is about staying well away from the edge of that cliff, with margin to spare.

What this simplifies

A real link is more complicated than the one on this page in almost every way. The main simplifications:

  • One fibre, no amplifiers. Long links put an optical amplifier every 80 km or so, boosting the light before it falls off the cliff. Each amplifier adds a little noise of its own.
  • No error correction. Real links add carefully designed redundant bits, so the receiver can find and fix most errors. A garbled “Hi” would usually be repaired before anyone saw it.
  • No packets or routing. On the real internet, your message is split into packets, wrapped in addresses, and passed between many links.
  • A perfect clock. We assumed the receiver knows exactly where each bit starts. Recovering that timing from the signal itself is a problem of its own.
  • A perfect laser. Real transmitters never switch fully off, and the pulses spread out as they travel (dispersion).
  • One kind of noise. We used fixed electronic noise only. Real receivers also have noise that grows with the signal.

The numbers are illustrative but realistic in scale: 1 mW of light launched, 0.2 dB of loss per kilometre, and receiver noise chosen so that Q = 6 at exactly 100 km.

One bit at a time is wasteful

On–off keying sends one bit per time slot.

But light has more to it than brightness. It also has a phase, the point in its oscillation at any instant.

Long-distance links use both at once, packing several bits into every slot. That raises a new question: how close together can you pack the possibilities before noise starts confusing them?

That is the next essay.