I will help you by showing you how to do it, and than you can do your exam problem. Remember that when talking about place values, the powers of the numbers are very important. For example, 432 in decimal is actually equal to
4 x 10^2 + 3 * 10^1 + 2 * 10^0. See how the exponents go down? The trick than is to find the biggest power of 16 that is smaller than the number you want to convert.
Â
IMPORTant Note: Also, the other number have to be ess then 10 (0-9) in decimal. In hex you can use 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f where a=10, b=11...
First, let's calculate the powers of 16.
16^0=1
16^1=16
16^2=256
16^3=4096 ...and so on.
Now that we know those powers, we can convert quickly and easily. Here is an example:
I will convert 258 to hex and than you can do your own problem.
since 4096 is to big I will start with 16^2 power (256, the biggest power smaller than my number).
256 goes into 258 ONCE with a remainder of 2.
12 is NOT divisible by 16, so a ZERO there.
2 is divisible by 1, and we get a (surprise) 2 there.
so 258 in decimal equals 102 hexidecimal (or 1 * 16^2 + 0*16^1+2*16^0 whcih equals 258)
Please let me know if you need another example.
grandadmiralpug
I had to write Hex programs for my computer class a while back and this is how you do it. I don't know what the other people are saying but the above method is right.
Log in to comment