Converting to Base 16; Place Value ChartDate: 03/22/98 at 16:13:09 From: Terri Subject: Base 16 numbers How do you convert numbers to base 16 numbers? Please use the following numbers in an example: 411213 and 38015. Thank you. Date: 03/22/98 at 20:01:39 From: Doctor Sam Subject: Re: Base 16 numbers Hi Terri, Here's one way to think about other bases. If you were given 3 hundred dollar bills and 4 ten dollar bills and 2 one dollar bills you would have 342 dollars. We can just "glue" the 3 and the 4 and the 2 together because our decimal number system is based on tens. Now if I gave you 3 quarters and 4 nickels and 2 pennies you wouldn't have 342 cents because nickels are only worth five pennies and quarters are only worth five nickels. But in base 5 notation that is just what you would write down. In base 5 notation every place value is five times as large as the one before it. So 3 quarters, 4 nickels, 2 pennies would be written as 342 base 5. The key idea is that our system of writing numbers uses the idea of place value: that digits written in different places mean different amounts. Here is a chart of some place values in different bases: base 10: ... 10*10*10 10*10 10 1 base 5: ... 5 * 5 * 5 5 * 5 5 1 base 2: ... 2 * 2 * 2 2 * 2 2 1 base 16: ... 16*16*16 16*16 16 1 Now to your questions. To change 411,213 begin by writing down the place values in base 16. The first few are: 16^5 16^4 16^3 16^2 16^1 16^0 1048576 65536 4096 256 16 1 411,213 < 1048576 so we will not use that place. But 411213 > 65536 so divide 65536 into 411213. The quotient is 6 and the remainder is 17997 so there will be a 6 in the 16^4 place. Now work with 17997. 17997 divided by 4096 has quotient 4 and remainder 1613 so there will be a 4 in the 16^3 place. Now work with 1613. 1613 divided by 256 has quotient 6 and remainder 77 so there will be a 6 in the 16^2 place. Now work with 77. 77 divided by 16 has quotient 4 and remainder 13 so there is a 4 in the 16^1 place. Finally, there is 13 remainder. This is represented by a D in the ones place. Here's how to organize the work. 411213 = 6(17997) + 17997 17997 = 4(4096) + 1613 1613 = 6(256) + 77 77 = 4(16) + 13 13 = D Read down the quotients column to get the hex number 6464D. To write this 38015 in hexadecimal do the same thing. Here's the work: 38015 = 9(4096) + 1151 1151 = 4(256) + 127 127 = 7(16) + 15 15 = F(1) So 38015 = 947F. Your examples don't illustrate the following possibility, which may seem confusing. To change 57536 to hex start again in the 4096 place (since 65536 is too large). 57536 = 14(4096) + 192 Now 192 is smaller than the next hexadecimal place 256, but don't ignore that place. It will get a zero. To finish the problem: 57536 = 14(4096) + 192 192 = 0(256) + 192 192 = 12(16) + 0 0 = 0 (1) Now 14 = E and 12 = C so 57536 = E0C0. I hope that helps. Doctor Sam, The Math Forum Check out our web site! http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/