Bitwise Operators: Difference between revisions

Content added Content deleted
m (Added more properties)
m (added more trivia)
Line 114: Line 114:
==NOT==
==NOT==
A bitwise <code>NOT</code>, or <code>~</code> takes one number as an argument and flips all its bits. This has its uses, especially when reading video game controllers, but is a little more limited than the others.
A bitwise <code>NOT</code>, or <code>~</code> takes one number as an argument and flips all its bits. This has its uses, especially when reading video game controllers, but is a little more limited than the others.

Among <code>AND</code>, <code>OR</code>, <code>XOR</code>, and <code>NOT</code>, only <code>XOR</code> and <code>NOT</code> are reversible.