In this blog post I will take you through how to convert an IP address and subnet mask from decimal to binary using Microsoft Excel.
- Launch Microsoft Excel on your device
- Type in a IP address and subnet mask. In the image below, I have typed a row title of IP address in Column A, Row 1 and Subnet Mask in Column A row 2. I have then inputted a random IP address of 192.168.1.5 and the subnet mask of 255.255.255.0. I have further added title IP Binary in Column A, Row 3 and Subnet Binary in Column A, Row 4 (see image below).
3. Click on cell B:3 (Column B and Row 3). Let’s convert the IP address to binary first.
4. Type =DEC2BIN(B1, 8) and press enter
8 = the number of bits you want to see
5. This gives you the binary digits for 192
6. Click the green square and whilst holding down the left button on your mouse, drag to column E as shown in the image below.
7. The result should be as shown in the image below. You now have the binary digits for the IP address 192.168.1.5. Try changing the IP address to a different one, you’ll find the binary digits will also change.
8. Go through the same steps for the subnet mask, so in column B, row 4, type =DEC2BIN(B2, 8) and press enter on your keyboard. Drag field across to column E as you did in step 6 above.
You now have your very own decimal to binary calculator. Change the IP address and subnet mask as you wish, the binary digits should change.
I hope you found this useful. Please feel free to comment below if you have any feedback.