0xCONVERTER-HEX

Tutorial

How to Convert Hex to Decimal by Hand

The method, the shortcut, and enough practice to stop needing either.

Why practise by hand

The converters on this site will always be faster. The point of working through it manually is that afterwards you can read a hex value without a tool at all — which is what you need when you are looking at a stack trace or a datasheet rather than a browser tab.

The method

  1. Write the hex number out and number the positions from the right, starting at zero.
  2. Work out each position's place value: 160 is 1, 161 is 16, 162 is 256, 163 is 4096.
  3. Convert any letter digit to its number: A is 10 through to F is 15.
  4. Multiply each digit by its place value.
  5. Add the results.

You need these two tables

HexDecimalBinaryOctal
0000000
1100011
2200102
3300113
4401004
5501015
6601106
7701117
88100010
99100111
A10101012
B11101113
C12110014
D13110115
E14111016
F15111117
PowerHexDecimal
16011
1611016
162100256
16310004,096
1641000065,536
1651000001,048,576
166100000016,777,216
16710000000268,435,456
1681000000004,294,967,296

Worked example: 2F

  2F

  position 1: 2  × 16 = 32
  position 0: F  ×  1 = 15   (F is 15)
                      ----
                        47

Worked example: 1A2B

  1A2B

  position 3: 1 × 4096 = 4096
  position 2: A ×  256 = 2560   (A is 10)
  position 1: 2 ×   16 =   32
  position 0: B ×    1 =   11   (B is 11)
                      ------
                        6699

The two-digit shortcut

Any single byte — two hex digits — can be done in your head. Multiply the first digit by 16 and add the second. No table of powers needed.

C8  →  12 × 16 + 8  = 192 + 8  = 200
7F  →   7 × 16 + 15 = 112 + 15 = 127
A0  →  10 × 16 + 0  = 160 + 0  = 160
3C  →   3 × 16 + 12 =  48 + 12 =  60

With the sixteen digit values memorised, this becomes fast enough to do while reading a dump, which is where most of the value is.

An alternative: Horner's method

For longer numbers, this avoids large place values entirely. Start at the left, and for each new digit multiply your running total by 16 and add the digit.

1A2B, left to right

  start                    0
  digit 1:  0 × 16 +  1 =    1
  digit A:  1 × 16 + 10 =   26
  digit 2: 26 × 16 +  2 =  418
  digit B: 418 × 16 + 11 = 6699

Same answer, smaller numbers at each step, and no need to know which power of sixteen you are on. This is also how a computer does it.

Practice problems

Work these out before checking. The answers follow.

  1. 1F
  2. A0
  3. FF
  4. 100
  5. 2AB
  6. DEAD
1.  1F   →  1 × 16 + 15                              = 31
2.  A0   → 10 × 16 + 0                               = 160
3.  FF   → 15 × 16 + 15                              = 255
4.  100  →  1 × 256 + 0 + 0                          = 256
5.  2AB  →  2 × 256 + 10 × 16 + 11                  = 683
6.  DEAD → 13 × 4096 + 14 × 256 + 10 × 16 + 13   = 57005

Common mistakes

  • Counting positions from the left. Position zero is always the rightmost digit.
  • Forgetting a letter's value mid-calculation. Convert every letter to a number before you start multiplying.
  • Using 10 instead of 16 as the multiplier. Easy to slip into, and the answer will look almost right.
  • Dropping a zero digit. A 0 still occupies a position and still shifts everything to its left.

Check your work

The hex to decimal converter gives the answer instantly and shows the nibble breakdown. Use it to check, not to skip — the practice is the point.

Frequently asked questions

How do I convert hex to decimal manually?

Multiply each digit by 16 raised to its position number, counting from zero at the right, then add the products together.

What is the fastest way to convert a two-digit hex value?

Multiply the first digit by 16 and add the second. C8 is 12 times 16 plus 8, which is 200.

What is Horner's method?

Working left to right, multiplying the running total by 16 and adding each digit. It avoids large place values and is how computers do it.

Do I need to memorise the powers of 16?

Only the first four: 1, 16, 256 and 4096. Beyond that, Horner's method avoids them entirely.

What is DEAD in decimal?

57,005. It is a valid hex number that happens to spell a word, which is why it appears as a memory marker.

Where do people usually go wrong?

Counting positions from the left instead of the right, and multiplying by 10 out of habit instead of 16.