Digital Signal Processing (DSP) [Pulse Code Modulation & Nyquist Sampling]

Analog Sound to Digital Bytes

Sampling Rate:
Bit Depth: Voltage Steps:
Raw Data Rate: Quantization Error:

DSP Parameter Controls

Determines how many vertical time slices are taken per second along the soundwave.

Determines the number of horizontal voltage grid steps (2Bits) available to measure height.

First-Principles Flow

From Pressure to Bits

1 Continuous Analog Wave

Physical sound is an infinite smooth wave of oscillating air pressure voltage measured by a microphone diaphragm.

2 Time Discretization (Sampling)

An Analog-to-Digital Converter (ADC) takes discrete snapshots of the wave at fixed time intervals (Sample Rate).

3 Amplitude Quantization

The height of each sample is rounded to the nearest available grid level defined by Bit Depth (2B levels).

4 Binary Pulse Stream Output

Each quantized voltage integer level is encoded into a binary word (e.g. 10110011) and saved to storage.

💡 Nyquist-Shannon Theorem

To perfectly reconstruct a sound frequency f, your sample rate must be at least 2f! Human hearing caps at 20 kHz, which is why Compact Discs (CDs) use 44.1 kHz.