Binary is the key to subnetting. All computers process data in binary. A circuit is either on or off. Learning to count in binary, and also to translate binary into decimal will help not only with subnetting but with understanding computers in general.
Binary uses only two digits, a 0 and a 1. Decimal uses ten digits, 0-9. Because decimal has ten different digits, you can use a single digit to count to three in decimal. 0,1,2,3. Binary cannot do this in a single space. Here is counting to three in decimal:
What do you think four is in binary? Well, we already used up all combinations of two digits to get to the value of three. We used 00, 01, 10, 11. So we need to move to the next digit. The decimal value of four is written 100 in binary.
In subnetting we sometimes have to deal with large numbers. Numbers such as 234 or 192. Luckily we do not have to count one by one to find these numbers in binary. The real trick with binary is to remember that every digit represents an exponent of two. If there is a 1 value in the right-hand most digit, then you always add 20 to that number. If there is a 1 value in the second to right digit then you always add 21 to the value.
|Bit||1||1||1||1||1||1||1||1||Bit Value||128||64||32||16||8||4||2||1||Power of two||27||26||25||24||23||22||21||20|
Lets take an example. What is bin 100101? Look at the digits that have a 1 value. We have 25=32,22=4, 20=1. We add these together, 32+4+1=37. That is the decimal value of 100101! You may want to master your powers of two.
There is also hexadecimal values. This is the same idea as binary, but in base 16, so a single digit goes from having a value of zero to fifteen.
|Hexadecimal digit||0||1||2||3||4||5||6||7||8||9||A||B||C||D||E||F||Decimal Value||0||1||2||3||4||5||6||7||8||9||10||11||12||13||14||15|
Because IPv6 is displayed using hexadecimal digits, converting between hex and binary is what network engineers will need to know for the future. The computer will still be using binary, but things will be displayed in hex.
A Binary Decimal Hexadecimal Calculator can also come in handy.