video

Lesson video

In progress...

Loading...

Hello, my name's Mr. Davison and I'm going to be guiding you through our learning today.

Today's lesson is called Representation Using Binary Sequences from the unit Representation of Text, Images, and Sound.

And today we're going to be able to describe how computers represent data and instructions using binary sequences.

The keywords for today are information, data, and binary digit.

Let's get started by identifying that sequences of symbols represent data.

Now, ever since humans have been aware of each other, they have needed to communicate information to one another.

And over time the ways that that has actually happened has changed.

But if you think about it, the principle of how we communicate remains the same.

So we could have way back in the past communicated using cave paintings, little drawings on stone that people could see and communicate stories to one another.

As we progressed, we would write things down, so we developed written languages that would capture the way that we talk to one another, and that's continued all the way through to the digital age of today.

We communicate using computers in the same way that people used to communicate using cave paintings or they wrote letters or wrote stories in books.

The medium may have changed, but the principle still holds that we communicate information between different people by showing them and letting them take it in.

Now, the important thing to remember about communicating information is that it provides another person with facts about a situation or a person or an event.

And information inside it often includes data values that have been combined and processed to give meaning.

So in our cave paintings, the actual data would be the pictures and the symbols that were drawn onto the rock to tell the story.

In a letter written to someone, words would form the data that will present the information.

We join words together in sentences to pass on information to other people.

And similarly in our digital information, we still have data values and they can be numbers, facts, figures, words, pictures, a combination of all those things that provides information to other people.

So let's just check that you've understood that.

I want you to fill in the missing word for that sentence.

Read the sentence carefully and decide whether the word is fact data or symbol.

Pause the video and have a think.

The correct answer is data.

So information is data values that have been combined and processed to give it meaning.

So let's consider data in a bit more detail now.

Well data is raw facts and figures that provide the basis for information, but on their own data values do not have any meaning.

They don't have what we call context.

No one understands what the data values are just by looking at them.

And there's some examples on there, 42, 3.

14, one pound and Westward Ho! We can sort of guess what they mean and maybe some of them look familiar, but actually without context, we don't know what those data values represent.

They're meaningless.

So let's look at these one by one.

First, let's consider the integer of 42.

42 is just two digits that combine to make an integer data value.

The second one, 3.

14 has digits again, but this time has an extra decimal point that combines to make what we call real data values.

If we take the third example, that adds an extra bit of data onto the front of our data value.

This time the pound symbol is combined with the digits and the decimal point to make a currency value.

We can also have data that's letters and sometimes other symbols like punctuation and numbers.

When we combine these together, what we're creating is something called a string data value.

Now, with those data values, what you'll notice is the order of the symbols in the sequence is important.

You can use the same symbol in different positions in the sequence to mean different things.

If we take our example of 42 and swap both the digits around, we have a new number 24.

It's still got those two symbols, two and four, but the sequence of those symbols is different and it gives it a different meaning.

So which of these three sequences of symbols do you think represents integer data? The correct answer is 51 with numerical digits.

B does say 51, but you'll notice that it's made out of words and punctuation.

So it doesn't actually represent an integer, it represents a string.

And option C, 51 pounds, because of that pound sign and because of the decimal point, it no longer represents what we call integer data.

So you are gonna put some of that into practise for me now.

What I want you to do is complete the table for the different types of data.

I want you to describe what symbols are used and what the data could represent.

So I've done the first one for you.

Integer uses the symbols digits, so they're the numerical values that we see as part of an integer.

And then I've just picked two digits, 2 and 3, to make an example sequence of how we make the number 23.

And what could that information of that data represent? Well, it could be anything, but if we start giving it context so it becomes information rather than just numerical integer data, I could say perhaps it represents the temperature of a room, though other examples are perfectly valid.

Also, once you've done that, I want you to be able to explain why we use the same symbols to represent two different data values.

So read the statement carefully and come up with an explanation.

Pause the video and have a go at those two activities.

Well done, let's check the answers that you got.

Now remember with these answers you could have slightly different things.

Each column would look slightly differently on yours, but use my examples to check that they seem reasonable.

So the real data type is made up of digits and a decimal point.

And in my example, I've used the real number 8.

96 and I'd said that that was perhaps a measured distance of a long jump.

For the currency values we use digits, decimal point and the pound sign as well.

So there I've put the monetary value of one pound and three pence, which I could say could be the cost of a pint of milk.

And last on the table for a string, well, a string can be anything, can be digits, letters, and any other characters that we choose to, it will all be treated in the same way.

So I've put an example postcode there of CH6 4EX combinations of letters, numbers, and a space in between.

Now, for the second part of task A, you have to explain to Jun how you can use the same symbols to represent two different data values.

He's saying he's got the data values 1.

23 and 12.

3.

They've both got the same symbols, so he doesn't understand how they're different.

Now remember that the order of the data sequence is important as it provides meaning to the data.

So that position of the decimal point affects what the value represents.

By changing the order of the sequence and moving that decimal place, each of the digits change their place value so that the two data values end up being very different things even though they've got the same symbols.

So remember the order of your sequence, no matter what the type of data is very important.

Let's carry on with the lesson.

So now we're going to describe how computers use binary sequences.

Binary sequences use the binary number system and the binary number system uses two symbols, 0 and 1.

They're the only two symbols it ever uses, but it can use those symbols to represent lots of different things by varying the number of times it repeats those symbols and the order in which the values of those symbols appear.

So we're gonna refer to these symbols as binary digits, but we can abbreviate that just down to bits.

And computer scientists use the term bits more than they would use the term binary digits.

Now the first thing that we can create using bits are binary numbers.

So they're numbers like we as humans count with, but instead of using the digit 0 through to 9, it uses the bits 0 through to 1.

And those bits in different positions represent different values.

Let's take a look at an example.

At the top of this table, I put what the place value represents.

If I start from the right and work my way left, each time I move one to the left, the place value doubles.

So the place value of the first digit on the right represents the number 1 or place value of 1.

And as we move along, the place value changes to 2, 4, and 8.

In this particular number, what I'm saying is I want a 1 in the 2s place value, which means that my number contributes 2 to the overall total.

The 0 is placed in the 1s column because that number, even though it doesn't contribute anything, means that the one to the left hand side actually has a different meaning than if that 0 wasn't there in the 1s column.

So what we have here is a binary number 1, 0 that uses two bits and is the equivalent of the decimal number two.

Now as the number gets larger, we have to use more bits.

Here we've used 4 bits instead of 2, the number has grown to the left and it's grown because the numbers of the place values increase as well.

In this case, my overall number is going to contribute one lot of 8, one lot of 4, and one lot of 2.

And overall we can say that the binary value 1 1 1 0 uses 4 bits, and that would be the equivalent of the number 14.

I can check that because if I add the 8, the 4 and the 2, then that is also the equivalent of our numbers integer values 14.

So I've got three examples for you to look at.

What I want you to do is spot which of those represents the decimal value seven.

Well done it's C.

If we notice we are using the 4, the 2 and the 1 place values.

If we add to pull those values together, that gives us the number seven.

So it means that the binary value of 1 1 1 is the equivalent of the decimal value 7.

Computers use sequences of bits for many things.

Computers need to work with a set number of bits in each sequence because they have fixed circuitry.

As a result, the sequences that we use in computers and the binary sequences we use in computers are organised into groups of 8 bits, and we often refer to that as a byte.

If we look at an example, the decimal number 14 only needs 4 bits when we represent it as a binary value.

We saw before that there's a place value used of 8, 4 and 2, and we have to put 0 underneath the 1s column so that our number for the rest of the values makes sense.

To make it a complete binary number represented with 8 bits, 4 bits of value 0 are added to the front of the number, and we place it in the front of the number.

It means that those digits don't add anything to the overall equivalent decimal value.

What it does mean is we've got 8 bits.

And as we've said before, the computers need to work in the same groups of bits each time.

So by padding out with those extra 0s, we've still kept the number representation, but we've made it so the computer knows how many bits it's dealing with each time and what those values are.

It won't get confused.

Now that's all well and good, but as Izzy is saying, "Computers need to represent lots of different types of data, not just numbers.

Does that mean we need to use a different system for data that is not numbers?" Well, the good news is that binary sequences of bits can be used to represent any type of data, not just numbers.

If we've got a binary sequence there, 01110100 that binary sequence could u be used to represent a number.

So in this case, that sequence would represent 116.

We could have worked that out like before.

We could take that same sequence and it could be used to represent something totally different like some sound in an audio file, or it could be used to represent a letter in the word.

So in this case, the letter T has been represented by the same sequence as the number and the sound frequency that were described in the previous two slides.

So let's check you've understood that.

Which of the following can be represented by a binary sequence? Can we have a number? Can we have sound? Can we have a letter? What do you think? Well, the benefit of using a binary sequence and telling the computer what it represents is that as long as we follow the same rules, we can use it to represent anything we want.

So number, sounds and letters, they can all be represented by binary sequences.

It's just up to us to decide how those binary sequences are gonna represent the things that we need.

We can also see that sequences of bits can also be used to represent instructions that computers process.

So again, if we've got that same binary sequence, we can use it to represent a line of code in a Python programme.

So an actual instruction the computer has to follow.

And computers do the same thing as all those other examples.

It takes that binary sequence and depending on what it's expecting that sequence to be, it does something with it, with its hardware and the operating system and the software instructions to carry out some actions, be it on data or to carry out some instructions that it needs to complete as part of a programme.

So that same binary sequence three times might mean different things at different times to the computer.

For example, the programme might treat the same binary sequence either as a colour, a command, or a number depending on what it is set up to do.

And those same sequences we'd see over and over again, but their meaning would change because the computer is dealing with them differently at different times.

Right, it's time for you to put all of that into practise.

What I want you to do is write a description of how sequences of binary digits can be used to represent data and instructions stored in a computer system.

Use the prompts as guide to help you get started.

And once you've done that, I want you to think of the example of a robotic lawn mower that's been given instructions to move forwards and backwards along eight different compass directions.

I'm gonna leave it up to you to decide what the three bit binary sequences are that could be used to identify the different compass directions.

And I've given you the north direction as an example, where I've used a three bit sequence of 000, Stop the video and have a go.

And lastly, I want you to think about that same example, but instead of a three bit sequence, we're going to use an 8 bit binary sequence where five bits are for the direction of movement forward and backward, and the last three bits to give the direction.

So as an example, if I want to move forward northeast, that could be 0001, which would represent forward, and the northeast direction could be 001.

If I want to change that as going backwards in a northeast direction, notice that the command at the front, the 5 bits, has changed to 00000.

So there's one bit difference, but the instruction is something different.

What hasn't changed are the 3 bits of the direction 001 representing northeast.

Now the mowers designers have decided to add eight more compass directions giving us a total of 16 'cause they want to get more control over the position of where it can go.

I want you to explain why 3 bits for the direction would no longer be enough, and I want you to describe the changes that would be required to the 8 bit sequences to make sure they remain 8 bits long, but cope with the extra compass directions.

Pause the video and have a go at those tasks.

Well done, there was a lot to do there, but you did really well.

So firstly, we need to differentiate between data and instructions.

So remember that binary digits or bits are the symbols used to create binary sequences and we've said that they can take the form of 1s or 0s.

Now, binary sequences are combinations of these bits and groups of 8 bits are used to represent data and instructions in a computer.

Importantly, the same binary sequence can be used to represent different things in a computer.

It could represent a numerical value, a colour, and an image, or even an instruction that the computer needs to carry out.

The same sequence can be changed to different meanings.

Now, for part two of task B, your answers may vary.

I've gone with doing the sequences in a clockwise order, starting at north with three 0s, all the way down to south where I've done 100, and my last direction is northwest with 111.

What you've got to remember is important is that you stick to those sequences for those directions every time that you use this particular model.

And lastly, remember that we needed to change 3 bits so that it represented 16 different directions.

Now, we've just seen it can only represent eight directions.

Now because there are only eight ways to combine 3 bits in a sequence, the number of bits needs to increase if we need more values.

If I increase that to 4 bits, that gives me the 16 different sequences I need to represent the 16 different directions of the compass.

It also means that the number of bits for the movement though, will need to be decreased because I need to keep the overall total sequence to 8 bits.

So if I'm using 4 bits for the compass directions, that only leaves me with 4 bits now for the movement.

What's important is that we always keep those total number of bits in the sequence constant, but we change the meaning of what they represent to suit our needs.

Well done.

You've worked really hard today.

Let's just recap what we've learned.

We've learned that information is created from data that has been given context.

Humans have always communicated information, but the basis for that information are the data values that we join together and then give it context.

Data itself is formed from sequences of symbols, and we join those symbols together in the ways that we need to represent the data that we need to represent.

Binary sequences are formed from binary digits and we often refer to that as bits.

And remember, computers use binary sequences to represent data and instructions.

It just depends on what the computer needs to do with the data and the instructions and the time at which it processes it.

The computer will know what it's looking at, we just have to provide it with the sequences in the correct format that it's expecting.