Navigation Home | Windows 7 tutorials | Server 2008 tutorials | Amaya tutorials | |Maths quiz for all ages| My Downloads..

**Convert Decimal To Binary**

Click here to download my Decimal to Binary converter

Click here to download my IP address to Binary converter

My intention is to show you an easy way to convert decimal to binary without all the mumbo jumbo that goes with it. If you spend 10 minutes reading this over and over and still do not comprehend what I am telling you then email me. But rest assured that will not be the case. You will be converting decimal to binary in no time. All I ask is if it worked for you please go to my comments page here and tell everyone else so others may benefit. When I needed to learn this it was because I was learning about "IP addressing" so I will be basing my example an ip address. The address we will use is 172.16.0.0

I would like you to remember this 1 = on or add and 0 means off or ignore

Start by creating a small table like the one below.
128 64 32 16 8 4 2 1

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

Once you have created the above table we need to have a decimal number to convert so just a number off the top of my head is

172.16.0.0 write this number down.

Without going in to to much detail on how to break up an ip address you need to understand that an ip address is broken down in to 4 parts these 4 parts are called Octets and they are seperated by a decimal point.

So your first Octet is 172

Your second Octet is 16

Your third Octet is 0

Your fourth Octet is 0

This gives us 172.16.0.0

So lets look at our table that we have drawn again.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

What we need to do is starting from left to right is add up the numbers to make the same number as our first Octet.

For instance 128 + 32 + 8 + 4 = 172

So basically all we are going to do is start from left to right and add up any number we need to get to the total of the first Octet. So if we use a number we will put a 1 in the box like below.

If we do not use a number we will put a zero in the box.

The frst Octet was 172 so sarting from the left of the table you will see the first number is 128 so place a 1 in that box like I have below.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 |

now we have to keep adding up so 128 does not equal 172 so we look at the second number in the table which is 64

128 + 64 = 192 This does not equal the first number of our Octet because it is to high. so we will place a zero in this box like below.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 |

128 + 32 = 160 This still does not equal 172 because it is not high enough so we will place a 1 in the box like below.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 |

Now move on to the next number in the table which is 16

128 + 32 + 16 = 176 This is higher than our number of 172 so place a 0 in the box like below.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 | 0 |

Now move on to the next number which is 8

128 + 32 + 8 = 168 This is not high enough so place a 1 in the box like below.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 | 0 | 1 |

Now move on to the next number in the table which is 4

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 | 0 | 1 | 1 |

128 + 32 + 8 + 4 = 172 This is perfect, because we have reached our number of 172 you can now place zero's in the other empty boxes like I have done below because we will not use them.

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |

1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 |

This now gives us our binary number of 10101100

10101100 = 172

If you follow this guide for each octet you would end up with a table that looks like this one below.
Decimal Binary

172 | 16 | 0 | 0 |

10101100 | 00010000 | 00000000 | 00000000 |

If this helped you please let others know so they may also benefit.

Is there a tutorial you would like me to write then email me