WebToolsPlanet
Developer Tools

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

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Select the input base.

2

Enter two numbers.

3

Choose an operation.

4

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, B=10, op=XOR
A: 12 (1100₂)
B: 10 (1010₂)
Op: XOR
Result
XOR: 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.