Conversion from Binary to Decimal and Decimal to Binary the Easy way
Ip addressing is a vital knowledge for all the IT and non IT people that are involved with networks, from large enterprise networks to small home networks.
To fully understand Ip addressing it’s necessary to be familiar with binary mathematics and conversions, from the decimal mathematic system to binary and vise versa. I will try to present you an easy procedure that can be used when doing conversions.
Binary to decimal
Binary numbers that are associated with Ip addressing always have eight digits (I like to call these digits “spaces”).
For example the number 11010101 as you can see is an eight digit number.
Now let’s try to convert this number into decimal:
1. Draw eight spaces

2. Apply the decimal value of every space, as shown below

3. Then apply the binary number of our example to it

4. Then add the decimal values of the spaces that have got a binary digit of 1
128 + 64 + 16 + 4 + 1 = 213
5. The decimal equivalent of the binary 11010101 is 213
Now that you can convert a binary number into decimal lets try to do the vise versa.
Decimal to Binary
1. Draw eight spaces

2. Apply the decimal value of its one below

3. Think of the decimal number that you would like to convert (It must be a number from 0 to 255). Let’s pick for example 185. Now think “Can I subtract 185 from the first decimal value of the first space?” The answer is yes; the value is 185 and can be subtracted from 128. Put a 1 above the space of 128 like this:

4. Do the subtraction 185-128= 57. Now think “Can I subtract the value of the second space from 57?” The answer is no; you can’t subtract 64 from 57 (The total must not be a negative number). Put a 0 above the space of 64 like this:

5. Now think “Can I subtract the value of the third space from 57?” The answer is yes; you can subtract 32 from 57. Put a 1 above the space of 32 like this:

6. Do the subtraction 57-32= 25. Now think “Can I subtract the value of the forth space from 25?” The answer is yes; you can subtract 16 from 25. Put a 1 above the space of 16 like this:

7. Do the subtraction 25-16= 9. Now think “Can I subtract the value of the fifth space from 9?” The answer is yes; you can subtract 8 from 9. Putt a 1 above the space of 8 like this:

8. Do the subtraction 9-1= 1. Now think “Can I subtract the value of the sixth space from 1?” The answer is no; you can’t subtract 4 from 1 (The total must not be a negative number). Put a 0 above the space that has a decimal number of 4 like this:

9. Now think “Can I subtract the value of the seventh space from 1?” The answer is no; you can’t subtract 2 from 1 (The total must not be a negative number). Put a 0 above the space that has a decimal value of 2 like this:

10. Now think “Can I subtract the value of the eighth space from 1?” The answer is yes; you can subtract 1 from 1. Put a 1 above the space of 1 like this:

Now the decimal number has been converted into binary.
Keep practicing with conversions. It gets easier and faster with practice!
Hope that this was the fastest and most efficient way for me to explain to you the conversions.
Of you can use an online tool: http://www.tools4noobs.com/online_tools/base_convert/
Great article, but I suspect that you mean to say “subtract” instead of “abstract”?
Thank you very much for your clarification. Really helps us when we make such mistakes due to the fact that English is not our mother language. Changes applied.
This was exactly what I was looking for. Thanks a lot!
Great!
,,nice galing hehehehe