FREE TOOL · IGCSE AND A LEVEL

Binary, Denary and Hex Converter (with Working)

Convert between binary, denary and hexadecimal instantly, and see the full working for every conversion: the place value table, each subtraction, and how the nibbles turn into hex. Type a number below and the answer updates as you type.

Binary
Denary
Hexadecimal

Working (as the mark scheme wants it)

Unsigned whole numbers from 0 to 65 535 (16 bits). Tip: in the exam always show your working. Method marks are often available even if the final answer is wrong.

How to convert denary to binary

Write the place values 128, 64, 32, 16, 8, 4, 2, 1. Starting from the left, put a 1 under each place value that fits into what is left of your number, and subtract it. Put a 0 everywhere else. For example, 181 = 128 + 32 + 16 + 4 + 1, so 181 in binary is 1011 0101.

How to convert binary to hexadecimal

Split the binary number into groups of 4 bits (nibbles), starting from the right. Convert each nibble to a single hex digit: 0000 = 0 up to 1001 = 9, then 1010 = A, 1011 = B, 1100 = C, 1101 = D, 1110 = E and 1111 = F. So 1011 0101 = B5.

How to convert hexadecimal to denary

Multiply each hex digit by its place value (1, 16, 256 …) and add them up. For example, B5 = 11 × 16 + 5 × 1 = 181.

Worked exam-style example

Question: A temperature sensor stores the denary value 237 in one byte. (a) Convert 237 to 8-bit binary. (b) Convert your answer to hexadecimal. (c) Convert the hexadecimal value 3C to denary. [5 marks]

(a) Place values: 128, 64, 32, 16, 8, 4, 2, 1. 237 − 128 = 109, 109 − 64 = 45, 45 − 32 = 13, 13 − 8 = 5, 5 − 4 = 1, 1 − 1 = 0. That gives 1 under 128, 64, 32, 8, 4 and 1, so 237 = 1110 1101.

(b) Split into nibbles: 1110 = 14 = E and 1101 = 13 = D, so the answer is ED. Check: 14 × 16 + 13 = 237.

(c) 3 × 16 = 48 and C = 12, so 3C = 48 + 12 = 60 (0011 1100 in binary).

Type 237 and 3C into the converter above to check each step against the working it shows.

Exam tips

  • Always show your working: method marks are often available even if the final answer is wrong.
  • Check your answer by converting back the other way.
  • Hex is used because it is shorter and easier for humans to read than binary, and there are fewer errors when copying it.

Revise the full topic: IGCSE data representation · A Level information representation

Frequently asked questions

How do you convert binary to hexadecimal?

Split the binary number into groups of four bits from the right and convert each group to one hex digit, for example 1011 0110 = B6.

What is 11001000 in denary?

200, because 128 + 64 + 8 = 200. In 8-bit two’s complement it is −56.

What is FF in binary and denary?

FF is 11111111 in binary and 255 in denary, the largest value that fits in one byte.

More free tools: Truth table generator · SQL practice playground · All tools