The bit depth gives the number of possible greyscales (intensities) an image file format allows. For faster computer memory access, images are usually stored with a bit depth that is a multiple of 8. Black-and-white images taken with cameras with 8 bit A/D converters – this is trivial – have also a bit depth of 8 which equals 1 byte of data per pixel (8 bit = 1 byte). However, in case of converters with higher bit depth (10, 12, 14) the resulting images are always stored with a bit depth of 16 which is 2 byte/pixel. In other words, the amount of data generated with a 10 bit camera is the same as created by a 14 bit camera in the same experiment with the same resolution. See also
Bit Depth of Camera Data.
An 8 bit number comprises 8 digits that are either "0" or "1". Up to 256 different grey values can be listed with 8 bit numbers because with each bit having one of the two values there are 28 = 256 possibilities. In the decimal system they represent the values 0 – 255. Similarly, in 16 bit format 216 = 65536 different grey values can be stored.
An example for a 12 bit number is: 100100100101. Written in 16 bit format this equals 0000100100100101. The first four digits here are zeros. It is said that "the four highest bits are not used". Following is a description of how the 12 bit number is converted into a decimal number:

Colour images taken either with digital colour cameras or composed of three different sequentially acquired monochrome channels (see Digital Colour Imaging) have a bit depth of either 3x8 or 3x16, depending on the digitization. This is 8 or 16 bit for each of the three colour channels. They are also referred to as 24 bit or 48 bit images, respectively, and require three times as much storage space as the analogous monochrome images.
For comparison the size of 1.4 megapixel images (1376 x 1040 pixels, full frames):

The total number of colours used to create an image is termed colour depth.
In addition to the above formats it is also possible to store or display colour images in 8 or 16 bits ("high colour", usually 5 bits for each blue and red and 6 bits for green). With the advent of powerful graphics cards and modern colour screens, these formats are becoming obsolete.
Compare: The standard palette of the Web, the so-called Netscape Palette, knows only 63 = 216 colours composed of six possible shades for each channel red, green and blue (00, 33, 66, 99, cc, ff in hexadecimal code; 0, 51, 102, 153, 204, 255 in decimals). These colours are identical in the 256 colour Windows and Macintosh VGA palettes. Otherwise the palettes of the two companies only partially coincide and the appearance of Web images may differ if displayed on either a PC or an Apple computer.
In order to display colours that are missing in palettes with limited colour depth a technique called dithering is applied. It uses the limited spatial resolution of the eye. Pixels of two or three colours are placed next to each other in certain patterns so that, when looking from a distance, a colour seems to be displayed that is actually not contained in the palette. There are a variety of algorithms to do this. However, the result may be a coarse and grainy display. Artists like Roy Lichtenstein used this technique in some of their paintings.