How to reverse the bits.?

Not able to understand anything in the question please explain line by line.

reverse the bit
for 2 binary is (000…010) in 32 bit
reverse the bit (010…000) convert it into decimal.

how to do it the only thing i can think of is storing inside an array. anything without it?

store it as string…