Bit Depth
In short: The number of bits used to encode a single value — e.g. a colour value in an image or an audio sample.
In more detail: The higher the bit depth, the more different gradations can be represented (8 bits = 256 values, 16 bits = 65,536 values), but the larger the resulting amount of data. Directly relevant to quality and file size in image/video formats such as MPEG or JPEG.
In Depth
Bit depth in images
In images, the bit depth per colour channel determines how finely colour gradients can be represented. Classic 8-bit colour material (i.e. 8 bits per channel, 24 bits for RGB in total) provides the usual 16.7 million colours, which are sufficient for most web and consumer applications. Professional photography and video, on the other hand, often work with 10, 12 or even 16 bits per channel, because this leaves more room for subsequent colour correction before visible steps (“banding”) appear in gradients such as skies or sunsets. HDR video (high dynamic range) practically always requires at least 10 bits per channel — with only 8 bits, the available brightness levels simply aren’t enough to represent the much larger contrast range of HDR content without visible bands.
One technique for mitigating the effects of too little bit depth is dithering: instead of a hard edge between two representable colour values, noise is deliberately sprinkled in, which simulates a smoother, more continuous gradient to the human eye — a trick dating back to the early days of 8-bit computer graphics and still used today in video players and graphics drivers when a high-bit-depth signal has to be converted down for a low-bit-depth output device.
Bit depth in audio
In audio the principle works analogously, just per sample instead of per pixel: a CD sample has a bit depth of 16 bits (65,536 possible amplitude values), professional studio recordings often run at 24 bits (over 16 million values). Here, higher bit depth mainly means a larger theoretical dynamic range (the difference between the quietest and loudest representable sounds, roughly 6 dB per additional bit) and less quantisation noise when converting from analogue to digital. The clear separation of bit depth and sample rate (e.g. 44.1 kHz for CD quality) is important: the bit depth determines how precisely EACH individual measured value is resolved, the sample rate how MANY measured values are taken per second — together they determine the overall quality of a digital audio recording, but can be chosen independently of each other.
Effect on file size and compression
Bit depth multiplies directly with file size — double the bit depth means (for uncompressed formats such as WAV or BMP) twice as much data. Compressed formats such as MPEG or JPEG additionally reduce the effective amount of data, often at the expense of some of the original bit depth or colour information (lossy compression) — a heavily compressed 8-bit JPEG can certainly show visible banding even though the source material technically only had 8 bits anyway, because the compression itself discards additional information. When choosing the right bit depth for a project, the basic rule is: as high as practicable for recording/editing (more room for corrections); for final delivery to end users the lower standard bit depth is usually enough, since beyond a certain point the difference is no longer perceptible to the human eye/ear.