Although there are many different methods of storing colour information in a computer, one of the most popular is the RGB method (RGB stands for Red Green Blue). Each of the three colours can be assigned a value from 0 to 255.

Why 255? A computer represents information in binary format. Although we are more familiar with decimal notation (deci = 10), which is composed of 10 digits (0-9), this method is no more superior to any other numerical base. Because computer memory operates like switches, with the values being represented as either on or off, computers use the base 2, or binary numbering system. Binary notation is composed of only two digits (0, 1). This is where the word bit comes from -- a bit is one unit of memory, which can hold the value of either 1 or 0.

Grouping together two bits, you can represent 4 numbers: 00, 01, 10 and 11. With three bits, you can represent 8 numbers: 000, 001, 010, 011, 100, 101, 110 and 111. As you increase the number of bits, the amount of numeric values that you can represent grows exponentially. With 8 bits, you can represent 256 different values.

Binary representation of information is why the majority of figures relating to computers is a power of 2 (16M RAM, 256 colours, 64-bit bus, etc). However, binary notation is quite cumbersome. For example, PC's generally use the number 109 to represent the lowercase letter 'm'. In binary notation, this is expressed as 01101101. Imagine trying to spell a word using 8 digits for every letter!

To make binary information easier to work with, computer scientists often use the base 16 hexidecimal notation, composed of 16 digits. Because we generally only have access to 9 digits, the hexidecimal notation uses the digits 0-9 followed by the letters A-F. For example, the 'digit' C is equal to 12. How is this easier? Remember the numeric representations of 'm'? In hexidecimal, it can be expressed as 6D. The value of 255 can be represented as FF.

Close Window