Most efficient mental way to convert Decimal to Hexadecimal

3.9k Views Asked by At

My question is as follows: What is the most efficient mental way to convert Decimal to Hexadecimal?

I've heard of many methods. Some people divide the decimal by 16 and find the remainder. Others convert the decimal into binary and then convert that binary into hexadecimal. One I am quite curious of is a method where the decimal is converted into octal, and the octal to binary, and the binary to hexadecimal. Is this an efficient method at all? I didn't really think converting decimal to octal was a very simple matter, but it could be a perfectly viable mental method.

The octal conversion works sort of like this:

123
 2 +
----
14
  28 +
----
173

To me this method seems confusing and prone to errors though.

1

There are 1 best solutions below

4
On

I'd say the most efficient mental way to go from decimal to hexadecimal is the division by 16 approach you mention.

123 in hexadecimal? That's 7 remainder 11. Write down the remainder (11), but in hexadecimal, which is B. Since the remaining number is less than 16, you can write that down to the left of the previous number, as well: 7b16!

It's a little longer with numbers of 256 (162), of course, but the process remains the same. Let's try 657:

657 ÷ 16 = 41, renainder 1. Write the remainder: 1

41 &divide 16 = 2 remainder 9. Write the remainder to the left of the previous number: 91

Since 2 is smaller than 16, we can just write it down to the left of the previous numbers: 291

There you have it - conversion to hex in just 3 steps! Writing the numbers down as you go helps ease the mental strain, and since you have to write the answer down at some point, you might as well do it WHILE you're going through the process.