2.1 Analog data and samplingTurning smooth signals into numbers

Analog data have values that change smoothly over time, rather than jumping between separate steps. The pitch and volume of music, the colors of a painting, and the position of a sprinter are all analog. Digital data, the kind computers store, are separate, countable values.
To store analog data, a computer samples it: it measures the value of the analog signal at regular intervals. Each measurement is a sample, and each sample is stored as a binary number. The stored samples approximate the original. Using digital data to approximate real-world analog data is another example of abstraction: it keeps what matters and drops the rest.
?Wait, what does "approximate" mean here?
Two choices control how good the copy is. The sampling rate is how often you measure: more samples per second catch faster changes. The bits per sample decide how finely each measurement is recorded: more bits, more possible levels, less rounding. Both improve the copy, and both make the file bigger. That trade-off, quality against size, is the theme of the next two sections.
?Wait, how many levels do 16 bits allow?
I thought about it. Show me
- Samples in one minute, one channel: 44,100 × 60 = 2,646,000.
- Two channels double it, and each sample is 16 bits: 2,646,000 × 2 × 16 = 84,672,000 bits.
Why?
Multiply everything that "per" applies to: samples per second, seconds, channels, bits per sample. - Divide by 8 bits per byte: 84,672,000 ÷ 8 = 10,584,000 bytes, about 10.6 megabytes.
Why?
That's why music files are compressed. You'll see how next.
Answer: 84,672,000 bits, or 10,584,000 bytes (about 10.6 MB), for one minute.
Stuck? Get a hint
- Start with samples per second times seconds.
- Then multiply by channels and by bits per sample.
- Bits to bytes: divide by 8.
- AMeasuring the sound less often
- BMeasuring the sound more often
- CStoring each sample with fewer bits
- DUsing lossy compression on the file
Show the answer
B. A higher sampling rate captures changes in the signal more closely. Fewer bits per sample or lossy compression would make the copy less accurate, not more.
- Analog data change smoothly. Digital data are separate values.
- Sampling measures an analog signal at regular intervals; each sample is stored in bits.
- More samples, or more bits per sample: closer approximation, bigger file.
- Digital data approximating analog data is an example of abstraction.