BitFlip
✖
BitFlip
Details

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Flip the initial bit of the number 2 from a 0 to a 1:

https://wolfram.com/xid/0bdp1od03-jk83t4

Flip the second digit of 13, counting from the right:

https://wolfram.com/xid/0bdp1od03-fdl0vd

Flip the second digit of 13, counting form the left:

https://wolfram.com/xid/0bdp1od03-i72nzu

Starting with the number 0, flip positional bits:

https://wolfram.com/xid/0bdp1od03-cp5tpq

Scope (2)Survey of the scope of standard use cases
Digits beyond the highest set bit are implicitly set to 0:

https://wolfram.com/xid/0bdp1od03-5v2aji


https://wolfram.com/xid/0bdp1od03-8okwwd


https://wolfram.com/xid/0bdp1od03-5d8nl1


https://wolfram.com/xid/0bdp1od03-o77uol

If a flip position is given to the right of the initial set bit, the original value will be unchanged:

https://wolfram.com/xid/0bdp1od03-qpubjj

Properties & Relations (2)Properties of the function, and connections to other functions
For digits that are set to 1, BitFlip is equivalent to BitClear:

https://wolfram.com/xid/0bdp1od03-c5eni6


https://wolfram.com/xid/0bdp1od03-xqmxtl

For digits that are set to 0, BitFlip is equivalent to BitSet:

https://wolfram.com/xid/0bdp1od03-j01mw1


https://wolfram.com/xid/0bdp1od03-0yut3f

Wolfram Research (2024), BitFlip, Wolfram Language function, https://reference.wolfram.com/language/ref/BitFlip.html.
Text
Wolfram Research (2024), BitFlip, Wolfram Language function, https://reference.wolfram.com/language/ref/BitFlip.html.
Wolfram Research (2024), BitFlip, Wolfram Language function, https://reference.wolfram.com/language/ref/BitFlip.html.
CMS
Wolfram Language. 2024. "BitFlip." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitFlip.html.
Wolfram Language. 2024. "BitFlip." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitFlip.html.
APA
Wolfram Language. (2024). BitFlip. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitFlip.html
Wolfram Language. (2024). BitFlip. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitFlip.html
BibTeX
@misc{reference.wolfram_2025_bitflip, author="Wolfram Research", title="{BitFlip}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/BitFlip.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_bitflip, organization={Wolfram Research}, title={BitFlip}, year={2024}, url={https://reference.wolfram.com/language/ref/BitFlip.html}, note=[Accessed: 26-March-2025
]}