yeolyi.comSeongyeol's CS

Digital

People have long wanted to leave behind what they learned about the world. They carved hunting scenes on cave walls and wrote on papyrus to pass on their wisdom.

There have also been attempts to capture continuously changing phenomena, like sound and light, just as they are. A vinyl record carves the tiny vibrations of a voice or an instrument directly into its surface. Representing information with its continuous nature intact like this is called analog.

Michael Jackson's Thriller LP. The vibrations of the sound are carved into the grooves of the record
Michael Jackson's Thriller LP. The vibrations of the sound are carved into the grooves of the record

Computers took a completely different path: digital, which represents information with only a few clearly distinct values. How can something this simple capture the real world?

A computer that chops up the world

Take photographs. A film camera records light on the film as continuous changes in tone and brightness. That is purely analog information.

A digital camera, however, splits the image into tiny squares called pixels. Each pixel stores the intensity and color of the light in its area as a single number. In the end, the subject becomes a huge collection of pixel values, that is, digital data.

Pixelated image
Resolution 64×32

So why do computers chop the world into small pieces and handle it digitally?

First, digital is resistant to interference. A continuous analog signal is easily blurred by faint sounds or electrical noise. Because digital represents information as clearly distinct states, the original value can still be read clearly even with a little interference.

That is why it can be handled without loss. You may have seen a photocopy grow blurrier every time it is copied again. Digital information, on the other hand, stays identical to the original even after being copied millions of times or sent to the other side of the planet.

Noise added on each copy ±0.30
OriginalAnalog drift 0.00Digital (10 levels, 0–9) drift 0.26
0123456789
Copies 0
  1. Look before copying anything. Digital stores the original as the nearest of ten levels, 0 to 9, so it differs a little from the start.
  2. Press “Copy” several times. Analog drifts further from the original each time, but digital’s drift stays where it started.
  3. Raise the noise above 0.5 and copy again. Now digital sometimes reads a neighboring value by mistake, and the wrong value sticks.

Digital gives up on capturing the original perfectly, once, at the start. In return, it loses nothing more in later copies and transmissions. The finer the levels, the less is thrown away at the start.

But ternary, with 0, 1, and 2, or base 4, with 0, 1, 2, and 3, would also be digital. So why did binary, using only 0 and 1, become the core principle? Let’s find out in the next post.

Challenge

A digital signal uses voltages from 0 V to R V. The range is split into N evenly spaced levels (including 0 V and R V) to write a value, and the receiver reads each incoming voltage as the nearest level and stores it again. For the value never to change no matter how many times it is copied, the noise added in one copy must be smaller than what?