Reverse all 32 bits of the input word, including leading zeroes. Do not treat the displayed binary string as a variable-length number: the width is part of the problem.
Build the result one bit at a time. Extract the next low bit from the input, shift the result to make room, append that bit, and shift the input. State whether your language uses signed or unsigned right shift and how you keep the computation within 32 bits.
After the implementation works, write the intermediate result after the first four iterations. Explain why a leading zero in the input can become a high-order one in the output and why the decimal result may appear negative in a signed 32-bit type.