Rotate a Binary String Left
Enter a 0/1 string and a left rotation count to move its leading bits to the end locally.
A QUICK WALKTHROUGH
How to use this tool
- Enter a non-empty binary string containing only 0 and 1.
- Enter a non-negative integer rotation count.
- Rotate the string left and copy the result.
Modulo rotation
The rotation count is reduced modulo the string length, so a full-length rotation returns the original string.
Exact string width
The result preserves every bit, including leading zeroes, and is processed locally in your browser.
GOOD TO KNOW
Common questions
What if the count is larger than the string length?
It is reduced modulo the string length.
Are leading zeroes preserved?
Yes. The output has exactly the same length as the input.