C Programming - Power of Two Minus One

To test if an unsigned integer is of the form 2n - 1

x&(x+1)

Labels:


About this entry