A Guide to Understanding Binary Numbers

Thumbnail image of Port Forward Staff
Port Forward Staff
July 18, 2017 (Last Updated: ) | Reading Time: 3 minutes

A Guide to Understanding Binary Numbers

I'm going to explain binary numbers for a bit, because its almost impossible to explain sub-nets without knowing them. You can count up to any number only using zeros and ones! The number system that everyone uses is the base 10 number system. Well I'm going to show you how to count using the base 2 number system. Here is a quick example.

Base 2 = Base 10
0 = 0
1 = 1
10 = 2
11 = 3
100 = 4
101 = 5
110 = 6
111 = 7
1000 = 8
1001 = 9
1010 = 10
1011 = 11
1100 = 12
1101 = 13
1110 = 14
1111 = 15

Alright lets step through that table a bit. I'm sure that every one understands that zero equals zero and one equals one. The thrid line gets tricky. Since we are only allowed to use two numbers we need to roll over. Just like our base 10 number system does once we go beyond the number 9. So for the number two we write a 10 in the base 2 number system. Here is a simple comparison.

Base 2 Value 2

    

Base 10 Value 2

2's place

1's place

10's place

1's place

1

0

0

2

The value of the number column always multiply by the base number just like in the base 10 number system. In base 10 the ones column is for ones. Then you have the ten's column which is 1 * 10 so it equals 10. Next is the 100's column, which is 1 * 10 * 10 which equals 100, and so on and so forth. Well you've got the same thing going on in the base 2 number system. Instead of multipling by 10, you are multiplying by 2. So in the ones column you have ones. In the next column you have 1 * 2 equals twos. Next you have 1 * 2 * 2 which is fours. After that 1 * 2 * 2 * 2 which turns out to be eights. Since we don't think in the base 2 number system, it really helps to write the columns value's of the number system above the number.
2 1
1 0 = 2
Basicly one 2 plus zero 1's equal the value of two. Alright lets start breaking the rest of the table down like that.
2 1
1 1 = 3
One 2 plus one 1 equals three.
4 2 1
1 0 0 = 4
One four plus zero 2's plus zero 1's equals 4.
The example above was a three bit number. Lets do the number 10110011 eight bit number.

128  64  32  16   8   4   2   1
1 0 1 1 0 0 1 1 = 179

128 plus 32 plus 16 plus 2 plus 1 turns out to be 179.

So far we have only converted from a base 2 number to a base 10 number. Converting a number from base 10 to base 2 is just as easy. Instead of adding the numbers we subtract them instead. Lets turn the number 153 into a binary number. So.. Where do we start? Well remember that the number columns are all multiples of the number 2. So lets write our value row, until we find a number that if times 2 is more than 153. In this case that number would be 128, because 128*2 is 256 which is more than 153. So starting at 128 lets write our values.
128 64 32 16 8 4 2 1
Okay so 128 is less than 153, so lets put a 1 in binary under 128. 153-128=25 Since 64 is more than 25 we put a 0 under 64. Since 32 is more than 25 we put a 0 under 32. 16 is less than 25 so we put a one under that. 25-16=9 The number 8 is less than 9, so put a one the number 8. 9-8=1 Four is greater than 1 so put a 0 under 4. Two is less than 1, so put a 0 under 2. One is equal to 1, so put a 1 under 1. 1-1=0 We are done! The binary number for 153 is 10011001.

Well that's all there is to that!

More From Portforward