Professional Documents
Culture Documents
2
Convert numbers into hexadecimal form
logarithm, can change base:
logmx=ln(x)/ln(m). ln is the natural logarithm. The
natural logarithm of a number is its logarithm to the
base of the mathematical constant e, which is an
irrational and transcendental number approximately
equal to 2.718281828459.
3
Convert numbers into hexadecimal form
Go back to our example,
Step1: find the largest position of 11522449 (dec) in the
hexadecimal form.
n-1=log16 11522449=ln(11522449)/ln(16)=5.8644
n=6.8644 = 6, means the largest position is 6.
Step 2: find the number on this position, by
11522449/16**(6-1)=10.988, just take the integer number, 10 (A)
So we get the first position and the number: A _ _ _ _ _
4
Convert numbers into hexadecimal form
Step 3: In order to find the next position and the number
related on it, we need to minus the original number by
the known A(6) number:
The A(6) relates to the number 10*16**5=10485760.
So 11522449- 10485760=1036689.
Take this number to Step 1. we can find out the largest position
and related number to it. By repeating step 1-3, we can find all the
numbers in the hexadecimal form.
Such method can apply for all bases ( 2, 4, 16,.…)