I have 2 numbers with same base(not necessary 10).
I want to calculate the mode(Remainder of the division) of this 2 numbers without changing the base of them.The base of this 2 number can be between 2 to 10.For base 10 the answer is easy but what about the other bases
Is there any way that I calculate the mode of this 2 numbers
For example:
number 1: 1100
number 2: 101
both in base 2
The answer is :10 in base 2
You can perform the division algorithm in any base. But you can just convert to any known basis and convert back the remainder: $$ 1100_2=12,\quad 101_2=5,\quad 12\bmod 5=2=10_2 $$
Actually, division in base $2$ is really easy, because it doesn't involve guessing: at each step the quotient is either $0$ or $1$. $$ \begin{array}{cccc|ccc} 1&1&0&0 & 1&0&1 \\ \\ 1&0&1& & 1&0\\ & &1&0 \end{array} $$ (unfortunately MathJax doesn't seem to support
\cline). In the first step we consider three digits, the quotient is $1$; the subtraction gives $1$ and we consider the next digit. The number $10_2$ is less than $101_2$, so the quotient is $0$ and we're done.