Binary and Bitwise Calculator
Bitwise Operations Tool
Enter two integers (decimal, or hexadecimal with a 0x prefix) to see the result of bitwise AND, OR, XOR, NOT, and shift operations.
Inputs
Bitwise Results
JavaScript bitwise operators work on 32-bit signed integers, so results are limited to that range.
About Bitwise Operations
Bitwise operations work directly on the individual bits of an integer. AND keeps bits set in both values, OR keeps bits set in either, and XOR keeps bits set in exactly one. NOT inverts every bit. Shift operators move bits left or right, effectively multiplying or dividing by powers of two.
These operations are fundamental in low-level programming, flags and bitmasks, graphics, networking, and performance-critical code. In JavaScript, bitwise operators convert their operands to 32-bit signed integers before computing the result.