How do you convert a number from denary to hexadecimal?

The simplest route to take when converting any number from denary to another number system is to first convert it to binary. The method for binary conversion is to divide the number in question by 2 repeatedly, recording the remainder you get each time. Once you have a string of 1s and 0s, just reverse this and that's the number in binary!

For example, if you wanted to convert 57 (denary) to binary, these are the calculations you would take:

57/2 = 28 r 1

28/2 = 14 r 0

14/2 = 7 r 0

7/2 = 3 r 1

3/2 = 1 r 1

1/2 = 0 r 1

The string of 1s and 0s reads as 100111 from top to bottom, which reversed is 111001 - this is 57 in binary!

The final step of going from binary to hexadecimal is very straight forward. From right to left, separate your binary figure into blocks of four digits, adding 0s to the left-hand side if there is not a complete block. Next just treat these blocks as individual values and cross-reference those with the hexadecimal characters. This will give you the hexadecimal value!

Returning to our example, this is what we would do:

111001 would become 00111001 (so the amount of digits is a multiple of four).

This would then be separated to 0011 1001 (two blocks of four digits).

0011 equates to 3 (the 3rd character in the hex number system) and 1001 equates to 9 (the 9th character in the number system).

57 in hexadecimal is therefore 39!

Remember that the characters in hexadecimal are 0123456789ABCDEF, so there is a possibility there are letters in your answer!

Josh C. Mentoring -Personal Statements- tutor, GCSE Design & Technolo...

1 year ago

Answered by Josh, a GCSE Computing tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


Elizabeth  R. A Level German tutor, A Level Physics tutor, A Level Ma...
View profile
£18 /hr

Elizabeth R.

Degree: Computer science and Physics (Bachelors) - Durham University

Subjects offered: Computing, Physics+ 2 more


“About me Hello! I am Lizzy and I am a student currently reading Maths, Physics and Computer Science at St Mary's College, Durham University. You may notice that I am studying quite a broad degree at the moment and this enables me to t...”

Cesar Manuel F. 13 plus  Maths tutor, GCSE Physics tutor, GCSE Comput...
View profile
£20 /hr

Cesar Manuel F.

Degree: BSc Computer Science (Bachelors) - University College London University

Subjects offered: Computing, Physics+ 2 more


“Hello! My name is Cesar, I am originally from Perú but I currently study BSc Computer Science at University College London. I graduated Markham College with Distinction after completing my International Baccalaureate (IB) course, in w...”

Michael T. A Level Maths tutor, GCSE Maths tutor, A Level Computing t...
View profile
£18 /hr

Michael T.

Degree: MMath (Masters) - Durham University

Subjects offered: Computing, Physics+ 1 more


“About Me: I am currently studying Mathematics at Durham University. Maths can sometimes be intimidating, but it's that which makes it so rewarding when it all starts to make sense. I have been teaching in one form or another since 13...”

About the author

Josh C. Mentoring -Personal Statements- tutor, GCSE Design & Technolo...
View profile
£18 /hr

Josh C.

Degree: Computer Science (Masters) - Warwick University

Subjects offered: Computing, Physics+ 4 more

Design & Technology
-Personal Statements-

“Top tutor from the renowned Russell university group, ready to help you improve your grades.”

MyTutor guarantee

You may also like...

Posts by Josh

How do you convert a number from denary to hexadecimal?

How does conduction work in metals?

Other GCSE Computing questions

What is the difference between a data structure and a data type?

What is the difference between data verification and data validation?

How to convert any binary number to decimal?

What is the denary representation of the binary number 10110110?

View GCSE Computing tutors


We use cookies to improve our service. By continuing to use this website, we'll assume that you're OK with this. Dismiss