sorry, stuck with the shifting counter, non-shifting is quicker, believe it or not

Code:
unsigned int reverseBits(unsigned int x) { 
     unsigned int res(0), cntr(32); 
     while (cntr--) { 
          res <<= 1; 
          res |= x & 1; 
          x >>= 1; 
     } 
     return res; 
}
[/B][/QUOTE]