BitShiftLeft[n,k]
shifts the binary bits in the integer n to the left by k places, padding with zeros on the right.
BitShiftLeft[n]
shifts one bit to the left.
BitShiftLeft
BitShiftLeft[n,k]
shifts the binary bits in the integer n to the left by k places, padding with zeros on the right.
BitShiftLeft[n]
shifts one bit to the left.
Details
- BitShiftLeft[n,k] is equivalent to n2^k.
- Negative values of k shift to the right.
Examples
open all close allScope (3)
BitShiftLeft[32]Confirm the result by explicitly specifying a shift of 1:
BitShiftLeft[32, 1]BitShiftLeft works with numbers of any size:
BitShiftLeft[2 ^ 200 - 1, 7]BitShiftLeft automatically threads itself over lists:
BitShiftLeft[{1, 2, 4, 16}, 2]Tech Notes
Related Guides
History
Text
Wolfram Research (2007), BitShiftLeft, Wolfram Language function, https://reference.wolfram.com/language/ref/BitShiftLeft.html.
CMS
Wolfram Language. 2007. "BitShiftLeft." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BitShiftLeft.html.
APA
Wolfram Language. (2007). BitShiftLeft. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BitShiftLeft.html
BibTeX
@misc{reference.wolfram_2026_bitshiftleft, author="Wolfram Research", title="{BitShiftLeft}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/BitShiftLeft.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bitshiftleft, organization={Wolfram Research}, title={BitShiftLeft}, year={2007}, url={https://reference.wolfram.com/language/ref/BitShiftLeft.html}, note=[Accessed: 12-June-2026]}