video

Lesson video

In progress...

Loading...

- Hi, I'm Rebecca, your computing teacher for the data representations unit.

For this lesson, you're gonna need a pen and paper to answer any of the questions that I give you.

You'll also gonna need to try your very best to remove any distractions out of the way so that you can really concentrate in this lesson.

Once you've done all of that, we can begin.

In this lesson, you will define the term bit.

You'll explain the difference between base 2 and base 10 number systems. And you'll convert between binary and decimal numbers.

Let's think about computers and electricity.

Computers use electric circuits and switches to represent all data and instructions.

What are the tiny switches inside a computer called? Can you remember from lesson one? They're called transistors.

And these are tiny, at around seven nanometers.

That is super, super small if you didn't know.

How many do you think would fit across a human hair? Don't worry, you don't have to get the exact answer.

So it's actually 14,285 transistors that can fit across a single human hair.

That is an awful lot of transistors there.

These transistors allow electricity to be on or off in a circuit.

We combine lots of circuits to represent data.

Everything in a computer is represented with a combination of 0s and 1s.

These switches could represent 10101110 in binary.

Let's think about numbers then and the number systems. What is the value of this number? Can you say it out loud? It's 9,019.

Why does the first 9 hold more value than the last 9? It's because each number has a place value.

What are the place values in this number? Can you remember what goes at the top? What goes above them? Let's take a look.

So you've got ones, tens, hundreds, and thousands.

You work out the next place value by multiplying by 10 as you move from right to left.

So there we've got, each time it goes up, that number is multiplied by 10 to get to the next place value.

How many digits are there in our decimal number system? Let's see if you can count them.

How many have we got? So we have 10 digits.

Our number system is a base 10 number system because it has 10 digits.

Binary is a base 2 number system.

This is because it uses only 2 digits, 0 and 1.

Make a prediction there.

What do you think the place value might be of each of the numbers in this table? Think about what it was for decimal and see if you can apply that to binary.

Let's take a look.

So two, four, and eight.

That's where the place values.

So actually what's happened there is you can work out the next place value by multiplying by 2 as you move from right to left.

Just like we did with decimal.

Each binary digit is called a bit.

To work out the value of a number, you need to know its place value.

You then multiply the digit by its place value.

So just take a look at this one.

So if you look there, you've got the number 9, you times that by 1 because it's in the ones column.

And then the 1 you times by 10 because it's in the tens column, the 0, we ignore because it's a 0, and then the 9 is times by 1,000 because it's in the thousands column.

You then have the answers, and then you add them all together and that makes the final number 9,019.

So it's not just numbers in isolation, a nine, a one, and a zero, it's a whole number together, 9,019.

You do exactly the same thing in binary if you want to see what it is in decimal.

So you multiply the digit by its value, like place value, like what we got there.

And if you look, you've only got 1s and 0s there to multiply it by.

So just 1 times 1, 2 times 0, which is nothing, 4 times 0, which is nothing, 8 times 1, which is just 8, isn't it? So then you add all the values together, and you get 9.

So that binary value there, 1001, is actually 9 in our decimal number system.

In binary, it's a little easier because you are always multiplying by either 1 or 0.

There's no tens or hundreds or thousands to multiply it in this stage.

You don't actually really need to multiply because you either multiply it by the place value or you don't because it's a zero and it's just nothing.

How can you tell the number base of a number that you are presented with? This is an interesting one.

I wonder if you know.

You can actually use a subscript at the end of the number to state the number base.

So if you look there, you've got 101 and it's got a base of 2 which means that it's a binary number, and you've got 101 with a base of 10, and that means it's a decimal number.

So as you see numbers like that throughout this unit, you'll be able to tell whether it's a base 2 or a base 10 number by looking at that little number that's been subscript underneath.

So, quick recap.

Binary, is it base 10 or base 2? It's base 2, isn't it? And how many digits does decimal have? It has 10, doesn't it? Right.

In order to convert from binary to decimal you need to know the place value of each digit in the number.

When you are just starting to learn how to do this it's a really good idea to always use a table like this one.

And you'll get quite used to drawing this as we move throughout this unit.

So draw this table now.

Pause the video while you do that.

If I give you the binary number 111, then you place the digits from right to left in the table.

So just like that, 1, 1, 1.

Then, you look at their place value and add those values together.

So you've got there 4, 2, and 1, you add them all together and you're gonna get 7.

So 111 in binary is 7 in decimal.

Let's try another.

So convert 1010 from binary to decimal.

Now, I've already placed it there on the table.

So if you can think about it, let's have a go.

So you only need to add the 8 and the 2 this time because those 0s don't need to be included.

So you just do 8 add 2, and that equals 10.

So 1010 in binary is 10 in decimal.

Let's try a slightly larger number then.

Convert 101111 from binary to decimal.

So you can pause the video and see if you wanna have a go with it or you can just follow along in a few seconds.

It's up to you.

But what you've gotta do, first of all, you gotta see which ones have got 1s underneath them.

And it's all of those.

And then you gotta add them all together.

So 101111 in binary is 47 in decimal because it's the total of all those ones with a 1 underneath them.

Use your table to help you answer the following quick fire questions.

Now, I'll try not to be too fast when it gets a little bit harder, but you can always pause the video if you need to, if I am going too fast.

So don't panic.

If I'm going too fast, just pause me 'cause that's what it's there for, okay? Let's have a go.

So convert these numbers from binary to decimal.

See if you can do it.

So 101.

What's that in decimal? It's 5.

1111.

What's that in decimal? It's 15.

Okay.

So 10111.

It's getting a little bit tricky now.

It's 23.

1110.

Which one is it? It's 14.

And oh gosh, that is a super big one.

What's this gonna be? It's 131.

Wow, that was quite intense, wasn't it? It's a little trickier to convert from decimal to binary.

You need to work from left to right this time, and you need to subtract, not add.

So it takes a few extra thoughts as you do this.

So let's start with a small number, which is number 5.

So if I wanted to take the decimal number 5 and convert that to binary, then this is what you would need to do.

So you start by looking for the highest value that fits into that number.

So you can go down the list, 16 doesn't fit into 5, nope.

Does 8 fit into 5? Nope.

Does 4 fit into 5? Yes, it does.

So once you found one, you put a 1 and then you gotta start doing the subtraction.

So you take the original 5, and then you take away 4 'cause that's the place value that you've just used, and you're left with the value 1.

Then you start looking for the highest value that fits your remaining number.

So, does 2 fit into 1? Nope.

Does 1 fit into 1? Yes, it does.

And you're left with that.

So 5 in decimal is 101 in binary.

You can double-check your maths by doing a quick conversion back to binary to just make sure.

So 101 in binary is 5 in decimal.

So you just have a look at those bits on the top.

So 4 add 1, that's 5.

Yes, we're right.

And this becomes more essential with numbers, especially if you're in an exam because it's so easy when you are under stressful conditions like an exam, to make tiny little errors with numbers.

So it's always a good idea to just double-check you working out, and I just do this out of habit.

I always check it every single time.

I don't trust that I'll get it right the first time.

I always go back and check.

And it's really good to build that habit quite early on.

And also, it gets your brain working as well.

'Cause it means you get to practise converting it the other way too, 'cause you don't wanna miss out on a marking exam just because you counted a 4 instead of a 3 or something like that.

So it's very important that you always double-check.

Let's try a higher number then.

Convert the decimal number 60 into binary.

So do exactly the same thing.

What is the highest number in our table that will fit into 60? So it's 32, isn't it? 'Cause 64 doesn't fit into 60, does it? So you do 60, take away 32, which is 28.

So that's what you're left with.

And then, you go down the list.

So does 16 fit into 28? Yes, it does.

So I put a 1 there.

And then you're left with 12.

And then you start looking again.

So what is the highest value that fits into 12? It's an 8.

So you put a 1 there.

12 take away 8 equals 4, so now we're left with 4.

What is the highest value that fits into 4? Well, the next one along is a 4, so you gotta put a 1 in that one too.

And you do 4, take away 4, which is 0.

So you don't need to make any more numbers.

So you just put 0s in those remaining columns because you got to the end of that number.

So we have our answer.

60 in decimal is 111100 in binary.

So, we can double-check.

Always important to double-check.

So count up all of those 1s.

So 32 add 16, add 8, add 4, and if we add all of those up then you're gonna be left with 60.

So we got it right.

So try these conversions from decimal to binary by yourself.

Now, see if you can do it using the table.

Pause the video while you do that.

Let's go through those answers then.

So the first one, 128 is 10000000.

I think I said the right amount of 0s.

Of course, it's just a 1 and then loads of 0s because 128 fits into 128.

So you just put a 1 there and the rest are gonna be 0s 'cause you've got no numbers left.

120 was 1111000.

80 was 1010000.

200 was 11001000.

190 was 10111110.

Okay, hopefully, you got some of those right or most of them right.

Let's see.

Do your thumb.

How well did you do? Did you get five out of five? Well, three, four, five, is gonna be good, isn't it? 'Cause we're just practising , aren't we? So you might get a few wrong, but hopefully, you remember to double-check them and take them backwards as well to make sure that they were right.

So, that is all to do then with getting you started with binary, and hopefully, you've got an understanding of how binary works and how we can actually convert those numbers from binary to decimal, and decimal back to binary.

If you'd like to, please ask your parent or carer to share your work on Instagram, Facebook, or Twitter so you could tell me how many you got out of five on that last one, tagging @OakNational and #LearnwithOak.

We'd really love to see what you've been up to, and I'll see you soon for lesson three.