Before we start calculating subnets and talk about IP addressing, let’s first check out some basics of binary calculations. We are all used to work with decimal numbers where we count from 1 to 10. This is easy because we have 10 fingers so we don’t have to count off the top of our head.
In the binary system, we only work with 0 or 1.
0 = Off
1 = On
Let’s look at some examples how we can use binary to create some numbers:
Above we have 8 bits. The bit on the far left side is called the most significant bit (MSB) because this bit has the highest value (128) . The bit on the far right side is called the least significant bit (LSB) because this one has the lowest value (1).
So how do we convert decimal numbers into binary? Let’s look at some examples.
Decimal to Binary
If we want the decimal number “0” in binary this means we leave all the bits “off”.
Let’s take the decimal number 178 and turn it into binary. We do this by starting from the left and then try if each bit “fits” in to make this number:
128 + 32 + 16 + 2 = 178.
Here’s another, let’s say we want decimal number 31 in binary. Start from the left and see which bits “fit”: