Another fun bitwise dealie I've seen in interviews (had it in the interview for my current job, actually) is calculating the first power of 2 greater than a given 32-bit int.
My guess is that that's similar to the way you would go about finding out the number of bits that are ones? (There's probably a better term for what I'm trying to say than that, but I'm sort of not functioning completely atm :p)
Comments 6
and chips is not an appropriate breakfast. just thought i would mention it...
Reply
I knowwww but I was running behind...again...
Reply
Reply
Reply
Reply
Reply
Leave a comment