WOLFRAM

BitGet[n,k]

gets the bit corresponding to the coefficient of in the integer n.

Details

  • BitGet[n,k] gets the bit k places from the right.
  • BitGet represents the bits it retrieves as 0 or 1.

Examples

Basic Examples  (1)Summary of the most common use cases

Display coefficients at powers of 2 in the integer 42:

Out[1]=1

Get the bit corresponding to the coefficient at 20:

Out[2]=2

Get the bit corresponding to the coefficient at 23:

Out[3]=3
Wolfram Research (2007), BitGet, Wolfram Language function, https://reference.wolfram.com/language/ref/BitGet.html.
Wolfram Research (2007), BitGet, Wolfram Language function, https://reference.wolfram.com/language/ref/BitGet.html.

Text

Wolfram Research (2007), BitGet, Wolfram Language function, https://reference.wolfram.com/language/ref/BitGet.html.

Wolfram Research (2007), BitGet, Wolfram Language function, https://reference.wolfram.com/language/ref/BitGet.html.

CMS

Wolfram Language. 2007. "BitGet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitGet.html.

Wolfram Language. 2007. "BitGet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitGet.html.

APA

Wolfram Language. (2007). BitGet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitGet.html

Wolfram Language. (2007). BitGet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitGet.html

BibTeX

@misc{reference.wolfram_2025_bitget, author="Wolfram Research", title="{BitGet}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/BitGet.html}", note=[Accessed: 04-April-2025 ]}

@misc{reference.wolfram_2025_bitget, author="Wolfram Research", title="{BitGet}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/BitGet.html}", note=[Accessed: 04-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_bitget, organization={Wolfram Research}, title={BitGet}, year={2007}, url={https://reference.wolfram.com/language/ref/BitGet.html}, note=[Accessed: 04-April-2025 ]}

@online{reference.wolfram_2025_bitget, organization={Wolfram Research}, title={BitGet}, year={2007}, url={https://reference.wolfram.com/language/ref/BitGet.html}, note=[Accessed: 04-April-2025 ]}