Skip to main content

All Questions

8 votes
1 answer
3k views

In Java, why use bit hacks when non-bitwise technique it is more readable?

Is there any legitimate use for bit manipulation hacks in higher-level languages such as Java? I can see them being useful in speed-sensitive low-level and computation-intensive programs, e.g. ...
blgt's user avatar
  • 296
14 votes
4 answers
12k views

What's your favorite bit-wise technique? [closed]

A few days ago, StackExchange member Anto inquired about valid uses for bit-wise operators. I stated that shifting was faster than multiplying and dividing integers by powers of two. StackExchange ...
bit-twiddler's user avatar
  • 2,658