-
See Also
- BitClear
- BitFlip
- BitGet
- BitLength
- BitOr
- ReplacePart
- FromDigits
-
- Data Structures
- BitVector
- Related Guides
- Tech Notes
BitSet[n,k]
sets to 1 the bit corresponding to the coefficient of in the integer n.


BitSet
BitSet[n,k]
sets to 1 the bit corresponding to the coefficient of in the integer n.
Examples
open all close allBasic Examples (1)
Scope (1)
BitSet automatically creates an integer of the necessary size:
See Also
BitClear BitFlip BitGet BitLength BitOr ReplacePart FromDigits
Data Structures: BitVector
Function Repository: BitFlip
Tech Notes
Related Guides
History
Text
Wolfram Research (2007), BitSet, Wolfram Language function, https://reference.wolfram.com/language/ref/BitSet.html.
CMS
Wolfram Language. 2007. "BitSet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitSet.html.
APA
Wolfram Language. (2007). BitSet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitSet.html
BibTeX
@misc{reference.wolfram_2025_bitset, author="Wolfram Research", title="{BitSet}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/BitSet.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_bitset, organization={Wolfram Research}, title={BitSet}, year={2007}, url={https://reference.wolfram.com/language/ref/BitSet.html}, note=[Accessed: 15-August-2025]}