Hi all.
In this article (link : http://www.geeksforgeeks.org/divisibility-9-using-bitwise-operators/ ) it is written that (n%8) is equal to (int)(n&7) ( in the function bool isDivBy9(int n) ).
Can someone explain how this is correct?
Hi all.
In this article (link : http://www.geeksforgeeks.org/divisibility-9-using-bitwise-operators/ ) it is written that (n%8) is equal to (int)(n&7) ( in the function bool isDivBy9(int n) ).
Can someone explain how this is correct?