Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Course:
Topics:
OCR GCSE Computer Science (Paper 1) Smart practice A mixed round aimed at your weak spots
Unit 1
Systems architecture
Unit 2
Memory and storage
Unit 3
Computer networks, connections and protocols
Unit 4
Network security
Unit 5
Systems software
Unit 6
Ethical, legal, cultural and environmental impacts of digital technology
Avg
score:
–
Topics
done:
0/34

Converting to and from hexadecimal

Practise 28 exam-style questions on Converting to and from hexadecimal for OCR GCSE Computer Science (Paper 1). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.

  • 28 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

Which hexadecimal number is equal to the denary number 100?

Choose your answer.

  • 46
  • 64
  • A0
  • 100

Model answer

64

Explanation

Divide by 16: 100 ÷ 16 = 6 remainder 4, so the first digit is 6 and the second digit is 4, giving 64. Check: 6 × 16 + 4 = 96 + 4 = 100. A common mistake is to assume the number looks the same in both bases, or to put the remainder first.

Mark scheme
  1. 1 mark

    64

    Only one answer may be given: two or more answers score 0. 46 has the digits the wrong way round (hexadecimal 46 is denary 70); hexadecimal A0 is denary 160; hexadecimal 100 is denary 256.

Question 2

2 marks

Convert the 5-bit binary number 11010 into hexadecimal.

Model answer

11010 has 5 bits, so add leading zeros to make 8 bits: 00011010
Split into nibbles: 0001 1010
0001 = 1
1010 = 8 + 2 = 10 = A

Answer: 1A

Explanation

Always group binary into nibbles starting from the right (the least significant bit), adding 0s on the left to fill the last group. Leading zeros do not change the value: 11010 is the same number as 00011010 (denary 26). Grouping from the left (1101 and 0) is a common mistake and gives the wrong answer.

Mark scheme
  1. 1 mark

    Working: groups the bits into nibbles from the right / adds leading zeros, e.g. 0001 1010 // 00011010

    Correct answer with no working scores full marks. Also accept working via denary: 11010 = 26 = 1 × 16 + 10.

  2. 1 mark

    1A

    Accept lower case (1a). D0, D1 or D (from grouping 1101 from the left) score 0. 26 (the denary value) scores 0 for the answer. A1 scores 0.

Question 3

3 marks

Zara is showing her younger brother how to change a 2-digit hexadecimal number straight into 8-bit binary, without working out its denary value first.

Describe the method Zara should show him. Use an example of your own to show each step.

Model answer

Take each hexadecimal digit on its own and change it into a 4-bit binary number (a nibble), using the place values 8, 4, 2 and 1. Then write the two nibbles next to each other, in the same order, to make the 8-bit binary number.

Example: 5B
5 = 4 + 1 = 0101
B = 11 = 8 + 2 + 1 = 1011
So 5B = 01011011

Explanation

Because 16 = 2⁴, every hexadecimal digit matches exactly one 4-bit nibble, so the conversion can be done one digit at a time. The left digit gives the left nibble and every nibble must have 4 bits (5 is 0101, not 101). Going through denary also gives the right answer, but it is slower and is not the method asked for here.

Mark scheme
  1. 1 mark

    an example 2-digit hexadecimal number correctly converted into 8-bit binary, e.g. 5B = 01011011

    The example mark can be awarded on its own. The method marks can still be awarded if the example has an error (e.g. B taken as 12).

  2. 1 mark

    convert each hexadecimal digit separately into a 4-bit binary number / nibble (using the place values 8, 4, 2, 1)

    Max 2 for describing the method, from these three points. A method that goes through denary (left digit × 16 + right digit, then denary to binary) does not answer the question: it can score the example mark only.

  3. 1 mark

    every nibble must have 4 bits // add leading zeros to a digit's binary, e.g. 5 = 0101 not 101

  4. 1 mark

    join / write the two nibbles next to each other, in the same order (left digit gives the left nibble), to make 8 bits

    Max 3 overall.

Question 4

4 marks

Describe how to convert the denary number 157 into a 2-digit hexadecimal number.

Show each step of your method and give the final answer.

Model answer

Divide 157 by 16: 16 × 9 = 144, so 157 ÷ 16 = 9 remainder 13 (157 - 144 = 13).
The number of 16s, 9, is the first hexadecimal digit.
The remainder, 13, is the second digit, and 13 is written as D in hexadecimal.

Answer: 9D (check: 9 × 16 + 13 = 157)

Explanation

The left digit of a 2-digit hexadecimal number counts 16s and the right digit counts 1s, so dividing by 16 gives both digits: the whole-number result and the remainder. Any value from 10 to 15 must be written as a letter (13 = D). Converting to binary first (1001 1101) and changing each nibble to a digit gives the same answer.

Mark scheme
  1. 1 mark

    divide 157 by 16 (= 9 remainder 13) // convert 157 into 8-bit binary: 10011101

    Mark either method. The question asks for the steps, so the answer 9D on its own scores 1 mark (the last point).

  2. 1 mark

    the number of 16s / whole-number result (9) is the first hexadecimal digit // split the binary into two nibbles: 1001 and 1101

  3. 1 mark

    the remainder (13) is the second digit, written as D // convert each nibble into one hexadecimal digit: 1001 = 9, 1101 = 13 = D

  4. 1 mark

    9D

    Accept lower case (9d). '913' scores 0 for this point (13 must be written as D).

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

Study Helper Hints first, answers after you try

Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.