• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Help Understanding current DAC technology

babadono

Active Member
Joined
Jul 8, 2021
Messages
174
Likes
120
Can anyone point me to a resource for understanding how a DAC upsamples bit rate and resolution? Like how does a CD quality 44.1k 16 bit go up to 96k 24 bit. I sort of understand how extra samples of the same digital value can be added to change the frequency so filtering can be done at higher frequency but how do extra bit values re. 16 to 24 get added? My rudimentary understanding is this is done so output level can be reduced without losing the original 16 bit resolution.
 
Last edited:
Like how does a CD quality 44.1k 16 bit go up to 96k 24 bit.
16-bit is just a way of saying how long the number representing the audio sample is.

So most of the time what happens when you convert from 16- to 24-bit, is you just add a bunch of zeroes at the end of the number.

24-bit goes up to a maximum value of 16,777,215, 16-bit only goes up to 65,535. So when you convert from 16 to 24, you're basically just adding 16,711,680 to each sample. Multiplying each sample by 256, thanks @danadam

What is interesting is that people sometimes think of the sound getting smoother and better "because the steps get smaller" but what actually happens is just that the noise floor gets lower. This article explains it pretty well, with pictures: https://www.soundguys.com/audio-bit-depth-explained-23706/

It might go without saying, but taking an existing 16-bit file and convering it to 24 doesn't improve anything. Making a copy of a copy can never do that. But if you are running your DAC / OS in 24-bit mode and you lower the volume, you may have more wiggle room in terms of the digital noise floor... which is usually inaudible anyway, let's be clear.

So basically your understanding is correct.
 
Last edited:
16 to 24 get added? My rudimentary understanding is this is done so output leve can be reduced without losing the original 16 bit resolution.

That's easy, just add the required number of zeros.
 
24-bit goes up to a maximum value of 16,777,215, 16-bit only goes up to 65,535. So when you convert from 16 to 24, you're basically just adding 16,711,680 to each sample.
No, you multiply each sample by 256.
 
Thanks..so my basic understanding is correct. But I want more in depth technical info about what goes on inside a given DAC say an ESS type when it is input a 16 bit 44.1K signal from a CD tranport. I think lots of things are supposed be just understood and not explained well or at all, or I just don't know where to look. Do I have to go back to college to get the knowledge?
 
DAC datasheets often have block diagrams. Understanding what's going on at a lower level than that would likely require some knowledge of the relevant electronics fundamentals (ie how digital filters and PLLs work), not to mention guesswork since manufacturers are likely going to be a little cagey revealing too many of their proprietary implementation details.

If you have a technical background you might find the technical discussion in this datasheet interesting re your sample rate conversion questions, though I have no idea how it's implemented in an ESS dac or something: https://www.analog.com/media/en/technical-documentation/data-sheets/AD1896.pdf
Oversampling at some integer multiple of the input rate is conceptually pretty easy to understand, you can just insert one source sample for some number of zero-value samples and low-pass filter the result.
 
Last edited:
What happens inside a DAC is beyond my knowledge...

. I sort of understand how extra samples of the same digital value can be added to change the frequency so filtering can be done at higher frequency but how do extra bit values re. 16 to 24 get added?
If you are up-sampling both sample-rate and bit-depth, in-between samples will be interpolated and all 24-bits will be filled with (non-zero) data. You are interpolating in both the X (amplitude) and Y (time) dimensions and when going from 44.1 to 96kHz, the samples will (of course) exist at different points in time so that also creates entirely new values.

But of course, a DAC puts-out a smooth-filtered-continuous analog waveform with no samples or "steps" anyway, so the additional samples don't change the sound.

If the bit-depth of the file doesn't match the DAC hardware the data is truncated or zero-filled by the drivers before it's sent to the DAC.

If you want to know what low-resolution sounds like, make an 8-bit file with Audacity and you can hear the quantization noise. It's like a "fuzz" on top of the sound and like regular-old analog noise it's worse (more noticeable) with quiet sounds but unlike analog noise it goes-away completely with digital silence. (If you do this experiment disable dither. Dither is intentionally added noise which is supposed to sound better than quantization noise.)
 
Thanks..so my basic understanding is correct. But I want more in depth technical info about what goes on inside a given DAC say an ESS type when it is input a 16 bit 44.1K signal from a CD tranport. I think lots of things are supposed be just understood and not explained well or at all, or I just don't know where to look. Do I have to go back to college to get the knowledge?
If you want to know more about resampling from a lower sampling rate to higher, interpolation is one thing you'll want to know about, as @DVDdoug mentions. I am not sure what interpolation methods are used on contemporary DACs, but Wikipedia has articles on some of the methods, e.g. https://en.wikipedia.org/wiki/Lanczos_resampling

https://en.wikipedia.org/wiki/Digital-to-analog_converter this article would also be a good one to digest if you follow the various links.
 
Here is a thread explaining the mathematics behind sample rate up-sampling.
 
Here I showed each step in upsampling with inserting zero samples and filtering out the images:
And something similar when illustrating clipping from intersample overs: View attachment 323636

Regarding bit-depth, it is as simple as mentioned earlier, just adding zeroes in the new least significant bits. So for example with 16-bit and the conversion to 24-bit we have:
Code:
16-bit
decimal     binary
      0     0000 0000  0000 0000
      1     0000 0000  0000 0001
      2     0000 0000  0000 0002
    ...
  32766     0111 1111  1111 1110
  32767     0111 1111  1111 1111


16-bit converted to 24-bit
decimal     binary
      0     0000 0000  0000 0000  0000 0000
    256     0000 0000  0000 0001  0000 0000
    512     0000 0000  0000 0002  0000 0000
    ...
8388096     0111 1111  1111 1110  0000 0000
8388352     0111 1111  1111 1111  0000 0000
In 16-bit a full scale signal swings from -32'768 to 32'767. After the conversion to 24-bit it will swing from -8'388'608 to 8'388'352. This on its own doesn't improve anything, because the distances between samples, relative to the full-scale, are the same. But if you start modifying that signal, you can now use the additional space and introduce less errors.

Let's say you want to reduce volume by half. If you work in 16-bit domain you will introduce error from each sample with odd value because you will have to round .5 to the integer.
Code:
16-bit     reduce
 input    by half
    0          0
    1          1
    2          1
    3          2
    4          2
If you convert to 24-bit first and work in 24-bit domain, there won't be any error (in this specific case) or the error will be much smaller relative to the full-scale:
Code:
16-bit      convert     reduce
 input    to 24-bit    by half
    0            0          0
    1          256        128
    2          512        256
    3          768        384
    4         1024        512
 
Do I have to go back to college to get the knowledge?
Simple answer = yes, going back to college would help you understand, if you have not studied electronics and communication theory from 1948 onwards to an undergraduate level.

You can get a superficial understanding after a few weeks of reading tutorial-grade material. Avoid YouTube unless you watch videos of undergraduate lecture material. What you also need is a good enough grasp of integral and differential mathematics to understand the basics.

BUT, even then, some of the actual DAC implementation is proprietary information which manufacturers don't publish to avoid their Intellectual Property from being stolen.
 
Back
Top Bottom