# Divisibility of big numbers

Suppose we have a number $N$ with $x$ digits and we want to determine whether $N$ is divisible by a number $M$ with $y$ digits such that $x > y$.

How do I go about this? I tried to use the first $y$ digits of $N$ and divide them by $M$ but I'm not sure this is true for all $N$ and $M$. Is there a general rule of thumb for problems like this?

• You may be interested by divisibility rules. – EditPiAf Oct 3 '17 at 7:51
• The general rule is to test whether or not the value of $N/M$ is integer. – goodvibration Oct 3 '17 at 7:56