News for hackers. Stuff that matters.
Re:Testing for Divisibility by 19 by rjmunro on Monday November 23, 2020 @07:35AM (#25186081)
I may be misunderstanding - a bit mask only tells you if something is divisible by 16 or 256 (or any other power of 2)

I think he's saying in base 16 you can make a trick to check divisibility by e.g. 15 in the same way you can check divisibility by 9 in base 10.

So is 0xE1 (225) divisible by 0xF (15)?

0xE + 0x1 = 0xF, so yes.

Re:Testing for Divisibility by 19 by qayxc on Monday November 23, 2020 @06:57PM (#25193476)
> I think he's saying in base 16 you can make a trick to check divisibility by e.g. 15 in the same way you can check divisibility by 9 in base 10.

Yeah - I misunderstood there and thought they meant divisibility by 16 or 256 not in base 16 or 256. Should've had my morning coffee first :D