In article <7825 at boring.cwi.nl> aeb at cwi.nl (Andries Brouwer) writes: > a &= (a-1); Such algorithms should use unsigned integers, to avoid possible overflow problems on certain bit patterns.