gives the bitwise NOT of the integer n.


  • 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.


open allclose all

Basic Examples  (2)

corresponds to having all bits on:

Generalizations & Extensions  (1)

Basic symbolic simplifications are done automatically:

Applications  (1)

Make a shifted version of the rule 45 cellular automaton:

Properties & Relations  (1)

Introduced in 1999