A 32-bit hardware register holds the unsigned value x. A wiring fault reverses the order of its bits: bit 0 becomes bit 31, bit 1 becomes bit 30, and so on. Return the new unsigned value.
Examples
Input: x = 1
Output: 2147483648
Explanation: 000...0001 becomes 1000...000 = 2**31.
Input: x = 6
Output: 1610612736
Explanation: bits 1 and 2 move to bits 30 and 29: 2**30 + 2**29.
Constraints
0 <= x < 2**32- Target complexity: O(32) per call.
Goals
- Read bits from the low end with & 1 and >>
- Build the result by shifting left and appending bits
- Always process all 32 positions, including leading zeros