I understood that only the digital signal (0 and 1) is transmitted via toslink/coaxial. Thank you!
It's a binary number system with only ones & zeros but with more bits you can hold bigger numbers.
Here's what 0 - 15 decimal looks like in binary:
0000 binary = 0 decimal
0001 binary = 1 decimal
0010 binary = 2 decimal
0011 binary = 3 decimal
0100 binary = 4 decimal
0101 binary = 5 decimal
0110 binary = 6 decimal
0111 binary = 7 decimal
1000 binary = 8 decimal
1001 binary = 9 decimal
1010 binary = 10 decimal
1011 binary = 11 decimal
1100 binary = 12 decimal
1101 binary = 13 decimal
1110 binary = 14 decimal
1111 binary = 15 decimal
Each sample (i.e. 44,100 samples per second) represents the positive or negative amplitude at one instant in time, or at one point along the wave.
With 16-bits you can "count" from decimal -32,768 to +32,767. With signed integers the most significant bit (the leftmost bit) is the +/-sign bit, and it's a little weird because negative values use "two's compliment" and there is no negative zero.
If the peaks in a 16-bit file hit -32,768 or +32,767, your peaks are hitting 0dBFS (zero decibels full-scale) which is the digital maximum for integer formats,
If you divide all of the samples in half, you cut the volume in half (-6dB).
Amplification is done by multiplication and attenuation is done by multiplying by a factor of less than one.
The
Audacity website has a nice little introduction to how digital audio works.