Build reversed bits by shifting result left and taking lowest bit from input.
Repeat 32 times:
res = (res<<1) | (n&1), then n >>= 1.
Build reversed bits by shifting result left and taking lowest bit from input.
Repeat 32 times:
res = (res<<1) | (n&1), then n >>= 1.