[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dr. Dobbs Dev. Update 1/5 July 94 & Schneier



> >In C, {int j... if(j & (j-1)) not_exactly_one_bit; ...}

C code that does bit twiddling should almost always use unsigned
rather than signed integers, or you may get some nasty surprises on C
implementations that do not use two's complement representation for
signed integers.

--apb (Alan Barrett)