Bits and bit depth

'Bits' are important in digital photography because they affect the brightness (dynamic) range of the picture you capture and the ultimate quality of any image you manipulate on a computer. You'll often hear manufacturers talking about the bit-depth of their sensor or processing system (e.g. '14-bit processing'), and many photographers prefer to work with '16-bit' images rather than the 8-bit images usually captured by digital cameras.

But there is some confusion over bit-depth and its practical significance, and it does actually mean two different things, depending on whether you're talking about image capture or image editing.

'Bits' are the fundamental particles of computing. A 'bit' has two values; it's either on or off, but when you put lots of bits together, they can convey much more information. There are lots of other places to read up on the computing science behind this, but the relevance for digital photographers is that the colour and brightness values in the pixels which make up a digital image are described using 'bits'.

Photos are split up into three colour channels: Red, Green and Blue. When photographers talk about 'bits', they're usually talking about individual channels. So an 8-bit image is one which uses 8-bits of data to describe the tones in each channel, and a 16-bit image uses 16 bits per channel.

Anyway, what's confusing is that while higher bit depths mean better quality, the way it works depends on whether you're talking about image capture (what the sensor records) or image editing (the point where you get to control what the image looks like).

Image capture
Photographers often relate bit depth to dynamic range, or the range of brightness values the camera can record, in other words. The output of the camera's sensor is often expressed in terms of its bit depth, and in this context, bits translate directly into brightness values. The greater the number of bits, the greater the range of brightness values the camera is recording.


If you're photographing a subject with a high brightness range, you might expect to lose some of the darkest shadow detail and the brightest highlights. The diagram simulates the difference between a sensor that captures 12 bits of data, like a high-end compact camera, perhaps, and one that captures 14 bits of data, like a good SLR. The 14-bit sensor has captured the last bits of detail at the ends of the histogram, where the 12-bit sensor has 'clipped' them and won't record the extra data.

What happens now is that the camera processes this data to save either a RAW file or a JPEG. The RAW file will contain all 14 bits of data, but JPEGs can only store 8 bits of data.

This is important. The camera does not then 'clip' the data to produce the JPEG file. That would sacrifice even more of the shadow and highlight detail. Instead, it 'expands' the 8 bits it can use to cover the full brightness range the sensor captured. There's probably a much more technical way of explaining it, but that's basically what's happening.

The bottom line is that you'll get the full dynamic range of the sensor, regardless of whether you save a RAW file or a JPEG. The RAW file may contain a little extra data you can exploit to increase the dynamic range, but it's a small amount that's nothing to do with the basic dynamic range and bit depth principle.

Image-editing
When you get to the image-editing stage, the meaning of bit-depths changes. It no longer describes the brightness range of the image, but the subtlety with which the tones in the image are reproduced.

Normally, digital photos use 8 bits of data per channel. This allows up to 256 different tones, and for everyday photography this is enough to produce the appearance of smooth gradations, especially when the three colour channels combine to produce the image you see.

This is fine until you start applying heavy image manipulations. This can exaggerate the difference between the tones and produce 'banding' or 'posterisation' effects. You do have to push the image quite far for this to happen, but it does happen. What many photographers do, then, is work with 16-bit images instead.

When 16 bits of data are used to describe colour values, the number of possible shades is increased massively (just over 65,000). As a result, images tend to survive heavy manipulation much better because you don't get these banding or posterisation effects. Many serious photographers prefer to work with 16-bit rather than 8-bit images for this reason.


Here's another diagram. On the left is a simulation of how the tones in an 8-bit image are described. The shift in tones is very 'blocky', like a kind of staircase effect, and while you wouldn't normally notice this, heavy editing can exaggerate these steps to the point where it becomes visible. The 16-bit version on the right, though, is extremely smooth, and you're not going to get the same 'staircase' effect, even with heavy editing.

Does that mean you should always use 16-bit files rather than 8-bit? Not necessarily. They take up more space, not every program supports them and it's simply not necessary for photos which only require moderate adjustments.

There are some other things to be aware of:

• You can convert an 8-bit image into a 16-bit image in a program like Photoshop, but there's not much point because this won't recreate the intermediate tones the camera never captured in the first place.

• Cameras can't shoot 16-bit JPEGs, so the only way to get a 16-bit image is to shoot in RAW mode, then convert the files into 16-bit images with your RAW conversion software.

• Even in RAW mode, cameras don't record 16 bits of data (except some medium-format equipment). Most record 12-14 bits, and the RAW converter simply 'interpolates' the extra bits. This doesn't matter too much, because the extra bits you get from RAW files are still a major advantage.

The bottom line
Many photographers associate bit depth with dynamic range, but this only applies at a hardware level, during the picture capture process.

By the time you have any control over the process at all, for example when converting RAW files, the meaning of bit depth has changed, so that now it's concerned with how subtly tones are rendered, not how great a brightness range the image contains.