Skip to main content
EnglandComputer ScienceSyllabus dot point

How do you convert a number between binary, denary and hexadecimal?

Number systems: binary, denary and hexadecimal, and how to convert between all three, including why hexadecimal is used as a shorthand for binary.

An Eduqas GCSE Computer Science answer on the binary, denary and hexadecimal number systems and how to convert between all three, with worked place-value methods and the reason hexadecimal is a useful shorthand for binary.

Generated by Claude Opus 4.812 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The three number systems
  3. Converting denary to binary
  4. Converting binary to denary
  5. Converting with hexadecimal
  6. Why hexadecimal is used
  7. Try this

What this dot point is asking

Eduqas wants you to convert numbers between the three number systems used in computing: binary (base 2), denary (base 10, our everyday numbers) and hexadecimal (base 16). You must be able to go in every direction, show clear working, and explain why hexadecimal is used as a shorthand for binary. These conversions appear on almost every Component 1 paper.

The three number systems

In an 8-bit binary number the place values are powers of two: 128,64,32,16,8,4,2,1128, 64, 32, 16, 8, 4, 2, 1. In hexadecimal the place values are powers of sixteen: ,256,16,1\ldots, 256, 16, 1. In denary they are powers of ten: ,100,10,1\ldots, 100, 10, 1.

Converting denary to binary

Converting binary to denary

To convert binary to denary, add up the place values wherever there is a 11. For example, 1011001010110010 has 11s in the 128,32,16128, 32, 16 and 22 columns, so it equals 128+32+16+2=178128 + 32 + 16 + 2 = 178.

Converting with hexadecimal

Why hexadecimal is used

Hexadecimal is a shorthand for binary. A single byte takes eight binary digits but only two hex digits, so hex is far shorter to write, read and copy, and people make fewer mistakes with it. Because each hex digit maps cleanly to four bits, converting between hex and binary is quick. This is why memory addresses, colour codes (such as #FF0000 for red) and error codes are usually written in hexadecimal.

Try this

Q1. Convert the denary number 4545 to 8-bit binary. [2 marks]

  • Cue. 0010110100101101 (that is 32+8+4+132 + 8 + 4 + 1).

Q2. Convert the binary number 1010011010100110 to denary. [2 marks]

  • Cue. 128+32+4+2=166128 + 32 + 4 + 2 = 166.

Q3. State why hexadecimal is used instead of long binary numbers. [1 mark]

  • Cue. It is much shorter and easier for people to read and copy, and each hex digit maps to exactly four bits.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas Component 1, 20223 marksConvert the denary number 214 into an 8-bit binary number. Show your working.
Show worked answer →

Write the place values for 8 bits: 128, 64, 32, 16, 8, 4, 2, 1.

Work left to right, subtracting each place value that fits: 214 minus 128 leaves 86 (so 128 is a 1); 86 minus 64 leaves 22 (64 is a 1); 32 does not fit (0); 22 minus 16 leaves 6 (16 is a 1); 8 does not fit (0); 6 minus 4 leaves 2 (4 is a 1); 2 minus 2 leaves 0 (2 is a 1); 1 does not fit (0).

Answer: 11010110. Markers award method marks for the place values and the subtraction even if a single bit is wrong, so always show the working.

Eduqas Component 1, 20232 marksConvert the hexadecimal number 2F into denary. Show your working.
Show worked answer →

Hexadecimal has two place values for two digits: 16 and 1. The digit 2 is in the 16s column and F is 15 in the 1s column.

So the value is (2 times 16) plus (15 times 1) = 32 + 15 = 47.

Answer: 47. One mark for the correct method (2 times 16 plus 15), one for the answer. A common error is treating F as 16 rather than 15.

Related dot points

Sources & how we know this