BitNot

BitNot[n]

gives the bitwise NOT of the integer n.

Details

  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
  • BitNot[n] turns ones into zeros and vice versa in the binary bit representation of n.
  • Integers are assumed to be represented in two's complement form, with an unlimited number of digits, so that BitNot[n] is simply equivalent to .
  • BitNot automatically threads over lists.

Examples

open allclose all

Basic Examples  (2)

corresponds to having all bits on:

In[1]:=
Click for copyable input
Out[1]=
In[1]:=
Click for copyable input
Out[1]=

Generalizations & Extensions  (1)

Applications  (1)

Properties & Relations  (1)

See Also

BitAnd  BitOr  BitXor  Not

Tutorials

Introduced in 1999
(4.0)