low-level, primitive operations that directly manipulate bit patterns and binary numerals

learn more… | top users | synonyms

18
votes
15answers
2k views

What are bit operators good for? [closed]

Programming languages often come with various bit operators (e.g. bitwise left- and right shift, bitwise AND, OR, XOR...). These don't get used though very much, or at least such has my experience ...
5
votes
3answers
961 views

How does bit flipping / complementing work?

I am currently learning about bitwise operation, so bear with me. I understand AND, OR, and shifting. What I don't understand is bit flipping. So, 5 is 0101. When someone says to me "flip those", it ...
29
votes
13answers
2k views

How good does a well-rounded programmer need to be with bit-wise operations? [closed]

I have been browsing some OpenJDK code recently and have found some intriguing pieces of code there that has to do with bit-wise operations. I even asked a question about it on StackOverflow. ...
37
votes
2answers
2k views

Why do bitwise operators have lower priority than comparisons?

Could someone explain the rationale, why in a bunch of most popular languages (see note below) comparison operators (==, !=, <, >, <=, >=) have higher priority than bitwise operators (&, |, ...
18
votes
8answers
3k views

Importance of bitwise thinking [duplicate]

I take interview for my company. During interview I've faced many candidates having 1 to 3 years of experience in their field. Typically, they had experience in C#, Java, J2ME, iOS and similar ...