原帖由 epegasus 于 2007-4-5 16:00 发表 这贴怎么没人回呢?看在我也碰过redboot的份上我就胡说两句 n &= ~(n-1UL);结果等价于n&=(~n)+1;这个自己可以证明,这样就很容易明白结果是得到"最右边的1" 至于这3行:n = (n<<16)-n; ...