Basics Of Computer Graphics



The Binary Notation


| Introduction | The Binary Notation | Color Depth | Screen Resolution |
To understand the "bit"-word in e.g. 32-bit color, one must understand the basics of the binary notation...

In contrast to our decimal system where we use 10 digits (0-9), the binary 'system' uses only 2 digits (0 & 1)
This has to do with how a computer operates. The easiest way to be sure that a computer recognises a signal is to only have two options. 'Signal' and 'No Signal'. i.e. two completely different 'positions', two opposites...
If you have had three different 'positions' it could for e.g. look like this: 'No Signal', 'Weak Signal' & 'Strong Signal'. (In reality/real life it's all about different voltages e.g. -5V, 0V, 5V)
In case of three different voltages there is a potential risc of the signals becomming 'mixed up'. It's not the same as having two absolute diferences ('Signal' or 'No Signal')

In the future, when the optical computer arrives, this will no longer be a problem though, so perhaps the day will come when binary computing is scrapped in favor of 'multipositioning optical computers'. Until then though, it will have to do...



When doing calculations in the binary notation, it works a bit different than in the decimal system, because of the difference in the bases.
All numbers can be presented in a position-table:
e.g. The Decimal System:
The number 195 can be represented like this:
base 10   1000 100 10 1
#   0 1 9 5   total:
sum   0*1000=0 1*100=100 9*10=90 5*1=5   100+90+5=195


The same number would in the binary notation look like this:
bits   8 7 6 5 4 3 2 1
base 2   128 64 32 16 8 4 2 1
#   1 1 0 0 0 0 1 1   total:
sum   1*128=128 1*64=64 0*32=0 0*16=0 0*8=0 0*4=0 1*2=2 1*1=1   128+64+2+1=195

As you can see, it takes 8 bits to describe the number 195. If you put together all the numbers that 'fit' into 8 bits (128+64+32+16+8+4+2+1) you get 255. Add the 'zero' and you end up with 256 different combinations.
If we wanted to describe numbers bigger than 255, then 8 bits would not be enough.

As I've mentioned elswhere, 24-bit graphics is the same thing as 8-bits for each of the three channels (R_ed, G_reen, B_lue). (8*3=24) This means there are 256 different positions for each channel.
256*256*256= 16.777.216 combinations (colors)


back to main
Return Home