My solution is not very good. However it is quite easy to understand. No magics and no tricks.
Process
Suppose we will reverse a bit space named s
,

allocate an empty space(0) named
z
, and an space whose highest bit is 1 namedi
. 
check if the lowest(last) bit of
s
is 1,if (s & 1) { }
if true, then do Bitwise OR:
z = i;

Right shift
z
andi
and do step 2 until z is empty space(zero).
Illustration
Here I will use a byte to illustrate it.
z = 00000000
i = 10000000
Suppose s = 00001001
After each step:

z = 10000000
i = 01000000
s = 00000100 
z = 10000000
i = 00100000
s = 00000010 
z = 10000000
i = 00010000
s = 00000001 
z = 10010000
i = 00001000
s = 00000000
s is zero, stop the loop.
Code sample
uint32_t reverseBits(uint32_t s) {
uint32_t z = 0, i = 1 << 31;
while ( s ) {
if (s & 1) z = i;
s >>= 1;
i >>= 1;
}
return i;
}
Analysis
Time Complexity(N bits): O(N). With average O(N/2), worst O(N).
Space Complexity: O(2N).