-
Welcome to the second video. In
the binary series. Today, we're
-
going to talk about how to
convert binary numbers to
-
decimal so when we see a binary
number, something like.
-
10110 then we know that this
place value is 2 to the power of
-
0. This place values to the
power of 1 to do a power of
-
three to two power of four and
two to power of five. So how can
-
we use this information to find
out what this binary number is
-
in decimal? What we can do
right? Every place value under
-
each digits? So two to zero do
-
today 1232. 223
-
224
-
and these numbers
mean this is
-
1248.
-
16
-
now that means we've got 1 * 2
to the power of 4.
-
Plus 0 * 2 to the power of 3.
-
Plus 1 * 2 to the power of 2 +
1 * 2 to the power of 1.
-
Plus 0 * 2 to power
of 0. This also means that
-
we've got 16 * 1 +
8 * 0 + 4 *
-
1. Plus 2 * 1.
-
Plus 1 * 0 Now zero times any
number always gives you 0, so
-
these numbers are equal to zero
that we don't really need to
-
take them into account when we
adding up, so the numbers that I
-
need to just add up 16 + 4 + 2
and that is 22. Now if we wanted
-
to be really precise what I
should be doing, I should write
-
a letter to in here to
indicating that this is a binary
-
number. And the letter 10 in
here indicating that this is a
-
decimal number, so.
-
10110 in binary
is 22 in
-
decimal. Let's have a look
at another example so you
-
can see clearly hard binary
numbers work.
-
Let's start with a slightly
smaller number 1101. This is our
-
binary number and we want to
find out what it is equivalent
-
to in decimal.
-
Now we can again start talking
about the place values and then
-
find out each at each place
value what is equvalent to.
-
However, there is a slightly
faster way. You might have
-
noticed that when we were
looking at the binary playplace
-
values, what happened to the
place values they all doubled as
-
we went from right to left, so
we can use that information
-
instead of remembering always to
the powers so I can start with
-
just writing one on top of the
-
first. Place value then double
of that two to the next place
-
value up, then double of 2 four
to the next place value up and
-
then AA 48 to the next place.
Value up again. Every time I see
-
a zero. I know that zero will be
multiplied by that place value
-
which also tells me that I don't
necessarily have to take that
-
place value into account so
another quicker way of doing the
-
conversion. Is I'm only taking
into account the place values
-
which has got ones under them,
so this number will be 8 + 4
-
+ 1. Now 8 + 4 makes 12
+ 1. This is 13 in decimal.
-
You would say that it's a rather
faster way of doing it.
-
So another example.
-
11010
to make sure that everybody
-
knows is a binary number, I'm
just going to put down the
-
letter to that and again look at
the place values. So the
-
smallest place value here is 1.
Then I'm just doubling up all
-
the different digits to get to
all the place values. And again,
-
I'm only picking out the place
values which have got ones under
-
them. So 16 + 8 four has zero
100, so that's not going to be
-
used. And to use that has got
one under it. The last place
-
value the one place where you
again is not used.
-
So adding these together
again, I can pick and choose
-
which numbers are merging
together and I can notice
-
that 8 + 2 adds up to 10
quite nicely, and 10 + 16 is
-
easier to add together that
16 + 8 + 2. So whenever you
-
have numbers here you can
pick and choose which one to
-
add together, especially if
you're not allowed to use a
-
Calculator. So 8 + 2 makes
1010 + 16 makes 26, so this
-
number is 26 in decimal.
-
Next example 11101. Again,
this is a binary
-
number. Place values.
-
124 eight 16. So which are the
ones I'm adding together
-
everything except the two. So
this is 16 + 8 + 4 +
-
1. Again I can pick and choose
which numbers to add together.
-
16 and four nicely adds up
together to 20 and I've got 8 +
-
1 which gives me 9. So
altogether this number is 29.
-
In decimal.
-
OK, now you can see three
different examples here in front
-
of you. And when you look at the
three different numbers, the
-
decimal equivalents that you
see, we can spot that two of
-
them are odd and one of them is
Even so how can I quickly and
-
easily just see if a number is
odd or even in binary? Now look
-
at all the place values, every
single place value is an even
-
number except for the very last
one. OK, so the smallest place
-
value is the one.
-
Everything else is even now we
know in mathematics that if I'm
-
adding even numbers together,
the answer always going to be
-
even. We also know if I'm adding
an even an odd number together.
-
The answer will be odd, so this
is a quick way to check if
-
you've made any calculation
mistakes or not. If the last
-
digit in the binary number is 1,
then you know that you used one,
-
so your answer has to be an odd
number, but if your last digit.
-
O, you know that you haven't
used any odd numbers in your
-
sum, so everything added
together there is even there
-
for your final number has to
be even. This is just
-
curiosity to help you if
you're not very familiar with
-
the binary numbers to see if
your answer is right or not.
-
I'm hoping that you started to
get an understanding of the
-
binary numbers, but let's look
at some slightly longer and
-
therefore a little bit complete.
More complicated examples. So if
-
I have got a slightly longer
number, such as 10101010 Now as
-
I mentioned before, I'm
expecting to have an even
-
answer. But what exact number
lies behind this binary number?
-
So again, start putting the
place values on top of the
-
digits 124, eight, 1630, two
64128. Now you don't need to be
-
quite good at doubling, but
doubling isn't overly
-
complicated, so you should be
able to carry out these
-
calculations relatively simply
even without a Calculator. So
-
what are the digits I'm using
here? Remember, anything
-
multiplied by zero always gives
you 0, so these digits.
-
Here we are not add any extra to
the number value that I have
-
here, so I only have to pick out
128 + 32 + 8 + 2. So again
-
I can pick and choose which
numbers to add together and by
-
looking at it I would say the
adding together 128 and two
-
gives me nice an easy number
which is 130 and adding together
-
32 + 8.
-
Gives me 40, so this
number is 170 in decimal.
-
I could have chosen a different
combination of adding the
-
numbers together. I could have
-
added 32. And 128 and 8 +
-
2. Ending up with 170 again, but
I think he would agree with me
-
that adding 128 + 2 together.
-
Slightly simpler than adding 128
and 32, although it's not
-
that much more complicated and
the last example for today's
-
video is 11001101 in binary.
Again, a nice and quick
-
way of putting the exact
place values on top of
-
the numbers one 248-1632.
-
64128 and again, remember
anything which has got zero
-
under 8 will just get
multiplied by zero.
-
Therefore that number
doesn't add to the value,
-
so I'm just picking out the
place values which has got
-
the digit 1.
-
So 128 + 64 + 8 + 4
+ 1. Now unfortunately, when I'm
-
looking at this some there isn't
anything that is nice and easy
-
to add together, so I will have
to think about this addition and
-
slightly different way. So what
I'm gonna do I'm going to add
-
together these smaller digits.
So 8 + 4 makes 12 + 1
-
makes 13, so these three.
-
Makes the team and I've got
64128 left. I'm going to leave
-
128 for now because I can see
that 64 an hunnan 13 can add
-
together quite simply so that
together makes 77. And now I'm
-
just going to copy 128
underneath and 7 + 8 makes 5
-
carried A one. 1 + 7 makes 8
+ 2, makes 10 carry the 122.
-
So this number is 205 in
decimal, and again I'm expecting
-
to have an odd number because I
have got a digit one in here.
-
And at this video was about how
to convert binary numbers into
-
decimal numbers. I hope you have
got a better understanding of
-
the process now and in the next
minute you will see some
-
practice questions that you can
try yourself and I will supply
-
the answers as well.
-
I suggest that you post the
video while you are carrying out
-
the calculations and then you
move on to the answers. So these
-
are the practice questions.
-
And here are the answers.