Use readByte() instead of read() for processing bits