xor
(aka ^
), <<
, and >>
are more often used in lower-level programming. A C programmer will be intimately familiar with what these do. I'm writing an emulator in Ruby currently and use <<
and >>
often in the 6502 core due to things like it having a 1 byte word size but 2 byte pc. You need to do bit shifting to save the pc onto the stack, for example.
not
, and
, and or
are variations of !
, &&
, and ||
, respectively. They work the same, but have a 'looser binding' to the variables around them. Their use (at least in practice) is to allow writing of expressions with fewer parens. I believe Rails actually forbids the use of these operators completely within its own codebase due to misunderstandings about how they work.