# Lesson video

In progress...

Loading...

Hello and welcome to another video.

In this lesson we'll be talking about binary, the language of computers.

My name is Mr Maseko.

Before you start this lesson, please make sure you have a pen or a pencil and something to write on.

Okay, now that you have those things, let's get on with today's lesson.

So, first complete the following calculations which are all in base 2.

And it's about doubling numbers in base 2.

So pause the video here and give this a go.

Okay, now that you've tried this, let's see what you've come up with.

One add one is one zero in base 2.

Well 1 add 1 is 2, so that makes sense because 2 is represented as one zero.

Think of your place value chart for base 2, what do we have? We have our ones, our twos, our fours, our eights, our 16s, our 32s, and 64s, and so on and so forth.

So it makes sense, 1 add 1, well 1 add 1 gives us one two, so that makes sense, that's one zero.

One zero add one zero is, well two add two is 4, so that's one four, so that would give us one zero zero.

Okay.

What about one zero zero add one zero zero? That gives us 8.

What's happening, what are you noticing so far? When you're doubling in base 2, what's happening? Keep that thought, okay, let's see, let's see if that thought you're thinking is the same thing that I'm thinking.

What's one zero one add one zero one? Well, one zero one, that's 5 add 5.

5 add 5 is what? 10.

10 is the same as one zero one zero.

Huh.

Okay.

Can you see what's happening? One add one is one zero.

One zero add one zero is one zero zero.

One zero zero add one zero zero is one zero zero zero.

One zero one add one zero one is one zero one zero.

One one one add one one one, well one one one is seven, because it's one four one two, and one one.

Well if we do seven add seven, that gives us 14.

And 14 is one 8, one 4, one 2, and zero ones.

Huh.

What's happening here? 1 0 1 0 add 1 0 1 0.

Can you spot a pattern? Without even thinking about what the numbers are worth, what would this answer be.

Good, it would be 1 0 1 0 0.

Well, now check it.

1 0 1 0, well what's that? That is 10 add 10.

10 add 10 is 20.

And 20 is one 16, zero 4, one 4, zero twos and zero ones.

So looking at this, what does doubling in base 2 remind you of? Good, it reminds you of multiplying by 10 in base 10.

Because any time you multiply by 10 in base 10, you shift your digits one space to the left.

And that's the same thing that's happening here when we double in base 2, our digits just shift one space to the left.

Huh.

Now if you look at doubling in base 10, well doubling in base 10, 10 times two, 10 times two, well that is 20.

242 times two, well you know that's 4, that's 8, that's 4.

Doubling in base 10 is not as easy as doubling in base 2, 'cause doubling in base 2 is just shifting digits one space to the left, whereas in base 10 you actually have to be thinking about it.

Okay.

Now, connection.

The binary code.

Now the binary code is called the binary code because it only uses two symbols.

Now the reason base 2 is called a binary base, because in base 2 there are only two digits that you ever see, it's always zeros and ones.

Now, binary is very very important in computing, because of this nature only either being on or off, zero or one, it's very useful in computing, which use electricity, because computers can't understand complex languages, all they understand is am I receiving electricity, or am I not? On or off, zero or one.

And that's why the binary code is really useful in computing.

Because it allows us to encode information in such a way that a computer can understand.

So each little block of code is how much a computer can read at a time.

And what humans have done is that they've assigned each little block to a symbol, and when a computer reads that block, it then translates it to whatever the humans have set that to.

Now the way computers read this is beyond what we're learning here today, but it is quite interesting because it brings up some quite interesting maths, about the number of possible combinations you can have, depending on the length of the blocks you allow your computers to read.

Now, like I was saying before, computers read the binary code in chunks.

And each chunk codes for a specific symbol.

Like for example, if you want the computer to write the letter "A", we would give it a chunk of binary code that the computer knows, oh that means that I need to draw this symbol on the screen.

So, depending on how many pieces there are in the chunk, that effects how many different symbols you can code for.

Now, let's say in a chunk there are a certain number of individual spaces.

Now, each space in a chunk is called bit.

So this chunk I've just drawn, will be a 4-bit chunk.

And if my computer read in 4-bit chunks, it will look at every four blocks of zeros and ones, and each four blocks will code for a different thing.

Now, let's look at 2-bit chunks.

If I had 2-bit chunks, that my computer read in, how many different codes can I have? Remember a code is either zero or one.

A code either has zero or one.

So how many different codes can I make if my computer only reads in 2-bit chunks? So this is a 2-bit chunk.

Well, what can I have? Well I could have zero zero, so that's one code it could have.

I could have zero one, I could have one zero, or I could have one one.

So on my 2-bit chunk, there are four codes that I can have.

So, there's only four pieces of information that I can tell this really rubbish computer, 'cause it can only read every 2-bits.

But, luckily for us, our computers read in much bigger chunks than this.

And we'll start looking at how many different combinations there are, as we go forward.

But the first thing that I want you to try is this.

So, in this independent task, read the questions carefully, and you're thinking about the number of different combinations of zeros and ones you can have, depending on the size of your chunk.

Pause the video here, and give this a go.

Okay, now that you've tried this, let's see what you should have come up with.

So, for 3-bit chunks, these are all the different codes you could have had, so for 3-bit chunks, you could have had eight different codes.

So if yOur computer read in 3-bit chunks, you can code for eight different things.

So what we were seeing before, we've seen that for 2-bit chunks, you had four different codes.

For 3-bit chunks, you had eight different codes.

What about for 4-bit chunks? How many different codes could you have? Can you see a pattern? Good, for 4-bit chunks, you could have had 16 different codes.

So look at all the codes that you came up with, did you get to 16? Now these are some of the others you could have had, so you could have had.

These are all the 16 codes you could have come up with for a 4-bit chunk.

Now do you see what's happening? When you increase the number of bits you have in this chunk, what's happening? You are increasing the amount of information you can encode.

And coincidentally, if your computer only read in 1-bit chunks, well there's only two codes you could have, 'cause either zero or one.

Now look at this.

1-bit is two, 2-bits is four, 3 bits is eight, 4-bits is 16.

What would 5-bit chunks be? Well 5-bit chunks would be 32 different codes.

How else can you write 2, 4, 8, 16, 32? Well these are all powers of 2, 2 to the power of 1, 2 to the power of 2, 2 to the power of 3, 2 to the power of 4, 2 to the power of 5.

Look at this.

So what if you had an 8-bit chunk? How much information could you encode in an 8-bit chunk? Good, the pattern is in an 8-bit chunk, you could encode 2 to the power of 8, which would be 256 different codes.

Now an 8-bit chunk, this turns out to be the smallest number of bits that computers read in.

They code for 256 different things.

And now that's the most basic binary code that there is.

Now if you think about an iPhone for example, so if you think about an iPhone, what happens to an iPhone? An iPhone works on 64-bit processors.

So how much information can you store in there.

Well you can store 2 to the 64 different pieces of information.

Now 2 to the power of 64 is a really big number.

So, look at the number of different codes and think back to the base 2 place value chart.

Go on look at it.

You've got the twos, the fours, the eights, the 16s.

The 32s.

You see! The maths that we learn is very applicable in real world situations.

Now let's look at some of these 8-bit codes that computers read and what they mean.

Now, this is what your computer reads and translates to.

So it read 8-bit codes and each code codes for a specific character.

So here we have the alphabet, capitals and lowercase, and we also have some symbols and some numbers.

Using this binary code, can you write your name? Remember to leave a space between each character.

And use capitals at the start of your first name and your surname.

Pause the video here, and give this a go.

Okay, now that you've tried this, let's see what you've come up with.

Well, the first letter on my name is "A", so I would have started with the code for "A".

So, that would be 0100001.

So 0100001.

So that is "A".

And I'm going to put a dot, going to be "A" dot, so my dot would be, there it is.

"A", my dot would be, 00101110.

And then, for the first letter of my surname is "M", and I want a capital "M" and that would be, so my capital "M" would be 01001101.

And so on and so forth.

Now, your computer just reads in this long string of numbers.

But what it actually comes out with is these very simple symbols, and this is what we've told the computer those numbers mean.

Now if you've written your name and you want to share how you've written your name in binary, or you've written a message in binary code, ask your parent or carer to share your work on Twitter tagging @OakNational and hashtag Learn with Oak.

I really do hope you've enjoyed these lessons on different number systems and exploring different bases.

I will see you again next time.