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

let's now try to convert a number from the decimal system to the hexadecimal system so let's say we want to convert the number 2000 in or this is it written in decimal form let's say we want to write it in hexadecimal form and like always I encourage you to pause this video and try to work through it on your own so the key here is to break this down into powers of multiples of powers of 16 so let's just write down our powers of 16 here so 16 to the 0 power is 1 16 to the first power is 16 16 squared is 256 16 to the third power is 4096 so that's already we've gotten more than large enough and let's start decomposing so what's the largest power of 16 that goes into that that is less than or equal to 2,000 it's going to be 256 and how many times does 256 go into 2,000 well I'll get a calculator out for that so 2,000 - I'm sorry is the / I should say I want to figure out how many times 256 goes into it divided by 256 so it goes seven times plus a little bit so it's going to be leftover so 2,000 minus seven times 256 is equal to you're gonna have 208 left over so let me write that it's going to be seven times 256 7 times 256 plus plus 208 left over 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 in to 208 so 208 I'll just take that divided by 16 13 exactly 13 we lucked out so this is exactly 13 times 16 so let's just write that this right over here is exactly 13 times 16 and so now we have broken this down into power of we have broken this down into multiples of powers of 16 now we're ready to write it in hexadecimal and we just have to remind ourselves about the place value so this right over here this is going to be the ones place and then we're going to have the 16s place and then we're going to have the 256 is place 256 is place and we know how many 256 is we have we have seven 256 s we have zero ones we have zero ones and how many 16s do we have well we have 13 16s well what's the digit for 13 and we can just remind ourselves that we could just remind ourselves that we have obviously 0 through 9 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 we have 13 16 so we put a D right over here so the number 7 do and hexadecimals let me write this down this is interesting so 2,000 in decimal form that's when it's in decimal form is equal to 7 d o when it is written in hexadecimal form hope you found that interesting