1 - Theory of Computer Science / Hexadecimal
|
|
Exam Questions - Hexadecimal
There are a few different types of Hexadecimal exam questions so we need to get comfortable answering all of them.
Example Question 1
Reveal Answers
8
(a) Question 8 a requires you to convert a binary number first into Denary and then into Hexadecimal.
The Denary conversion would be 1 + 2 + 4 + 16 + 32 = 55 (If you are unfamiliar with this - recheck the binary page)
The hexadecimal conversion would happen by splitting the binary into two nibbles and converting each nibble:
0011 - 0111
0011 = 3
0111 = 7
Hexadecimal answer = 37
(b) Question 8 b requires you to have an understanding of how ASCII works. It states that the binary from part (a) is the ASCII code for '7'. It then asks for the Denary, Binary and Hex for the ASCII number 9.
Well as we know from part a, Denary 55 is ACII 7. The ASCII number 9 would be 2 places higher.
Denary Answer = 57
Next you should convert 46 into binary to answer the binary part of the question:
Binary Answer = 00111001
Finally we can now convert this binary number into hex by splitting it into nibbles and converting each nibble:
0010 - 1110
0011 = 3
1001 = 9
Hexadecimal Answer = 39
(a) Question 8 a requires you to convert a binary number first into Denary and then into Hexadecimal.
The Denary conversion would be 1 + 2 + 4 + 16 + 32 = 55 (If you are unfamiliar with this - recheck the binary page)
The hexadecimal conversion would happen by splitting the binary into two nibbles and converting each nibble:
0011 - 0111
0011 = 3
0111 = 7
Hexadecimal answer = 37
(b) Question 8 b requires you to have an understanding of how ASCII works. It states that the binary from part (a) is the ASCII code for '7'. It then asks for the Denary, Binary and Hex for the ASCII number 9.
Well as we know from part a, Denary 55 is ACII 7. The ASCII number 9 would be 2 places higher.
Denary Answer = 57
Next you should convert 46 into binary to answer the binary part of the question:
Binary Answer = 00111001
Finally we can now convert this binary number into hex by splitting it into nibbles and converting each nibble:
0010 - 1110
0011 = 3
1001 = 9
Hexadecimal Answer = 39
Example Question 2
Reveal Answers
2
(a) Question 2 (a) requires you to demonstrate your ability to convert Hex to Binary and vice versa.
The first part asks you to convert B5 int Binary. This is done by converting each hex digit into a binary nibble:
B(11) = 1011
5 = 0101
B5 in Binary = 10110101
The second part of the question asks you to convert 11110110 into Hexadecimal. To do this you simply split the binary number into nibbles and convert each one into a Hex value:
1111 - 0110
1111 = 15(F)
0110 = 6
11110110 in Hexadecimal = F6
(b) Question 2 (b) is asking for 2 example uses of Hexadecimal in Computer science. It is important not to confuse example uses with WHY we use Hexadecimal. This question just wants you to name to things that Hexadecimal are used for. Any of the following uses would have gotten you a mark (Max 2 marks)
(c) Question 2 (c) requires you to explain two benefits of using Hexadecimal in computer science. Marks would have been awarded for the following points:
(a) Question 2 (a) requires you to demonstrate your ability to convert Hex to Binary and vice versa.
The first part asks you to convert B5 int Binary. This is done by converting each hex digit into a binary nibble:
B(11) = 1011
5 = 0101
B5 in Binary = 10110101
The second part of the question asks you to convert 11110110 into Hexadecimal. To do this you simply split the binary number into nibbles and convert each one into a Hex value:
1111 - 0110
1111 = 15(F)
0110 = 6
11110110 in Hexadecimal = F6
(b) Question 2 (b) is asking for 2 example uses of Hexadecimal in Computer science. It is important not to confuse example uses with WHY we use Hexadecimal. This question just wants you to name to things that Hexadecimal are used for. Any of the following uses would have gotten you a mark (Max 2 marks)
- MAC Addresses
- Colour Codes
- Memory Dumps
- Debugging Code
- Coding in assembly language or machine code
(c) Question 2 (c) requires you to explain two benefits of using Hexadecimal in computer science. Marks would have been awarded for the following points:
- They are easier to remember
- They make it easier to spot mistakes
- They are shorter / More can fit on the screen / 16 bits can be represented by 4 hex digits
- It is easy to convert between Hex and Binary.
Example Question 3
Reveal Answers
4
Question 4 is a Hexadecimal to Binary conversion question. You are required to convert the Hex number D03 into binary. 12 boxes have been provided for you to put your answer into.
To answer this question you simply need to convert each individual Hex number into a 4 bit nibble.:
D(13) = 8 + 4 + 1 = 1101
0 = 0000
3 = 2 + 1 = 0011
1 Mark is awarded for each correct nibble:
Question 4 is a Hexadecimal to Binary conversion question. You are required to convert the Hex number D03 into binary. 12 boxes have been provided for you to put your answer into.
To answer this question you simply need to convert each individual Hex number into a 4 bit nibble.:
D(13) = 8 + 4 + 1 = 1101
0 = 0000
3 = 2 + 1 = 0011
1 Mark is awarded for each correct nibble:
Example Question 4
Reveal Answers
2
Question 2 does not offer you any scenario to go with the question. The question is a very straight forward one that requires you to perform 3 Hexadecimal to Denary conversion. You can complete this question by following the /16 or Hex > Binary > Denary methods that are explained above.
Answers:
2A = 42
101 = 257
21E = 542
Question 2 does not offer you any scenario to go with the question. The question is a very straight forward one that requires you to perform 3 Hexadecimal to Denary conversion. You can complete this question by following the /16 or Hex > Binary > Denary methods that are explained above.
Answers:
2A = 42
101 = 257
21E = 542