What is the exact procedure to represent any positive integer '$n$' in the $m-adic$ form? I've just started graduate number theory.This seems to be an elementary question,but i'm not getting exact procedure to represent any positive integer '$n$' in the $m-adic$ form.
In particular,what is the $2-adic$ representation of $100$?

REFERENCE-Methods in Number Theory by Melvyn B.Nathanson

I'll be grateful for any help.
Thank you!
 A: The p-adic absolute value is the inverse of $m$ to the power the number of powers of $m$ in n, so the 2-adic absolute value of $100$ is:
$\frac{1}{4}$
Because
$100 = 2^2\times5^2$
$\implies \lvert100\rvert_2= \frac{1}{4}$
However it is confusing because there is also a full p-adic representation, which is the number written in base $m$.  However... where we usually allow decimals to repeat to the right, in the p-adics we allow these numbers to repeat to the left. So in base 10 we can write minus 1 as:
$\bar9999_{10} = \bar9_{10}$
Because if we add 1 to that, using normal hindu-arabic arithmetic the ones carry to infinity giving us infinite zeroes, which is simply zero. This simple fact reveals the way in which p-adics discard to some degree the "magnitude" of a divergent series, but retain the congruence information.
The same goes in any base $m$, that if we write a recurring number:
$\overline{m-1}_m$, it is equal to minus 1.
So in the 2-adics: $\bar11111=-1$
This creates an issue for any compound $m$, that for any given number we can always find a 2nd representation of the same number; a problem which does not occur for prime-adics, hence $p-adics$ because this is why we always use a prime $p$.
Which leads us on to the 2-adic representation of 100 which is simply $1100100_2$
What's the point? You may ask.  That's just 100 in base 2.  Well it gets more interesting when you start using negative numbers and fractions because then the p-adics start to encode congruence information in a way that's really helpful in number theory.
To construct a negative whole number, continue to subtract from $-1$, so $\overline{1}0_2$ is minus $2$, and $\overline{1}00_2$ is minus $4$.
To construct a fraction, the negative of a proper fraction is the same number recurring to the left of the decimal point.  So if in normal base 10 $$\frac{6}{7}=0.\overline{857142}$$ then the 10-adic version of $-\frac{6}{7}$ is: $$\overline{857142}_{10}$$
You can add $1$ as normal to yield $\frac{1}{7}$ in p-adic form as $$\overline{285714}3_{10}$$ (note the 3 isn't under the line as it doesn't repeat).
You already have $\overline{999999}=-1$
And if you add either of those forms to $\frac{1}{7}$ you will find you are back at $-\frac{6}{7}$.
