Bitwise Calculator Online

Apply AND, OR, XOR, NOT and bit shifts to two integers and read the result in binary, hex, decimal and octal — computed with BigInt in your browser.

The Bitwise Calculator runs entirely in your browser. The integers you type and every AND, OR, XOR, shift and NOT result are computed on your device and are never sent to ArrayKit or any server.

Open the Number Base Converter

About Bitwise Calculator

The Bitwise Calculator applies AND, OR, XOR, NOT and the three shift operators to two integers and shows every result in binary, hex, decimal and octal at once. Type each operand in whatever base you think in — decimal, hexadecimal (0xff), binary (0b1010) or octal (0o17) — and read back a grouped, per-bit view that lines the operands up column by column so you can see exactly which bits flipped. Because it computes with BigInt, a left shift like 1 << 40 gives the exact 1099511627776 instead of overflowing at 32 bits the way JavaScript's own operators do. It is built for embedded developers, driver and protocol authors, and anyone decoding register flags or permission masks. Every operand and result stays in your browser.

Features

How to use the Bitwise Calculator

  1. Pick an operation — AND, OR, XOR, NOT, or a shift (<<, >>, >>>)
  2. Enter Value A, then Value B or a shift amount (NOT uses only A)
  3. Choose the input base, or leave it on Auto to read 0x, 0b and 0o prefixes
  4. Read the result in binary, hex, decimal and octal, and copy the base you need

Example

Input

A = 12
B = 10
op = AND

Output

BIN  1000
HEX  0x8
DEC  8
OCT  0o10

12 (1100) AND 10 (1010) keeps only the shared bit, giving 8 (1000).

Common errors & troubleshooting

Frequently asked questions

Why does this bitwise calculator use BigInt instead of 32-bit integers?
JavaScript's bitwise operators coerce their operands to 32-bit signed integers, so 1 << 40 overflows to 256 and large values lose their high bits. Computing with BigInt keeps every result exact no matter how big the number or the shift is.
What is the difference between >> and >>> in the calculator?
>> is an arithmetic right shift that preserves the sign bit, so -8 >> 1 is -4. >>> is a logical (unsigned) right shift that fills the top with zeros within the selected 32-bit or 64-bit width, so -1 >>> 28 is 15.
Why is NOT of 5 shown as -6?
Bitwise NOT inverts every bit, which in two's complement is the same as -(n+1). So NOT 5 is -6 in decimal. Look at the HEX and BIN rows to see the inverted bit pattern padded to the width you selected.
Can I mix hexadecimal, binary and decimal operands?
Yes. Set the input base explicitly, or leave it on Auto and prefix each value with 0x, 0b or 0o. The tool parses both operands, applies the operator, and reports the result in all four bases together.
How do I read a negative result's hex or binary?
Negative results are shown in two's complement at the selected width, so -6 reads as 0xfffffffa in 32-bit hex. The decimal row always stays signed and exact; switch to 64-bit if you need a wider bit pattern.
What does the 32-bit versus 64-bit width setting change?
The width controls where unsigned right shift zero-fills and how many bits the two's-complement hex, octal and binary use for negative or NOT results. The decimal value and logical AND/OR/XOR of positive numbers are unaffected.

Related tools

All ArrayKit tools