Reverse bits of an integer (Method 2)