Loading...
Hello, my name is Mrs. Holborow and welcome to Computing.
I'm so pleased that you've decided to join me for the lesson Today.
We are going to be exploring a new number system in today's lesson, which is called hexadecimal.
And hexadecimal is a base-16 number system, but what does that mean? Welcome to today's lesson from the unit Representation of Numbers.
This lesson is called Hexadecimal.
And by the end of today's lesson, you'll be able to explain how numbers are represented in hexadecimal and why it is useful in computer science.
Shall we make a start? We will be exploring these key words during today's lesson.
Hexadecimal.
Hexadecimal, a base-16 number system that uses the digits 0 to 9 and the letters A, B, C, D, E, and F.
Base-16.
Base-16, a number system that uses 16 digits.
This lesson is divided into two sections.
We'll start by explaining how numbers are represented in hexadecimal and then we'll move on to explain why hexadecimal numbers are used.
Let's start by explaining how numbers are represented in hexadecimal.
Hexadecimal is a number system that uses base-16.
As we've learned from binary and decimal, this means that each place value is 16 times bigger than the previous place value.
Because hexadecimal is base-16, we need 16 different digits to count with.
Alex has got a really good point.
"I only know the digits 0 to 9." Laura says, "We're going to need to use some letters as well." Counting in hexadecimal is straightforward for the first 10 digits, and you can see it's exactly the same as we would do in decimal.
But Alex says, "What can be used to represent the numbers 10, 11, 12, 13, 14, and 15?" The letters A, B, C, D, E, and F are used.
So, you can see here, decimal 10 is equivalent to A in hexadecimal.
Have a think about where you have seen hexadecimal numbers before.
Maybe pause the video here and have a think.
Hexadecimal values are used quite frequently in computing.
Here is some common examples.
So, this is an example of a colour code, here is an error code, and here's a MAC address.
You may have noticed that when you pick a colour from a spectrum of colours in a programme, a hexadecimal value is often assigned to that colour.
So, you can see here the hexadecimal number for red is ff0000f.
If you've ever needed to view a MAC address for a device, you'll see that the address uses hexadecimal values.
You may also have seen a memory dump screen like this one before.
A memory dump typically appears on a screen when the computer has crashed.
Hexadecimal numbers have been used instead of binary here.
Time to check your understanding.
What letter represents the decimal value 13 in hexadecimal? Is it a, B, b, C, or c, D? Pause the video whilst you have a think.
That's right! The correct answer is c.
The decimal value, 13, is D in hexadecimal.
Let's have a look at some common misconceptions about hexadecimal.
"The F represents 16 because it's base-16." "No, F represents 15." Remember, the first values are 0 through to 9 and then 10 is represented by A, 11 is B, and so on.
"The A represents 11, because it goes 1 to 10 and then the letters right?" No.
Again, remember, A represents 10 because we start at 0.
Here's a top tip.
If you are answering an exam question about hexadecimal, write out this table to avoid making simple mistakes.
Aisha has a question.
"What about values that are bigger than 15?" Alex says, "You need to use more columns!" Just like in base-10 and base-2, decimal and binary, base-16 or hexadecimal uses place value columns.
In this case, though, each column is 16 times more than the column to the right.
So, our first place value column is 1, and then we multiply that by 16.
So, our next place value is 16, and then it's 256, and then 4096.
Watch the video to see how counting up to 256 compares in decimal and hexadecimal.
Time to check your understanding.
What would the next number be after 59 in hexadecimal? Is it A, 60, B, 5A, or C, 5B? Pause the video whilst you have a think.
That's right! The correct answer is B, 5A.
Okay, we're now moving on to the first set of tasks for today's lesson, and you're doing a fantastic job learning a brand new number system today.
So, well done.
I'd like you to start by completing the tables by filling in the missing hexadecimal and decimal values.
For part 2, I'd like you to explain what comes after 6B in hexadecimal.
Pause the video whilst you complete the activities.
How did you get on? Were you able to fill in the missing values? Great work.
Let's have a look at some answers together.
So, in the first table, you were given the decimal values and you needed to complete the hexadecimal values.
So, the first one was very straightforward.
We had decimal 9, which is hexadecimal 9.
They're the same.
Next one was 10, which is hexadecimal A.
Then 13, which is hexadecimal D.
15, which is hexadecimal F.
And then the last one is a bit trickier.
You've got 16.
So, remember, we've gone over the value of the first place value digit here, so it's actually hexadecimal 10.
And then in the other column, you were given the hexadecimal values and you needed to put in the decimal values.
So, again, the first one, straightforward, they're both 8.
hexadecimal B is 11, hexadecimal C is 12, hexadecimal E is 14, and then hexadecimal 11 is 17.
And then you ask the question, "What comes after 6B in hexadecimal?" And the correct answer is 6C.
Remember, if you need to make any corrections or fill in any gaps, then you can pause your video and do that now.
For the final part of Task A, I'd like you to list as many places you can think of where you might have seen hexadecimal numbers being used, and we've talked about some examples in this lesson so far.
So, see if you can remember some of those.
Pause the video whilst you complete the activity.
How did you get on? Did you manage to think of some examples of hexadecimal numbers? Here's some sample answers.
You may have some additional ones that I've not included.
So, in colours or colour codes, MAC addresses, memory dumps, HTML entities and emoji codes, cryptographic hashes, IPv6 addresses, and also some URLs.
We are now moving on to the second part of today's lesson where we're going to explain why hexadecimal numbers are used.
Hexadecimal is often used by humans instead of binary, because it's easier to read and interpret and it typically uses fewer digits to represent the same value.
Hexadecimal numbers are shorter than binary numbers, as every four binary digits are grouped into a single hexadecimal digit.
For example, 1111 in binary, which is 15 in decimal, becomes F in hexadecimal.
This makes it easier for humans to read, write, and understand long, large binary numbers.
So, you can see here a table of some conversions.
So, the binary number 0010 is represented by the hexadecimal digit 2.
1010 is represented by hexadecimal A, 0111 is hexadecimal 7, 1111 is hexadecimal F, and 1101 is hexadecimal D.
Time to check your understanding.
How many binary digits does one hexadecimal digit represent? Is it A, 2, B, 4, or C, 8? Pause the video whilst you have a think.
That's right! One hexadecimal digit represents four binary digits.
For example, if a web developer needs to communicate the exact colour used in a website, it is easier and less prone to error if they say ff6600 rather than 111111110110011000000000, which is how that colour is actually stored on the computer in binary.
Jun says, "That's a lot of 1s and 0s for a single colour!" Hexadecimal strikes a good balance between human readability and integration with the binary number system that computers use.
Alex says, "So, hexadecimal is used because it takes up less memory in my computer than binary?" Maybe pause the video and have a think here.
Is Alex correct? Ah, Aisha says no, Alex is not correct.
"Remember, a computer still only processes and stores data as binary.
Using hexadecimal is just to make it easier for us humans!" Let's have a look at some common misconceptions around why hexadecimal numbers are used.
"Hexadecimal is faster for the computer." "No, hexadecimal is faster and easier for us humans to use, compared to binary." "Computers find hexadecimal easier to understand." "No, computers don't find things easy or hard." "Computers only understand hexadecimal." "No, computers only process data in binary." Okay.
We're now moving on to the second set of tasks for today's lesson, Task B.
I'd like you to identify which of these statements are true and which are false, so you can just write true or false, or T or F in the column.
Pause the video here whilst you complete the activity.
How did you get on? You're doing a great job so far.
So, well done.
Did you manage to correctly identify which statements were true and which were false? Let's have a look at the answers together.
"Hexadecimal is easier for humans to read and write compared to binary." This is true.
"One hexadecimal digit represents eight binary digits." That's false, because one hexadecimal digit represents four binary digits.
"The hexadecimal value E is equivalent to the binary value 1110." That's true.
"Hexadecimal is faster for computers to process than binary." That's false.
Remember, computers only process binary.
"Hexadecimal is used because it reduces the length of binary numbers." That's true.
"Computers only understand hexadecimal numbers." That's false.
"Web developers use hexadecimal values to represent colours, like FF6600." That's true.
"Hexadecimal is less compact than binary, making it easier for humans to interpret." That statement is false.
The second part is true.
hexadecimal is easier for humans to interpret, but not because it's less compact.
"The number 12 in decimal is represented as D in hexadecimal." That's false.
"Using hexadecimal helps humans work with binary data." True.
Remember, if you need to pause your video and make any corrections, you can do that now.
For the final part of Task B, I'd like you to describe why the hexadecimal number system is used to represent colours on the web and explain the benefits of this over using the binary number system that computers use internally.
Pause the video here whilst you answer the question.
Let's have a look at a sample answer together.
"Colours on the web are often represented by a six-digit hexadecimal number, such as ff6600.
This uniquely identifies a particular colour from the millions of possible colours in the spectrum." "Using the six hexadecimal digits means that it's easier to communicate this colour to other people who may need to use it.
If designers had to rely on binary to communicate this colour, it would be represented as a series of 24 ones and zeros, which would be prone to errors when being read or processed." We've come to the end of today's lesson and you've done a fantastic job.
So, well done.
Let's summarise what we've learned today.
Hexadecimal is a base-16 number system that consists of 16 digits, the number 0 through to 9 and the letters A, B, C, D, E, and F.
It is commonly used for representing colours in programmes, MAC addresses, and memory dumps.
Hexadecimal is used as a compact way of representing long binary numbers.
Each hexadecimal digit represents four binary digits.
Hexadecimal is often used by humans instead of binary, as it's easier to read and write long numbers in hexadecimal and avoid errors.
However, computers still store and process all data as binary.
Thanks again for joining me for today's lesson and I hope to see you again soon.
Bye!.