Bitwise calculator
Run AND, OR, XOR, NOT and bit shifts on two numbers and see the result bit by bit.
Bitwise calculator
Enter one number per line and pick an operation — AND, OR, XOR, NOT, shift left or shift right — to see the bitwise result instantly. It's built for the moment a calculator's decimal output isn't enough: checking a permission mask, debugging a flags field, working out what a shift actually does to a byte, or verifying a hand-computed two's complement value.
Read and write each operand in binary, octal, decimal or hexadecimal independently, so you can take a hex flag straight from a debugger and get a decimal or binary answer without a separate conversion step first. Bit width (8, 16, 32 or 64) sets how many bits the operation works over: a value that doesn't fit wraps to that width exactly the way it would in a real register, and the tool flags it as wrapped rather than pretending nothing happened. Signed mode reads and writes values as two's complement instead of plain unsigned, and for right shifts you can choose arithmetic (sign-preserving) or logical (zero-filling) — the distinction that decides whether >> on a negative number keeps its sign or not.
Turn on "Show operands aligned bit by bit" and the output adds the two operands and the result stacked underneath each other, one bit per column, with the operator and a divider line — the same layout you'd sketch on paper to check an AND or a shift by hand, generated instantly as you type. NOT and the shifts show a single operand row against the result; AND, OR and XOR show both.
Everything runs locally in your browser: numbers never leave your device, so it's safe to use with values that hint at how internal flags or protocol fields are built. Copy the result, download it as a .txt file, or send it straight back into the input to chain another operation.