When looking at the mod as binary value

42 Views Asked by At

Look at the next value:

$$617*947 = 584299$$

  • 617, 947 are prime values.

I want to see what are all the possible solutions for the next equation, for $k=4$:

$$(a\mod k)(b\mod k) = 584299\mod k$$

  • $a,b$ are positive integers
  • k = 4

There are only two options: $a\mod 4$ = 3 or 1, and if you look on the binary representation of those solutions it will be: $1$ or $11$

So I assumed that if I take a different values of $k$, all the possible solutions that I will get will have to end with $1$ or $11$ in their binary form.

But I was wrong. Take $k=53$ for example. And only look at $617 \mod 53$, it's one of the two options for $a$. The result is $617 \mod 53 = 34$, in binary it will be: $100010$ and it does not end with $1$ nor $11$.

Can you please explain why my assumption was wrong? And what can I change in order to be able to predict the binary extensions for different values of $k$, if it's even possible?