sorry, stuck with the shifting counter, non-shifting is quicker, believe it or not
[/B][/QUOTE]Code:unsigned int reverseBits(unsigned int x) { unsigned int res(0), cntr(32); while (cntr--) { res <<= 1; res |= x & 1; x >>= 1; } return res; }
Results 1 to 15 of 279
Thread: Programming ChallengesThreaded View
|
|