Bitwise Calculator

AND, OR, XOR, NOT and shifts on 32-bit integers

Free bitwise calculator. Compute AND, OR, XOR, NOT and bit shifts on unsigned 32-bit integers, with decimal and hex results in your browser.

How to use Bitwise Calculator

  1. Enter number A — a whole number from 0 to 4,294,967,295.
  2. Enter number B, unless you picked NOT, which uses A only.
  3. Pick the operation: AND, OR, XOR, NOT, left shift or right shift.
  4. Click Calculate and read the result in decimal and hex.
  5. Copy the result with one click.

Features

  • Six operations: AND, OR, XOR, NOT, left shift, right shift
  • Unsigned 32-bit results, shown in decimal and hex
  • One-click presets: 12 AND 10, 12 OR 10, 3 << 2
  • One-click copy in Result = N (0xHEX) form
  • Free and private — runs entirely in your browser

Frequently asked questions

What is a bitwise calculator?

It compares or moves the individual bits of whole numbers. AND returns 1 only where both bits are 1, OR returns 1 where either bit is 1, XOR returns 1 where the bits differ, NOT flips every bit, left shift moves bits left (multiplying by a power of 2) and right shift moves bits right (dividing by a power of 2). This tool works on unsigned 32-bit integers and shows each result in decimal and hex.

What are the worked examples?

The tool's one-click presets: 12 AND 10 = 8, 12 OR 10 = 14 and 3 << 2 = 12. The full set for the same pair: 12 XOR 10 = 6 (1100 XOR 1010 = 0110) and NOT 12 = 4,294,967,283 — every bit of the 32-bit number flipped. Two more from the standard examples: 44 AND 24 = 8 and 44 OR 24 = 60.

What is the AND and OR truth table?

For AND, the result bit is 1 only when both input bits are 1: 0 AND 0 = 0, 0 AND 1 = 0, 1 AND 0 = 0, 1 AND 1 = 1. For OR, the result bit is 1 when either input bit is 1: 0 OR 0 = 0, the other three combinations all give 1. Worked bit by bit, 12 is 1100 and 10 is 1010, so 12 AND 10 is 1000 = 8 and 12 OR 10 is 1110 = 14. AND is how you mask bits out; OR is how you set bits.

How does NOT work in this calculator?

NOT flips all 32 bits of the number and the result stays unsigned, so it is never negative. NOT 0 = 4,294,967,295 (all 32 bits set), NOT 255 = 4,294,967,040 and NOT 12 = 4,294,967,283. That differs from JavaScript's own ~ operator, which returns a signed number — ~12 is -13 there — because this tool applies >>> 0 to keep the result in the 0 to 4,294,967,295 range.

How do the bit shifts work?

Left shift moves bits left and fills with 0 on the right, which multiplies by 2 to the power of the shift: 7 << 2 = 28 (7 x 4) and 255 << 4 = 4,080. Right shift here is logical: bits move right and 0 fills from the left, so 255 >> 4 = 15 and 4,294,967,295 >> 1 = 2,147,483,647. The shift amount must be 0 to 31 — anything larger is rejected with the message Shift must be 0-31. 1 << 31 = 2,147,483,648, the largest power of two a 32-bit shift can reach.

What numbers can I enter?

Whole numbers from 0 to 4,294,967,295, in decimal only — type 255, not 0xFF or 0b11111111. Commas are allowed for readability (1,000 reads as 1000) and decimal entries are truncated to whole numbers. Negative numbers and anything over 4,294,967,295 are rejected. The tool has no NAND, NOR, XNOR or rotate operation, and no hex or binary input — for hex arithmetic use the Hex Calculator, and for XOR on hex, binary or text use the XOR Calculator.

Is it free?

Yes, unlimited — and everything runs in your browser, so nothing you type is uploaded or stored. The copy button copies text like Result = 8 (0x8) with one click.

Login to use this free online tool. Create a free account to get started.

Featured on Twelve Tools Hunt for Tools Featured on LaunchBuff Launch Llama Tools Launch your MCP Top Web Development Companies in the US - OnToplist.com Designer Listings Listed on SeeWhatNewAI Featured on SubmitMySaas Featured on AI Agents Directory Product Wing SaaS Wheel Featured on Stremit Featured on Thank John We Are Founders SubmitMySaas ShinyLaunch SaaS Tools Dir Featured on SaasHunt Product List Dir Featured on ShowMeBestAI Listed on Best-AI.org Featured on SaaSCity Listed on LaunchPact CodexFuse Solution on goodSaaS Featured on IndieLaunch Featured on BestAIApps AI X Collection Featured on SemiLaunch Listed on AlterBase We Like Tools codexfuse.dev LaunchClash Featured on Next Launch