| want to reset all but bit 6? AND the byte with 0xBF That would only reset bit 6, wouldn't it? You'd have to AND with 0x40.