UnQTools
Developer Runs in your browser

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.

100% Private Works Offline Instant

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

  1. Enter your input in the tool above.
  2. Adjust any options to your preference.
  3. Use the Copy or Download buttons to save the result.
  4. 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.

Search tools and actions

Search across all 616 tools, categories, and quick actions.