Bit Shift & Rotate Visualizer (<<, >>, >>>, ROL / ROR)
Visualize left and right shifts (<<, >> arithmetic, >>> logical) plus circular rotates (ROL, ROR) and rotate-through-carry (RCL, RCR) on integers at 8/16/32/64-bit widths. Animated per-bit movement, before/after binary grid, shifted-out bits + carry flag, ×/÷ by 2^k annotation, BigInt-correct at every width. 100% client-side and offline.
About Bit Shift & Rotate Visualizer (<<, >>, >>>, ROL / ROR)
Visualize left and right shifts (<<, >> arithmetic, >>> logical) plus circular rotates (ROL, ROR) and rotate-through-carry (RCL, RCR) on integers at 8/16/32/64-bit widths. Animated per-bit movement, before/after binary grid, shifted-out bits + carry flag, ×/÷ by 2^k annotation, BigInt-correct at every width. 100% client-side and offline. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
What is the difference between >>, >>>, and arithmetic vs logical right shift?
Arithmetic right shift (>>) fills the vacated high-order bits with the original sign bit, preserving the sign of negative numbers (e.g. -8 >> 1 = -4 in 8-bit signed). Logical / unsigned right shift (>>>) always fills with zeros, treating the operand as unsigned (so 0xF8 >>> 1 = 0x7C). This tool clearly separates all three: left shift (<<), arithmetic right shift (>>), and logical right shift (>>>), and shows the bit pattern after each.
How do ROL, ROR, RCL and RCR rotate operations work?
ROL (rotate left) and ROR (rotate right) wrap the bits that fall off one end back into the other end — no bits are lost. RCL (rotate through carry left) and RCR (rotate through carry right) treat the carry flag as a 9th (or width+1-th) bit: the bit shifted out goes into the carry, and the previous carry value rotates in at the other end. The carry flag is shown alongside every rotate result so you can verify the wraparound behavior.
Which bit widths are supported and is the math BigInt-correct at 64-bit?
8, 16, 32 and 64-bit widths are all supported, with all arithmetic performed using BigInt under the hood. This means 64-bit shifts and rotates are exact — no JavaScript Number precision loss, no implicit 32-bit truncation. The display also shows the ×2^k / ÷2^k relationship for shifts so you can confirm e.g. that 5 << 3 = 40.
What happens when the shift count is greater than or equal to the bit width?
For shifts, bits shifted by ≥ width fully empty the register — the tool mirrors the C/UB note and shows a warning. For rotates, the count is taken modulo the width (so ROL by 8 on an 8-bit value is a no-op). A shift count of 0 is a no-op for every operation. Negative shift counts are flagged as errors. The behavior is always documented inline so you can predict the result.
What extra features does this tool have versus other bit-shift visualizers?
(1) Six operations: <<, >> arithmetic, >>> logical, ROL, ROR, RCL, RCR. (2) 8/16/32/64-bit widths, BigInt-correct. (3) Signed/unsigned display toggle. (4) Before/after binary grid with per-bit movement arrows. (5) Shifted-out bits shown explicitly. (6) Carry flag tracked and shown. (7) ×2^k / ÷2^k annotation for shifts. (8) Mixed-base operand parsing (0x hex, 0b binary, 0o octal, decimal). (9) Multi-step chaining (apply the same op k times). (10) History (localStorage, last 20). (11) Shareable URL with full state round-trip. (12) Reference table for every operation. 100% client-side and offline — your values never leave the device.
Related tools
.bashrc / .zshrc Alias & Config Manager
Build shell aliases, functions, exports, and PATH edits in a visual editor, then export a clean, commented .aliases file sourced from both .bashrc and .zshrc — with shadowing detection against shell builtins and common CLI tools, function suggestions when args are needed, starter packs (git, docker, kubectl, navigation, safety, ls, dev, devops, data science), import of existing rc files, dedupe, history (localStorage), and shareable URL. 100% client-side.
Add / Subtract Date Calculator
Add or subtract years, months, weeks, days, hours, minutes and seconds from a starting date/time. Calendar-day or business-day mode with custom weekend + holiday list. Month-end policy toggle (clamp to last day vs overflow). Repeat/series mode (e.g. every 2 weeks x 10) with CSV export. Shareable URL. 100% client-side.
Age Calculator
Calculate exact age from a birth date in calendar years/months/days (no negative-day bugs) plus totals in months/weeks/days/hours/minutes/seconds. Next-birthday countdown with weekday. Feb-29 birthday policy toggle. Milestones (1,000 days, 10,000 days, 1 billion seconds). Zodiac sign + Chinese zodiac. Age gap comparison. Shareable URL. 100% client-side.