Digital image file: Binary format
The data provided by a photo sensor is analog. It expresses the brightness of light in the form of an electrical charge − the brighter the light the greater the charge.
A computer cannot handle this. A computer only recognizes two states − on and off. These are given values of 1 and 0. This might appear limiting, but it’s not. We are used to expressing numbers in the decimal system that uses ten different symbols. This system probably arose because we have eight fingers and two thumbs on our hands. But it is just as easy to express numbers with two symbols. This is called a binary system (binary means dual, or involving pairs).
1 and 0 are binary digits − or ‘bits’. The value of each bit depends on its position. Counting from the right, the first position represents 1, the second position is 2, the third position is 4, the fourth position is 8, and so on. So the binary number 1010 is (0 x 1) + (1 x 2) + (0 x 4) + (1 x 8). This is equivalent to 10 in the decimal system.
Most digital photography is based around ‘strings’ of eight digits. 11111111 represents 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, which is 255. However, the computer also recognises 00000000, so 256 different values can be formed from the string of 8 digits.
This means that if the analog data from the sensors is converted to the binary format, the computer is able to distinguish between 256 different brightness values − equivalent to 256 different shades of grey.
With the cluster of red, green and blue filters, three strings, each of 8 bits, are collected. This gives 24 bits defining the colour of the pixel area. This number of bits is often referred to as the ‘colour depth’.
The number of different colours, or hues, that the computer can recognise using 24-bit colour depth is 256 x 256 x 256. This comes to an amazing 16.7 million.
It is difficult to imagine, but a computer sees an image as nothing more than a series of binary digits. Somehow, 110100010011 does not quite capture the atmosphere of a scene (unless you are a computer, of course!).
Bits and bytes
8 bits = 1 byte
1024 bytes = 1 kilobyte
1024 kilobytes - 1 megabyte (MB)
1024 megabytes = 1 gigabyte (GB)
Kilo normally refers to 1,000. However, in the binary system the key numbers are those obtained by doubling up from 1 (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1,024, etc.). The nearest number to 1,000 in the sequence is 1,024, so the term kilo is applied to this. Similar approximations are made with mega (one million) and giga (one thousand million).

