On Mar 12, 2007, at 1:15 PM, David VanHorn wrote: >>> i &= 0b11011111; >> >> That'd be OK if you wanted to clear bit 5 :) >> Yes. What you'd really use is a macro. Maybe something like: #define bcf(var, bit) var &= ~(1<<(bit)) And then in your C program you can say obvious stuff like: bcf(var, 5); Then you'd sit there and hope that the compiler writers included some special case optimization to reduce that back to the single instruction it should be, since that's probably NOT a case that generic C optimizers would catch. :-; BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist