Hi this is Cisco instructor Andrea. Today
I want to talk to you about the basics of binary. One of the great things about
networking is you don’t have to be a math genius in order to be great at
networking. What we do need to know in networking though is binary and how to
use it. We’ll also be talking about hex later so let’s take a look at binary.
Essentially you need to think back to those early days of algebra and when
we’re talking about the exponents or the power of something. So binary is a
numbering system that works in the base of two alright. So let’s just take a look
at how we’re going to use exponents and binary to figure out a binary countdown.
So if you remember with exponents it’s going to be two to the power of
something and we’re going to start with 2^0 and we’re going
to just go straight down, 2^1 2^2, 2^3, etc., and I’m actually going to go all the way down to 15. And 15 will
pretty much get you as far as you need to go whenever you’re going to be doing
some cisco certification exams. So I would like you to practice memorizing
these numbers and this little chart that we’re going to create. So again thinking
back to algebra if you do 2^0 any number to the power of 0 is
going to always equal 1. So 2^0 equals 1. Now let’s do 2^1. So any
number to the power of 1 equals itself. All right now if we do 2^2 what that
means is we need to do 2^2 that equals 4 and the way we arrive at
that is 2 x 2 so we need to multiply 2 two times that equals 4. Ok let’s do 2^3,
2^3 equals 8. I do that math by doing 2 x 2 x 2 so
2 x 2 is 4 x 2 is 8. Let’s do 2 to the fourth – 2 to the 4th equals 16.
Let’s do the math – 2 x 2 x 2 x 2 so 2 times 2 is 4 – times 2 is 8 –
times 2 is 16. Let’s do one more, 2^5 – 2^5
equals 32 so we’re gonna do 2 x 2 x 2 x 2 x 2. We’ve
got five 2’s – 2 x 2 is 4 x 2 is 8 x 2 is 16 x 2 equals 32.
All right so let’s take a look at what I’m hoping you’re noticing is a pattern
here, 1 + 1 is 2 – 2 + 2 is 4 – 4 + 4 is 8 – 8 + 8 is 16 – 16 + 16 is 32.
So everything is just doubling – now this map becomes easy. We do 2^6. I
know that means 32 is going to get doubled so it’s 64 – 2^7 7th is 64
doubled that’s 128 – 2^8 is 128 doubled and that’s 256 – 2^9 –
I double 256 and I get 512 – 2^10 i double 512 I get
1024 -2^11 I double I get 2048 – 2^ 12 I double and I get 4096. So I can
still do 2^12th in my head fairly easy by doubling 2048.
Now I’m getting 2^13th – let’s take a look at how we can use a calculator to
start solving for these larger numbers. What you need is a scientific calculator.
The scientific calculator you can find on your Start menu or even just a
regular calculator. We’re going to be working with a base 2 because we’re
doing binary so 2. And then we want to use X^ Y so the 2 is our x value
and Y in this case will be the 13 okay? So 2^13th equals 8 1 9 2 so 8,192.
Let’s do 2 to the 14th so 2^14 equals 16384. And, let’s
do the last one let’s do 2^ 15 and that equals 32,768. If
you can get this high, and memorize these numbers, so basically the memorization
just requires doubling everything that is going to really help you whenever
you’re having to solve for the networking problems that we’ll be doing
later in the chapters. So again let’s take a look it’s 1, 2, 4, 8, 16, 32, 64, 128,
256, 512, 1024, 2048, 4096, 8192. Now if you get
stuck here doing it in your head if you just double 8000 we know that it’s going
to be sixteen thousand something so that gets us closer. Same thing goes here if I
double sixteen thousand I know that that’s going to be thirty two thousand
something so start working on these. Let’s just take a look at this in a nice
clear format okay? So there’s what we’re looking at. So learn it in the vertical.
Also what we’re gonna be doing is a lot working with binary
horizontally. This is going to become especially important when we start
working with IPv4 numbers. We’re gonna need to learn how to convert binary to
decimal and decimal to binary. Again we know that binary is just two numbers.
We’re always dealing with ones and zeros right? Ones and zero zero zero ones,
whatever that looks like. So let’s just look at how this works out on a
horizontal. Two to the zero equals what? We know that any number raised to zero is
always going to equal 1, 2^1 that’s going to equal itself 2. 2^2 is 4, 2^3
is 8, 2^4 is 16, again notice how I’m just doubling these
numbers, 2^6 is 64, 2^7 is 128. So there’s 8 positions.
Here we go from 0, 1, 2, 3, 4, 5, 6, 7. So we actually have 8 positions. That’s the
magic number when considering IPv4. An IPv4 is made out of 32 bits or four
octets each of 8 bits. So I want you to notice these numbers and remember
them. These are going to become really important this 1, 2, 4, 8,
16, 32, 64, 128 when we’re creating IPv4 addresses. This is called an octet. An
IPv4 address is made up of four octets. We’ve got one, two, three, four. Just like
when we were talking about our Cisco network. That’s a 172 16 0 and a 10. So
we have 4 octets here. This is the decimal. What we’re going to learn in our
next lesson is how to convert decimal to binary and binary to decimal

Categories: Articles

Leave a Reply

Your email address will not be published. Required fields are marked *