That's right, when it comes to analog and digital in music, comparing records and CDs is a good way to understand it. Records and cassette tapes record sound as waveforms. Records are fundamentally the same in principle as Edison's invention of engraving waves the same shape as sound waves into grooves on a wax cylinder and extracting the sound with a needle. CDs, on the other hand, record sound in a completely different way. The sampling interval we talked about with the clock earlier is about 23 microseconds, or in other words, 44,100 times per second. This sampling interval determines the upper limit of the pitch of the sound when it is played back, and signals that include frequencies up to X Hertz can be sampled at a fineness of at least twice that (2X).
Dad told me before that the upper limit of what a human can hear is 20,000 Hz, right? So, does that mean that CDs contain all the sounds that humans can hear?
That's right, one record contains all the sounds because it hasn't been sampled.
But usually, people say CDs have better sound quality. Why is that?
The secret lies in quantization, that is, the process of quantifying sampled sound. Let's draw a picture. Suppose the original sound waveform looks like this (Figure 1). This is an analog waveform because it's continuous. We sample this at 441,000 Hz (44,100 times per second) (Figure 2). Then we quantize it (Figure 3). The width of the waveform during this quantization is represented by an integer between -32768 (-2 to the power of 15) and 32767 (2 to the power of 15 - 1). You've probably seen 16 bits or 24 bits written as dynamic range in the specifications of audio equipment. A bit is a representation of the number of digits in binary, so in the case of a CD, since it has a width of 2 to the power of 16, it's 16 bits.

And what does that have to do with the idea that CDs sound better than records?
Regardless of whether the sound quality is good or not, CDs likely have less noise. The dynamic range of 16 bits is 96 decibels, which is slightly narrower than the range of sound intensity that human hearing can handle, but generally speaking, considering the sound being reproduced and the ambient noise, it's usually a sufficient range, and you could even say that the noise is at a level where it's inaudible.
I've never actually heard a record play directly, but I have heard the sound of a record being played on TV. There was a static noise in it, and I guess that's the difference between CDs and records.
That's right, records are great when they're new, but if they have even a slight scratch, you get a crackling noise. CDs don't have that problem, and it's convenient because you can easily skip tracks. But even now, there are still many so-called analog enthusiasts who like the act of dropping the needle onto a record and the nostalgic noise in the sound, and they say that records sound better than CDs. The quality of sound is largely a matter of personal preference, so you can't simply measure it by frequency or level.