Optimized read and write a bit.