Bit depth and Colour
If we assign a different tonality (level of luminosity) to each combination, we can represent 256 levels of luminosity, from none (00000000) to maximum (11111111) in an 8-bit system.
Colour representation in an 8-bit system can cope with 256 gradations of tonality or lightness per primary colour. 256 reds, 256 greens, and 256 blues, or 256 x 256 x 256 = 16,777,216 colours altogether.
Colour representation in a 16-bit system could cope with 65335 gradations of tonality or lightness per primary colour. 65,335 x 65,335 x 65,335 (= 278,893 billion!) colours altogether.
Real digital cameras
Typical digital camera sensors are 16-bit devices, in which 12 bits per pixel are used for recording light intensity. Light levels under each filter can be recorded from
none = (000000000000) to
4096 distinct levels of light intensity can be recorded for each primary colour component by a 12-bit sensor. Therefore a total of 4096 x 4096 x 4096 different colours (nearly 7 trillion) can be detected and stored by a typical digital camera sensor.
As remarkable as it is, the human eye cannot distinguish this many colours. In practice, 256 levels of discrimination per primary colour is often enough for print or display purposes (although greater bit depth is better for image manipulation).