I'd like you to imagine that you and I have
walked into a showroom floor.
It could be cars or boats or what have you,
and on one of the items that we're looking at,
it has a price tag, and it says this 45,239.
And I want to ask you, how much is that?
I'm talking about the actual number itself.
Now you might be saying, well, Keith, this is really obvious.
It's 45,239.
That's the number.
And how did you get that so quickly?
And the reality is is because we've
been using base 10 numbering system for all of our lives.
It goes something like this.
We have several positions here.
For example, the nine is in the ones position,
and the three is in the tens position,
and the two is in the one hundredths
position, the five, right here, is in the one thousands
position, and therefore is in the ten thousands position.
And all we're doing, because we use a base 10 numbering
system, is a first number is always a 1,
and then the next position is times 10, and times 10,
and times 10, times 10.
In fact, we could go all the way down just
continuing to multiply that placeholder by 10, by 10,
by 10.
It was four 10 thousands, it was five one thousands,
it was two one hundreds, it was three tens, and nine ones.
But this is so second nature to us,
we didn't have to break it out like that.
In fact, when we count, for example,
our numbers go through 0 through 9.
So we have 10 distinct numbers to play with, 0 through 9.
And when we count, we do 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, and what do we do next?
We simply carry the one into the next position,
and we put a 0 here.
So 1, 0, in decimal represents one 10, and no ones,
for a total of 10.
And then we go to 11 and then 12.
And then, if we get all the way to, for example,
999 by continuing counting, and we need to go one more,
we carry that one again, and we have 1,000.
Now you might be asking, OK, Keith, I totally get this.
This is base 10.
The numbering system most humans on the planet
have been using our entire lifetimes.
So what does that got to do with this thing called binary?
Well, binary is simply a different type
of numbering system.
Instead of using base 10, binary uses base two.
So with base 10, we had numbers of 0
through 9, which are 10 individual separate numbers.
And with base 2, we have 0 through one.
With a base 2 numbering system, the first position
over here on the right is a value of 1.
And then, as we move left, this next position
is simply this first number times the base.
So in the case of binary, it's base 2,
this would be 1 times 2.
I'll put that right here, and that would be 2.
And this next position over here, this next placeholder
is going to be this number times 2, so that would be 4.
And as we go left, it would be this number
times 2, which would be 8.
And then, times 2, 16, and times 2, 32.
And times 2 again, which would be 64.
And times 2 again would be 128.
So with a base 10 numbering system,
it went one, and then times 10, times 10, times 10, et cetera.
With base 2, we start with one, and it's times 2, times 2,
times 2, times 2, et cetera.
It's also important to note that although we could
go a really long way left here, we really only need
to worry about eight positions at a time when we're dealing
with things like IP version 4.
I want you to write out these value positions for binary,
and again, the way to do it is you
start on the right with a number one,
and then you simply take that number
and multiply it by the base as you go left.
So please take a moment and make sure
that you can write this out on-demand.
So let's take a look at an example
of how a binary number works.
Now in binary, there's only two numbers
that we get to play with, and they are a 0 and a 1.
In decimal, we had 0 through 9, 10 different positions.
In binary, we have two.
We have 0 and 1.
It's sort of like a light switch.
Either it's off or on.
That's our only two choices.
So if we had a binary number like this,
that's 1, 0, 0, 0, 0, 0, 1, 1, 0, holy schnikers.
What exactly is the value of that number to us as humans?
And the way to figure that out would be saying OK, well, we
have a 1 in the 128 position, so that's 128, plus 0,
because we have no 64's, plus 0, no 32's, plus--
OK.
How many 16's are we going to add to this equation?
If your saying, well, Keith, it's like a light switch,
right?
It's either on or off.
Because this is a 0, it's off, which
means we don't have any 16's, so we're going to say 0 there,
plus 0.
And here we go.
In this third position, we have a one
on in the position that's worth four.
So we'd add 4 there.
And how about the 2?
The answer is yep, we have one of those.
So we'll add a 2 as well, and then 0.
And then, it's simply a game of adding.
All we're going to do, if we want to find out
the actual value of this binary number, all we simply do
is add these up.
So it's 128 plus 4 plus 2, and that's it.
So 8 plus 4 is 12 plus 2 more is 14.
We'll carry our decimal one right there.
That's a 4.
2 plus 1 is 3, and then we have a 1.
And so the actual value of this binary number,
1, 0, 0, 0, 0, 1, 1, 0, is 134.
I hope this has been informative for you,
and I'd like to thank you for viewing.