We start from number one always multiplying it by two. We get numbers 1,2,4,8,16,32,64,128. Eight numbers. Then we make a table:
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
Remember, 0 is OFF. 1 is ON. Now the binary is 0 because every number is turned off. Lets turn something on.
0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
Now two values are turned on, and guess what; just simply calculate the numbers together. Number two is ON so we have 2 and the number 8 is turned ON so we have numbers 2 and 8. 2 + 8 = 10. The binary value is ten. Simple as that.
1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
And if we turn everything on we have 1+2+4+8+16+32+64+128 = 255.
Now you should know how to calculate binary numbers. You can easily change IP address to binary form for example or vice versa.
Ei kommentteja:
Lähetä kommentti