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
RegExp Tester
Test regular expressions and inspect matches locally.
Regex Visualizer
Visual regex pattern diagram with live match highlighting and capture group annotations.
Subnet Calculator
Compute CIDR subnets, usable hosts, and network ranges.
Cron Parser
Translate cron syntax into plain English.
URL Parser
Break a URL into protocol, host, path, and query parts.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
HTTP Status Code Reference
Search and look up every HTTP status code and its meaning.
MIME Type Lookup
Find the MIME type for a file extension, or the extensions for a MIME type.