As you probally know you can easily check if a base 10 number is divisible by 9 by adding the digits and determining if the result is divisible by 9 (possibly recursively.) This is true because 9+1 = 10. The same relationship exists in other bases. Of use to us is base 4. 3+1 = 4, so all we have to do is look at the number in base 4 (easy enough) and add up the digits. If the result is a multiple of 3, the original number is divisible by 3.
This might be slower than modulating, but it uses only bit operations and addition.
Checking for divisible by 2 is much easier. It is just a bitwise and operation.