Skip to content
ZeroServer.tools

Bitwise Calculator

Compute AND, OR, XOR, NOT, and bit-shift operations with binary and hex output.

Bit view (16-bit, amber = differing bits)
A
0000000000111100
B
0000000000001101
Operation
Decimal
Hex
Binary
&A AND B
12
0x0000000C
1100
|A OR B
61
0x0000003D
111101
^A XOR B
49
0x00000031
110001
~ANOT A (32-bit)
4,294,967,235
0xFFFFFFC3
11111111111111111111111111000011
~BNOT B (32-bit)
4,294,967,282
0xFFFFFFF2
11111111111111111111111111110010
<<A << 1
120
0x00000078
00000000000000000000000001111000
>>A >> 1 (signed)
30
0x0000001E
11110
>>>A >>> 1 (unsigned)
30
0x0000001E
11110

Bitwise operations, explained

Bitwise operators work directly on the binary representation of integers. AND keeps only bits that are 1 in both operands, OR keeps any bit set in either, and XOR keeps bits set in exactly one operand. NOT flips every bit (32-bit signed result in JavaScript). Left shift multiplies by powers of 2; right shift divides. These are fundamental to flags, masks, and low-level algorithms.

Related tools: decimal to binary converter, base converter, and the decimal to hex converter.

Private & free — this tool runs entirely in your browser.

Recommended: IndieKit Ship your Next.js startup in days.affiliate

Related Developer Utilities tools