Skip to main content

All Questions

40 votes
1 answer
10k views

Why was the caret used for XOR instead of exponentiation?

Not that it's really a problem for anyone that has faced this syntactic issue before, but I see a wild amount of confusion stemming from the use of the caret (^) as the XOR operation in lieu of the ...
Qix - MONICA WAS MISTREATED's user avatar
6 votes
4 answers
6k views

Why do higher level languages have neither xor nor nand short-circuit operators?

While many higher level languages have bitwise (exclusive or) and bitwise (exclusive and), for instance C, C++, Java, etc. I'm curious why the ( vastly more useful ) logical short-circuit operators ...
Stumbler's user avatar
  • 179
12 votes
5 answers
7k views

What is the benefit of studying bitwise operators? [duplicate]

What is the benefit of studying bitwise operators (Bitwise Not, Bitwise AND, Bitwise OR, Bitwise XOR, Left Shift, Signed Right Shift, Unsigned Right Shift etc.)? Will we really use these operators in ...
Tarek Saied's user avatar
20 votes
15 answers
5k 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 ...
Anto's user avatar
  • 11.2k