On Wed, Mar 11, 2015 at 11:52 PM, Brent Brown wr= ote: > Yes, you are almost perfectly on "target" (excuse the pun) and this is in= deed the > way it's done in C. Small thing though, you say you would do the AND'ing = first and > then OR it, which is correct, but your example shows doing it in the oppo= site order. > Likely what you meant was: > > target &=3D 0b00001100; > target |=3D 0b11110011; > > And yes you could do: > > target =3D (target & 0b11110011) | 0b00001100; Whoops, good catch. Thank you for that, and for the knowledge that I'm not totally out to lunch! > Which I think could also be written: > > (target & 0b11110011) |=3D 0b00001100; Also good to know I should avoid this syntax. Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .