If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra (all content)

### Course: Algebra (all content)>Unit 1

Lesson 14: Binary and hexadecimal number systems

# Converting from decimal to hexadecimal representation

## Want to join the conversation?

• I understand the advantages of the hexadecimal system versus the decimal system, but why are some people so fond of the duodecimal system? What would be the (added) advantage of base-12 if we have a popular base-10 and base-16 system? •   The advantage of base 12 is that 12 has a lot of factors: it is divisible by 2, 3, 4 and 6 (and 1 and 12, but they are less interesting).

Base 10 only has two non-trivial factors: 2 and 5. This means in base 10, the two and five times tables are easy and fraction the 1/2 and 1/5 have nice decimals. It's also easy to tell if a number is divisible by 2 or 5 - you just need to check that the last digit is divisible by 2 or 5 respectively.

If we used base 12, the 2, 3, 4 and 6 times tables would be easy and we would have nice decimals for 1/2, 1/3, 1/4 and 1/6. You could tell if a number were divisible by 2, 3, 4 or 6 by just looking at the final digit.
• Why does the term "hexadecimal" implies bases of 16 but not bases of 6? • Just for clarity, the answer is 7D0 (zero) right? Not the letter "o"? • At , why is the final solution 7D0 instead of just 7D? Does it make any difference if you write it one way or another? • I had the same confusion.But notice what happens when you write 7D instead of 7D0:
7D = 7 X 16^1 + 13 X 16^0 = 112 + 13 = 125 in decimal
7D0=7 X 16^2 + 13 X 16^1 + 0 X 16^0=1792 + 208 + 0=2000 in decimal.
This shows that the 0 makes difference.You must be careful.
The key thing to realize here is that the last symbol always corresponds to the number of ones(i.e. the base 16 raised to zero).
You go left, starting from 0 as the power of base and then increment the power by one as you go left.
Hope that helped.
• Do decimals work for bases? • You mean numbers like 18.25, right? You can represent them in other number systems by using the same principle we use with the "decimal" decimal numbers:
Z_10 = . . . + (10^3×??) + (10^2×??) + (10^1×??) + (10^0×??) + (10^-1×??) + (10^-2×??) + (10^-3×??) + . . .
For example, in the decimal system: 18.25 = (10^1×1) + (10^0×8) + (10^-1×2) + (10^-2×5) = 10+8+0.2+0.05

Imagine we're trying to represent this number in base-12; we would use the following pattern instead:
Z_12 = . . . + (12^3×??) + (12^2×??) + (12^1×??) + (12^0×??) + (12^-1×??) + (12^-2×??) + (12^-3×??) + . . .
As you can see, it also contains the negative powers (of 12 in this case), that are responsible for what goes on to the right of the "duo-decimal point" in the number:
Z_12 = (12^1×1) + (12^0×6) + (12^-1×3) = 12+6+3/12= 18.25

18.25 (decimal) = 16.3 (duodecimal)

Basically, you convert the number before the decimal point into another system and then you separately convert the number after the decimal point. In this case the number after the decimal point is 25/100 = 2/10 + 5/100 (decimal) = X/12 + Y/144 (duodecimal) = 3/12 + 0/144 = 0.3 (duodecimal)
• Isn't A supposed to be 11 not 10 because of the 10 numbers? • How would I go from hex to dec? • Will any practice exercises be added for this section?
(1 vote) • how to convert binary to hexadecimal?
(1 vote) • when I tried to do the same for 1000(decimal) into hexadecimal but I am getting it wrong can you tell me where I am going wrong?
First I divided 1000/256 and got 3.9
then I did 1000-3(256) and got 232.
So it would end up to 3x235+232
232 is 14.5(16)
so there are 3 256 e 16 and this is where I messed up 