Write the shortest code to reverse the bit order of a 32-bit integer.
- Input is assumed to be a valid integer or string equivalent if your language doesn't support numerical values (e.g. Windows Batch).
- Output must be a valid integer or string equivalent if your language doesn't support numerical values (e.g. Windows Batch).
- Standard library only.
- It may be a function or a complete program.
- Input may be either from
stdinor as a function argument.
- Output must be either
stdoutor as a returned value.
- If your language has a built-in or standard library function that does this in one step (e.g.
rbitin ARM assembly), that counts as a standard loophole and cannot be used.
- reversed binary
- decimal output
-90(8-bit example for demonstration)
Note: Omissions are free game. If I didn't say it, and it's not one of the standard loopholes, then it's completely allowed.