Generation Loss — Part 2
Nature's Xerox Effect
Digital or Analog
How would you explain the differences between analog and digital systems to another engineer?
Digital means 0’s and 1’s, right? Perhaps to the layperson, but there is far more to the story. Most helpful to think about how information is represented, moved around, and stored.
Generally:
- When representing the physical world, analog systems try (unsuccessfully) to be exact representations of a source phenomenon by mimicking without [much] manipulation in the middle. The concept of generation loss prevents an analog system from mimicking exactly.
- When representing the physical world, digital systems also try (unsuccessfully) to be exact representations of a source phenomenon. To interact with the physical world, digital systems require analog systems which impart generation loss.
- The big deal, however, is once the information (representation of source phenomenon) is “in” a digital system, the information can be manipulated (including very complex manipulations), replicated (exactly if needed), and transmitted and stored in ways with improved immunity to noise and deterioration/corruption.
Rewind: Analog
To begin, when reading or hearing the word analog, replace it mentally with analogy or analogous. An analogy in literature compares two otherwise unlike things by finding commonality between the things, be it literal (exact), figurative, conceptual, or physical. A heart compared to a pump or an author’s pen to a warrior’s sword.
In analog systems, the analogy is far more literal (and not figurative). Take a phonograph record (a music “record”) for example, whose “grooves” are directly analogous to the physical pressure waveform at the time of the recording. Sound is a pressure wave, whether generated by voices, store bought speakers, or a jetliner. The recording needle cutting pattern is vibrating analogously with the physical pressure waveform present “in the recording room."
On playback, the created pressure waveform (sound we hear) is analogous to the vibrations of a playback needle being tossed around in the earlier recorded/cut “grooves.”
- A physical intermediary during recording is a diaphragm that is able to vibrate, called a microphone.
- A physical intermediary during playback is a diaphragm that is able to vibrate, called a speaker.
Generation Loss
In the phonograph recording example, the original recording’s cut grooves are not perfectly analogous to the original pressure waveform. Both the vibrating diaphragm and the cutting needle on the recording media create friction, lose energy as heat, are subject to attenuation, and in process introduce minor imperfections (called “noise”) to the “analogousness” of the result. These imperfections are stored, propagated on playback, and new imperfections are introduced every time the record is played. Generally, the imperfections are subtle or beyond human perceptive threshold.
- When playing a phonograph record, the original recording imperfections are captured in the grooves to be played back every time. New imperfections are added during playback. The added-on-playback imperfections may or may not be noticed by listeners and are then generally lost to the ether since they are not recorded again.
- Interestingly, the phonograph record media (vinyl, shellac) tends to wear out from use — akin to modern-era bit rot. A worn phonograph is technically reduced signal and not noise, per se. However, the result effect is the same — a lower signal to noise ratio.
Imagine a rather silly scenario (image above) where the original pressure waveform (sound) is not cut into a phonograph record immediately, but instead regenerated using [analog] vibrating diaphragms (microphones and speakers), several times, before being cut into the phonograph record. When taken to such an extreme it isn’t hard to imagine the propagation of every analog-derived imperfection and introduction of new analog-derived imperfections at every step (forms of generation loss) eventually leading to a human perceptible degradation.
YouTube: A different, but conceptually similar example with VHS video and audio where analogous magnetic field strength takes the place of grooves
Fast Forward: Digitize — Sample & Quantize
To appreciate how a digital system can avoid generation loss, it is important to understand sampling and quantizing, colloquially called “digitizing.”
To represent the physical world sound (for example) in an analog system, the pressure waveform is stored as an analogous groove on a piece of circular plastic (record). The groove is cut by a needle and vibrating diaphragm that is being told what to do by the pressure waveform, without much “stuff” in between.
To represent the physical world sound in a digital system, continue to store the pressure wave as a groove on a piece of circular plastic (can still be a record, go with it despite more modern technology). However, the groove is not analogous to the pressure wave. In an intermediate step, the pressure wave is sampled and quantized first by some middleware (hardware, firmware, and even software), which results in a stream of numerical values that represent the pressure wave.
Sampling and quantizing, digitizing, and analog-to-digital conversion are different terms describing similar concepts.
The numerical values from sampling and quantizing are then framed and serialized (organized in a specific way) and cut into a groove according to specific rules defined by the creators of the system. Rules vary, but almost all systems ultimately store the sampled and quantized values as bits (binary digits) on the storage medium.
Oversimplified but illustrative: using the 4-bit quantization example above, the first three samples 8 — 9 — 11 could be stored as the bitstream 10002 — 10012 — 10112. It is very possible to store such a bitstream on a phonograph record, similar to how a bitstream would be stored on a “digital” compact disc — a digital phonograph record, imagine…
Analog information and digital information can both be stored in grooves, in magnetic fields, and other mediums. The difference is how the impact on the physical medium is interpreted.
Imagine the same sound stored analogously and digitally:
- Analog information is analogous to the impact on the physical medium — the groove varies analogously with the pressure wave.
- Digital information (binary digits — bits) is coded into the physical medium as a sequence of exact on/off states representing the bitstream. If the information source came from the physical world, the bitstream itself is a sampled and quantized representation of the physical world.
Generate without Loss
Within the quantized (“digital”) world, it is possible to create another exact copy of the quantized data. Read a value, write a value, repeat.
Consider being asked to 1) copy numbers on a piece of paper and 2) copy a sinusoidal waveform on a piece of paper.
If asked to exactly copy the numbers 127, 14, 85 you’d write 1 - 2 - 7, then 1 - 4, then 8 - 5 and be done. These are already sampled exact quantities, with little room for interpretation beyond visually decoding the numbers and writing them down again. Anyone with the basic ability to comprehend numbers can interpret your copied 127, 14, and 85 — exactly.
Whereas being asked to exactly copy the image of a sinusoidal waveform, exact curves and all, comes with a bit more challenge. Are your lines curving at the exact same rate, same amplitude, same pencil thickness? If you are following along thus far, it is impossible to copy/replicate such a waveform exactly due to generation loss — in this case with much of the generation loss being owed to your own human physiology.
The abstraction from digitizing allows us to copy/replicate exactly within the digital system.
Thing | Generation Loss |
---|---|
analog-to-analog conversion | always |
analog-to-digital conversion | always |
analog-to-analog replication | always |
digital-to-analog conversion | always |
digital-to-digital conversion | sometimes1 |
digital-to-digital replication | sometimes2 |
- compression, transcoding, re-encoding, resampling sometimes introduce generation loss
- generation loss can be avoided with specific design and implementation
Still Subject to Deterioration/Corruption
Digitizing alone does not guarantee exact replication, it only makes it possible. Nor does digitizing eliminate deterioration/corruption, it only makes it easier to design and implement recovery systems. Quantized information stored in the physical world (CD/DVD/BD, memory, disk drive, in transit on a wire) is certainly subject to environmental factors that affect the medium, signal, or noise in adverse ways.
- Extreme and obvious examples of folding a CD in half or putting it in the microwave for a few seconds (a fun experiment) will deteriorate/corrupt much of the medium. It’s a good thing we have an exact copy (touché) of the bitstream on another medium.
- Less obvious deterioration/corruption can occur within digital systems due to a variety of means including wear and tear on mechanicals, dielectric breakdown, and even radiation (be it from human invention or the cosmos).
Both obvious and less obvious sources of deterioration/corruption have led to numerous mitigation strategies within digital systems from basic backups (exact copies) to simple erasure codes (like “parity” in some RAID modes) to more advanced erasure codes / error correction codes (ECC). Anti-deterioration/anti-corruption/recovery mitigations store additional quantities of information (from a little to a lot), with additional computational overhead, to recover from certain types of deterioration/corruption. Such recovery is considered more difficult in analog-only systems.
Full Circle
To bring us full-circle — started with a comment in a bar from Generation Loss — Part 1:
“…kind of like when you copy a file and the copied data is not exact…”
Computer file system copy operations operate on bitstreams — it is possible to copy/replicate a bitstream exactly. File systems and underlying hardware also implement various deterioration/corruption mitigation techniques — perhaps a future topic.
Time for a beer.