PRODUCTS
Mathematica
Mathematica for Students
Mathematica for the Classroom
Mathematica Personal Grid Edition
grid
Mathematica
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Certified Training
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Wolfram Blog
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Bitwise Operations
>
Built-in
Mathematica
Symbol
Integer and Number Theoretic Functions
Tutorials »
|
BitAnd
BitOr
BitXor
Not
See Also »
|
Bitwise Operations
Number Digits
More About »
BitNot
BitNot
[
n
]
gives the bitwise NOT of the integer
n
.
MORE INFORMATION
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
-1-
n
.
BitNot
automatically threads over lists.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
-1 corresponds to having all bits on:
In[1]:=
Out[1]=
In[1]:=
Out[1]=
Generalizations & Extensions
(1)
Applications
(1)
Properties & Relations
(1)
SEE ALSO
BitAnd
BitOr
BitXor
Not
TUTORIALS
Integer and Number Theoretic Functions
MORE ABOUT
Bitwise Operations
Number Digits
New in 4
© 2008 Wolfram Research, Inc.