# How to Convert IP Addresses to Decimal Format

by Garrett Unglaub

Binary is the language of computers, but unfortunately it is not easily readable by humans. Ones and zeroes make up bits that can be converted into any information. Computer CPUs are made up of transistors that can only turn on and off. Feeding the transistors binary code allows all of the information to be either true or false. IP addresses are unique numbers that represent every computer that is connected to the Internet or a network. There are no two computers on the entire World Wide Web that have the same IP address. The computer views the IP addresses as binary code, so to convert the code to decimal format, a mathematical equation must be used.

#### Step 1

Find your IP or use the standard IP address of a router: 192.168.0.1. In binary code, 192.168.0.1 is equal to: 11000000.10101000.00000000.00000001

#### Step 2

Convert the binary to decimal by placing a value of 0 on all the 0 bits in the number. 1s get a value of 2 to the power of the bit's location. So if the binary number is 11000000, the first 1 is in the seventh position, while the second 1 is in the sixth position (The last 0 has a position of 0, not 1). The equation would then look like this: 2^7 + 2^6.

#### Step 3

Take 2 to the power of 7 plus 2 to the power of 6 and you'll end up with: 128+64 = 192.

Convert the other binary by following the same format. 10101000 = 2^7+2^5+2^3 = 128+32+8 = 168. 00000000 = 0, and 00000001 = 2^0 = 1. You now have an IP address of 192.168.0.1 from the binary code of 11000000.10101000.00000000.00000001.

#### Tips

• Base 10 decimal notation is a less used decimal IP format that can be found by taking the dotted decimal notation IP address, for example 192.168.0.1, and using this formula to convert: 192(256)^3 + 168(256)^2 + 0(256)^1 + 1 = 3232235521
• The formula looks like this without the example IP: a:b:c:d = a(256)^3 + b(256)^2 + c(256)^1 + d.
• When converting binary to decimal, the zeroes are not necessary to add up because they will only add up to zero.

## Video of the Day

Brought to you by Techwalla
Brought to you by Techwalla