hehe...
well, binary is wierd counting-things where 10 is 2 and 100 is 4 and stuff; anyway,
to make it easy
0 = 0
1 = 1
then it gets harder
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7
1000 = 8
...
the last digit gets 1 higher, and if already is 1, the 2nd last digit get higher, and if that is 1, the 3rd last digit gets 1 higher, and so on.
there are usually eight bits (bit 0 thru 7) in computer code. And to get even more confuseing, "they" use hex numbers to confuse us even more, and that is the 16-digit-system, where sixteen is 10, thirtytwo is 20 etc.
0-1-2-3-4-5-6-7-8-9-a-b-c-d-e-f-10-11-12-13-14-15-16-17-18-19-1a-1b-1c-1d-1e-1f-20
anyway ...
Code: Select all
1 0 0 1 0 0 1 0
| | | | | | | |
| | | | | | | bit0
| | | | | | bit1
| | | | | bit2
| | | | bit3
| | | bit4
| | bit5
| bit6
bit7
or 146 is you wish
b11111111 = d255 = xFF (b= bin, d=decimal, x=hex)