Loading...
Hello, my name is Mrs. Holborow, and welcome to computing.
I'm so pleased that you've decided to join me for today's lesson.
We are going to be learning in today's lesson, how we can convert hexadecimal numbers, to and from decimal numbers.
Welcome to today's lesson from the unit, "Representation of numbers".
This lesson is called, "Hexadecimal number conversions".
And by the end of today's lesson, you'll be able to convert decimal numbers to and from hexadecimal numbers.
Shall we make a start? We will be exploring these keywords throughout today's lesson.
Decimal.
Decimal, a base-10 number system that uses the digits 0 to 9.
Hexadecimal.
Hexadecimal, a base-16 number system that uses the digits 0 to 9, and the letters A, B, C, D, E, and F.
Binary.
Binary, a number system that uses the digits 0 and 1 to represent data.
Today's lesson is split into two parts.
We'll start by converting decimal numbers to and from hexadecimal.
And then, we'll convert binary numbers to and from hexadecimal.
Let's make a start by converting decimal numbers to and from hexadecimal.
In hexadecimal, the values 0 through to 9 are straightforward.
But when you get to 10, another character is required.
So 10 is represented by A, 11 by B, and so on.
This table shows the hexadecimal equivalent for the decimal numbers 0 through to 15 because hexadecimal is a base-16 number system, you can work out the place value columns of a hexadecimal number by multiplying by 16 as you move from right to the left.
So you can see, on my column on the right hand side the place value column is 1.
The next one along is 16, multiplied by 16 is 256, multiplied by 16 again is 4,096.
Time to check your understanding.
Why do the place values for hexadecimal go up by 16 every time? Is it A, because F means 16 in hexadecimal.
B, because there are four columns, and four to the power of two is 16.
Or is it C, because hexadecimal is base-16? Pause the video whilst you have a think.
Did you select C? Well done.
The place values for hexadecimal go up by 16 every time, because hexadecimal is a base-16 number system.
If you wanted to convert a hexadecimal value into decimal, one method is to follow the same rules that you followed in binary.
Ah, Jun's got a question.
"So, how do I figure out what the hexadecimal number A1 is in decimal?" Let's have a look Jun and see if we can do this together.
So, we start by putting our hexadecimal value in our place value table.
So A, 1.
We then, work out the place value of each digit.
So, A represents 10 in hexadecimal.
So we have 16 multiplied by 10.
One represents one, so one multiplied by one.
And then, to work out the decimal value, we just add those two together.
So Laura's got the correct answer here.
160 plus 1, is equal to 161.
So, A1 in hexadecimal, is 161 in decimal.
Well done Laura.
Ah, Jun's got another example he wants to work out.
"Next, how do I figure out what the hexadecimal number 3F is in decimal?" Well, let's follow the same process again.
So, we place the hexadecimal number in the place value table, so 3 and then F.
This time we've got 3 in the 16 column.
So we're going to do 16 multiplied by 3, and then we've got F in the 1 column.
So remember, F represents 15 in hexadecimal, so we're going to have 1.
So we're going to have 1 multiplied by 15.
Work out those totals.
So we have 48 and 15, and then, Laura has added those together again for us.
So, 48 plus 15 is equal to 63.
So 3F in hexadecimal, is 63 in decimal.
Time to check your understanding.
Use the place value table and the conversion table to convert the hexadecimal number 2D to decimal.
And your answer options are A, 45.
B, 15.
or C, 26.
Pause the video whilst you have a think and work out your answer.
Did you select A, 45? Well done.
The principles are the same for three-digits and four-digit hexadecimal numbers.
However, in exams you will only encounter two-digit hexadecimal numbers, but it's useful to have a look at the process.
So here, I've got the hexadecimal value 1B2.
So, I've placed it in my place value table exactly the same as I have done previously.
We then work out the place value of each digit.
So, 256 multiplied by 1.
B is equal to 11, so 16 multiplied by 11, and then 1 multiplied by 2.
We add those or calculate those individually.
So, 256 times 1 is 256.
16 times 11 is 176, and 1 times 2 is 2.
We then add those up together.
So, 256 + 176 + 2, is 434.
So, the hexadecimal number 1B2, is 434, in decimal.
You can also follow similar rules when you convert from decimal to hexadecimal.
However, the maths can be a little bit more challenging.
So let's have a look at this together.
So we are going to work through the steps to convert the decimal value 180 into hexadecimal.
It's a similar process to converting from decimal to binary.
Ah, Jun's got a really good tip here.
"Remember that you're working with 16 digits now, not just two, so there are some extra steps to take." Firstly, 256 will not go into 180, so you know that you do not need the column or any other columns to the left.
16, goes into 180, but, you do not just put a one in that column.
Remember, this is not binary.
You need to work out how many times 16 goes into 180.
So, we need to perform a division.
How many times does 16 go into 180? Does 16 go into 1? No.
Does 16 go into 18? Yes, once.
So we put the one above, with 2 remaining.
So, you can see I've put the 2 remaining down next to the 0, which makes that now 20.
Does 16 go into 20? Yes, once, with 4 remaining.
Therefore, 16 goes into 180, 11 times, with 4 remaining.
So, 11 in hexadecimal is represented by a B.
So you add a B into the 16 column.
Four is remaining and this is already a hexadecimal digit.
So, you can add this into the final place value column.
180 in decimal, is B4 in hexadecimal.
Note that calculators are not allowed in your examination.
So, with this method, you'd need to perform the division manually.
Time to check your understanding.
Use the place value table, and conversion table to convert the decimal number 42 to hexadecimal.
Your answer options are A, 2A.
B, 2B.
Or C, 22.
Pause the video whilst you complete your calculations.
That's right, the correct answer is A, 2A.
So, the decimal number 42, is converted to the hexadecimal value 2A.
Okay, we're now moving on to the first task of today's lesson, and you've done a fantastic job so far.
So, well done.
Using the place value table, and the conversion table to help you, convert the following hexadecimal numbers to decimal, showing your working.
So, the first one has been done for you.
The hexadecimal value 2D, is the equivalent of the decimal value 45.
Pause the video, whilst you complete the activity.
How did you get on? Did you manage to do all your conversions? Great work.
So, here's the answers.
A1, is the equivalent of 161 in decimal.
FF, is 255.
29 in hexadecimal is the equivalent of 41 in decimal.
9F in hexadecimal, is the equivalent of 159 in decimal.
12 in hexadecimal is the equivalent of 18 in decimal.
And AA in hexadecimal is the equivalent of 170 in decimal.
If you haven't quite got those all correct, maybe go back, have another go and check your workings.
For part two, use the place value table and the conversion table to help you.
Convert the following decimal numbers to hexadecimal, showing your working.
So, this time we are converting decimal to hexadecimal.
Again, the first one's been done for you.
So the decimal value 16, is equivalent to the hexadecimal value 10.
Pause the video, whilst you complete the activity.
How did you get on? Did you manage to do all your conversions? Great work.
Let's have a look at the answers together.
So, the decimal 34 is equivalent to 22 hexadecimal.
67 is equivalent to 43 in hexadecimal.
143 is equivalent to 8F in hexadecimal.
172, is equivalent to the hexadecimal value AC.
201, is equivalent to the hexadecimal value C9, and 254, is equivalent to the hexadecimal value FE.
Again, if you need to make any corrections or go back, you can do that now.
We are now moving on to the second part of today's lesson and you've done a fantastic job so far.
So, well done.
We are now going to see how we can convert binary numbers to and from hexadecimal.
Four binary digits correspond to one hexadecimal digit.
To convert a binary number to hexadecimal number, it's useful to use this table.
The table is split into two, 4-bit binary numbers, which are called a nibble.
These are the steps to convert the binary number 10100111 to hexadecimal.
We start by placing the binary number in the table, working from the right, the least significant bit.
We then calculate the decimal value of each nibble using the appropriate place value for each bit.
So, in the right hand side nibble, we only use the place values where we have a one, and we add those up together.
So we've got, 4+2+1, which is equal to 7.
And then we do exactly the same on the left hand side.
So we have 8, we ignore the four because that's got a 0 not a 1, plus 2, which is equal to 10.
So, we then convert the decimal value to the corresponding hexadecimal digit.
So, we know that 10 in decimal, is equivalent to A in hexadecimal, and 7, is equal to 7 in hexadecimal.
So, the binary number 10100111, is equal to the equivalent hexadecimal value, A7.
Time to check your understanding.
Using the table provided, convert the binary number, 11100111 to hexadecimal.
Your answer options are A, EA, B, E7, or C, E5.
Pause the video whilst you do your calculation.
Did you get B, E7? Great work, well done.
To convert the hexadecimal number A7 into binary, follow these steps.
Take each hex digit separately, and find its equivalent decimal value.
So A, in hexadecimal is the equivalent of 10 in decimal, and 7 in hexadecimal, is 7 in decimal.
You then convert each decimal value to a 4-bit binary number using appropriate place values for each of the bits.
Each value has to be expressed using 4-bits, so always pack with leading zeroes if needed.
So, working from right to left, we need to make the value 7.
So, we are going to put a 1 in the 4 column, the 2 column, and the 1 column, 4+2+1 is 7.
In the left hand table we need to make 10.
So 8 plus 2 is 10, and we fill the rest with zeroes.
So, the hexadecimal value A7, is the equivalent of 10100111 in binary.
Time to check your understanding.
Using the table provided, convert the hexadecimal number B4 to binary.
Your answer options are A, 10110100 B, 11110100 or C, 10110011.
Pause the video, whilst you do your calculation.
That's right, the correct answer is A.
The hexadecimal value B4, is the equivalent, 10110100 in binary.
Okay, we are now moving on to our second set of tasks for today's lesson.
And you've done a fantastic job so far, working with a totally new number system.
So, well done.
Using the table to help you, convert the following binary numbers to hexadecimal showing your working.
So, the first one's been done for you.
So the binary number, 10110110 is hexadecimal value B6.
Pause the video, whilst you complete your calculations.
How did you get on? Let's go through the answers together.
So, first one was done for you.
The second one, binary 11001001, is hexadecimal C9.
10011011, is hexadecimal 9B.
11100110, is hexadecimal E6.
11010100, is hexadecimal D4.
10001000, is hexadecimal 88.
And then the last one, 10111111 is hexadecimal BF.
Remember, if you've made any mistakes, you can always pause the video here, and go back and have a look at your workings.
For part two, using the table to help you, convert the following hexadecimal numbers to binary, showing your working.
So again, the first one's been done for you, hexadecimal 20, is binary 00100000.
Pause the video, whilst you complete your calculations.
How did you get on? Great work.
Let's have a look at the answers together.
So, the first one was done for you.
The next hexadecimal value was 41, and that is the binary number 01000001.
5A, is 01011010.
7A, is 01111010.
7F, is 01111111.
And BB is, 10111011.
And then F3, is 11110011.
Remember again, if you need to go back and make any corrections, you can pause your video now.
Okay, 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 together.
Hexadecimal is a base-16 number system, that uses the digits 0 to 9 and the letters A, B, C, D, E, and F.
Because hexadecimal is a base-16 number system, you can work out the place value columns of a hexadecimal number, by multiplying by 16 as you move from right to left.
This is useful, when converting between hexadecimal and decimal numbers.
Because, four binary digits correspond to one hexadecimal digit, it's useful to split binary numbers down into nibbles before converting them to and from hexadecimal.
I hope you've enjoyed today's lesson and you've worked really hard.
So, well done.
See you again soon.
Bye!.