Bitwise Operation Calculator (AND / OR / XOR / NOT / Shift)
Evaluate bitwise expressions — AND, OR, XOR, NOT, NAND, NOR, XNOR, left shift, right shift (arithmetic & logical) — on two or more operands in mixed bases (bin/oct/dec/hex). Aligned bit-column grid, truth-table generator, selectable width (8/16/32/64-bit or BigInt), signed/unsigned toggle, and multi-input chained operations. 100% client-side.
About Bitwise Operation Calculator (AND / OR / XOR / NOT / Shift)
Evaluate bitwise expressions — AND, OR, XOR, NOT, NAND, NOR, XNOR, left shift, right shift (arithmetic & logical) — on two or more operands in mixed bases (bin/oct/dec/hex). Aligned bit-column grid, truth-table generator, selectable width (8/16/32/64-bit or BigInt), signed/unsigned toggle, and multi-input chained operations. 100% client-side. 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
Which bitwise operations are supported?
All seven named gates — AND (&), OR (|), XOR (^), NOT (~), NAND, NOR, XNOR — plus left shift (<<), logical right shift (>>>, zero-fill), and arithmetic right shift (>>, sign-fill). NOT, NAND, NOR and XNOR are derived from AND/OR/XOR with the NOT step applied to the result, so they work on arbitrarily many operands at the chosen width.
Can I mix bases in one expression?
Yes. Each operand is auto-detected: 0x prefix is hex, 0b is binary, 0o is octal, no prefix is decimal. Negative literals (e.g. -0x10) are accepted and interpreted per the chosen signed/unsigned mode and bit width. The full expression parser supports parentheses and standard precedence: NOT > shift > AND > XOR > OR.
How does the bit-column grid work?
Each operand and the final result are rendered as a left-padded binary string at the chosen width (8/16/32/64 bits). The bits are aligned in columns so you can trace a single bit position across every operand and the result. Set bits are highlighted; hover highlights the same column across rows for visual tracing.
What is the difference between arithmetic and logical right shift?
Arithmetic right shift (>>) fills the vacated high-order bits with the original sign bit, preserving the sign of negative numbers — this matches C/Java semantics for signed integers. Logical right shift (>>>) fills with zeros regardless of sign, treating the operand as unsigned. Both are provided so you can compare results; the tool matches the chosen bit width exactly.
What extra features does this tool have versus other bitwise calculators?
(1) Seven gates: AND, OR, XOR, NOT, NAND, NOR, XNOR. (2) Left shift + arithmetic & logical right shifts. (3) Mixed-base operand parsing (0x/0b/0o/decimal). (4) Full expression evaluator with parentheses and precedence (shunting-yard). (5) Aligned bit-column grid for visual tracing. (6) Selectable width 8/16/32/64-bit and BigInt mode (no overflow). (7) Signed/unsigned reinterpretation. (8) Per-gate truth-table generator. (9) Step-by-step evaluation log. (10) Multi-input chained operations (e.g. 0xF0 & ~0b1010 ^ 12). (11) Result shown in bin/oct/dec/hex simultaneously. (12) History (localStorage, last 20). (13) Shareable URL. 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.