Bitwise Calculator — AND, OR, XOR, NOT & Bit Shift Online
AND, OR, XOR, NAND, NOR, XNOR, NOT and shift operations on two BigInt operands. Results shown in decimal, binary, octal and hex at once.
- Dec
- Bin
- Oct
- Hex
- Dec
- Bin
- Oct
- Hex
- Dec
- Bin
- Oct
- Hex
How to use
- 1 Enter operands A and B in any base — prefix with 0b, 0o, 0x or paste decimal.
- 2 Pick an operation (AND / OR / XOR / NAND / NOR / XNOR / NOT / shifts).
- 3 Choose a bit width (8/16/32/64) for masked arithmetic, or Unbounded for raw BigInt.
- 4 Result is shown in all four bases at once. Copy the decimal form with one click.
Why use this tool
- Nine operations including unsigned right shift (>>>) synthesised for BigInt.
- Bit-width masking matches what a C / Rust / Java compiler would do.
- Dec / Bin / Oct / Hex shown side-by-side for A, B and result.
- Pure browser logic, zero dependencies.
Frequently asked questions
What is the difference between >> and >>>?
>> preserves the sign bit (arithmetic shift). >>> shifts in zeros from the left (logical shift). On a fixed bit-width the difference matters; on unbounded BigInt the two collapse to the same operation for non-negative values.
Why does NOT 12 give -13 in unbounded mode?
BigInt uses two's-complement of an infinite-width integer. ~12 = -13. Switch to 32-bit width to see the masked result fffffff3.
How are NAND / NOR / XNOR computed?
They are AND / OR / XOR followed by a bitwise NOT, then masked to the selected width.
Need to convert between bases without an operation?
Use our Number Base Converter — Decimal, Binary, Octal and Hexadecimal in a live 4-row grid.
What is Bitwise Calculator?
A Bitwise Calculator is a tool that performs bit-level operations on two operands directly in the browser. It supports AND, OR, XOR, NAND, NOR, XNOR, NOT, and shift operations, computing on BigInt values to handle large numbers, and displays each result simultaneously in decimal, binary, octal, and hexadecimal for easy inspection of the bit patterns.
Features
Full operator set
AND, OR, XOR, NAND, NOR, XNOR, NOT, and left/right shifts.
Every base at once
See each result simultaneously in decimal, binary, octal, and hex.
BigInt-safe
Operates on arbitrarily large integers without floating-point loss.
Example
Input
A = 12, B = 10
Output
AND (&): 8
OR (|): 14
XOR (^): 6
Common use cases
-
1
Work with bit flags
Combine (OR) or test (AND) permission and feature flags.
-
2
Compute masks & shifts
Build bitmasks and check the effect of << and >> on a value.
-
3
Learn bit manipulation
Watch the binary result change per operation to build intuition.
Zerethon's bitwise calculator performs AND, OR, XOR, NAND, NOR, XNOR, NOT, and shift operations on two BigInt operands in your browser, showing each result in decimal, binary, octal, and hex at once. It works on arbitrarily large integers with no precision loss. Nothing is uploaded.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
References
- Bitwise operators — MDN Web Docs — MDN
- Bitwise operation — Wikipedia — Wikipedia
Privacy
Your data never leaves your browser unless explicitly stated. Bitwise Calculator runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.