Bitwise Calculator
Enter two numbers and apply any bitwise operation — AND, OR, XOR, NAND, NOR, or XNOR — with results in decimal, binary, hex, and octal.
Last updated: May 29, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Bitwise Calculator?
Bitwise Calculator performs all six standard two-operand bitwise operations on unsigned 32-bit integers. It accepts input in decimal, binary, hexadecimal, or octal and displays the result in all four bases simultaneously. It also shows the bitwise NOT of each individual operand. Operations use JavaScript's unsigned right-shift (>>> 0) to ensure consistent unsigned 32-bit representation for positive display values.
How to Use Bitwise Calculator
Select the input base.
Enter two numbers.
Choose an operation.
Copy the result in any base.
Common Use Cases
- Setting, clearing, or toggling specific bits in embedded system registers.
- Computing network masks and subnet addresses.
- Implementing hash functions or checksums that use XOR operations.
- Understanding how NAND/NOR logic gates work in digital circuits.
Example Input and Output
XOR of 12 and 10.
A: 12 (1100₂)
B: 10 (1010₂)
Op: XORXOR: 6 (0110₂)Privacy
All calculations run locally in the browser.
Frequently Asked Questions
What is the difference between XOR and XNOR?
XOR (exclusive OR) outputs 1 when bits differ and 0 when they match. XNOR (exclusive NOR) is the inverse — it outputs 1 when bits are the same and 0 when they differ.
Why unsigned 32-bit?
JavaScript's bitwise operators convert operands to signed 32-bit before operating. The result is then converted to unsigned 32-bit (>>> 0) for display, which avoids negative numbers appearing in binary output for operations like NAND and NOR that invert bits.
Is my data uploaded?
No. All calculation runs in your browser.
Related Tools
AND Calculator
Calculate the bitwise AND of two numbers with decimal, binary, hex, and octal input/output — includes a visual bit-by-bit breakdown.
Number Base Converter
Convert numbers between binary, decimal, hexadecimal, octal, and any custom base — with bit grouping, signed integers, and step-by-step explanation.
Checksum Calculator
Calculate CRC-32, Adler-32, MD5, SHA-1, SHA-256, SHA-384, and SHA-512 checksums from text, hex, or Base64 input.
JavaScript Tester
Run and test JavaScript code directly in your browser — see console.log output, errors, and execution time instantly.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text.
JavaScript Validator
Check JavaScript code for syntax errors instantly — get the error type, message, and line number without running the code.

