BitShiftRight[n,k]
shifts the binary bits in the integer n to the right by k places, dropping bits that are shifted past the unit's position on the right.
shifts one bit to the right.


BitShiftRight
BitShiftRight[n,k]
shifts the binary bits in the integer n to the right by k places, dropping bits that are shifted past the unit's position on the right.
shifts one bit to the right.
Details

- BitShiftRight[n,k] is equivalent to IntegerPart[n/2^k].
- Negative values of k shift to the left.
Examples
open all close allBasic Examples (1)
Scope (2)
BitShiftRight works with numbers of any size:
BitShiftRight automatically threads itself over lists:
Tech Notes
Related Guides
History
Text
Wolfram Research (2007), BitShiftRight, Wolfram Language function, https://reference.wolfram.com/language/ref/BitShiftRight.html.
CMS
Wolfram Language. 2007. "BitShiftRight." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitShiftRight.html.
APA
Wolfram Language. (2007). BitShiftRight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitShiftRight.html
BibTeX
@misc{reference.wolfram_2025_bitshiftright, author="Wolfram Research", title="{BitShiftRight}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/BitShiftRight.html}", note=[Accessed: 18-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_bitshiftright, organization={Wolfram Research}, title={BitShiftRight}, year={2007}, url={https://reference.wolfram.com/language/ref/BitShiftRight.html}, note=[Accessed: 18-August-2025]}