数学技巧(位运算)

1、n mod 2^k = n&((1<<k)-1)
2、判断n是否为2的正整数幂n>1 && !(n&(n-1))

原文地址:https://www.cnblogs.com/sz-wcc/p/11298240.html