Bit Manipulation Solutions