Divisibility rules/Rule for 2 and powers of 2 proof

Revision as of 22:01, 15 August 2006 by Joml88 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A number $N$ is divisible by $2^n$ if the last ${n}$ digits of the number are divisible by $2^n$.

Proof

An understanding of basic modular arithmetic is necessary for this proof.

Let $N = a_ka_{k-1}\cdots a_1a_0$ where the $a_i$ are base-ten numbers.

Thus

$N = 10^k a_k + 10^{k-1} a_{k-1} + \cdots + 10 a_1 + a_0.$

Taking $N$ mod $2^n$ gives

$N$ $= 10^k a_k + 10^{k-1} a_{k-1} + \cdots + 10 a_1 + a_0$
$\displaystyle \equiv 10^{n-1} a_{n-1} + 10^{n-2} a_{n-2} + \cdots + a_1 + a_0 \mod 2^n$
$= a_{n-1}a_{n-2}\cdots a_1a_0$

See also