Bit manipulation problem is solved.