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.

Main content
Current time:0:00Total duration:3:43

Converting from decimal to hexadecimal representation

Video transcript

-[Voiceover]Let's now try to convert a number from the decimal system to the hexadecimal system. Let's say we want to convert the number 2,000. This is written in decimal form. Let's say we want to write it in hexadecimal form. Like always, I encourage you to pause this video and try to work through it on your own. The key here is to break this down into multiples of powers of 16. Let's just write down our powers of 16 here. 16 to the zero power is one. 16 to the first power is 16. 16 squared is 256. 16 to the third power is 4,096. We've gotten more than large enough. Let's start decomposing. What's the largest power of 16 that is less than or equal to 2,000? It's going to be 256. How many times does 256 go into 2,000? I'll get a calculator out for that. 2,000 divided by, I want to figure out how many times 256 goes into it, divided by 256. It goes seven times, plus a little bit. What's going to be left over? 2,000 minus seven times 256 is equal to, you're going to have 208 left over. Let me write that. It's going to be seven times 256. Seven, times 256, plus 208 left over. Now let's see if we can decompose 208 into powers of 16. What's the largest power of 16 that is less than or equal to this? Well it's just going to be 16. So how many 16s go into 208? 208, I'll just take that, divided by 16. 13, exactly 13. We lucked out. So this is exactly 13 times 16. Let's just write that. This right over here is exactly 13 times 16. Now, we have broken this down into powers of... We have broken this down into multiples of powers of 16. Now we're ready to write it in hexadecimal. We just have to remind ourselves about the place value. This right over here, this is going to be the ones place. Then we're going to have the 16s place. Then we're going to have the 256s place. We know how many 256s we have. We have seven 256s. We have zero ones. And how many 16s do we have? Well we have 13 16s. Well what's the digit for 13? We can just remind ourselves that we obviously have zero through nine and then we have A is equal to 10, B is equal to 11, C is equal to 12, D is equal to 13 and of course E is equal to 14 and F is equal to 15. But we care about 13. We have 13 16s. So we put a D right over here. So the number "7D0" in hexadecimals... Let me write this down, this is interesting. 2,000 in decimal form is equal to "7D0" when it is written in hexadecimal form. Hope you found that interesting.