bit manipulation q01 and q02