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 right, rotate left or right, flip bits or reverse the bit order — 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. 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 as it would in a real register, and the tool flags it. Signed mode reads and writes two's complement, and for right shifts you can choose arithmetic (sign-preserving) or logical (zero-filling).
The circular shifts, rotate left and rotate right, move bits out of one end and back in at the other within the chosen width, so nothing is lost the way it is with a plain shift — the ROL and ROR of hashing and cipher code. Bit flip inverts only the positions you list on line 2, such as 0, 3, 7, counting from the rightmost bit as 0. Bit reverse mirrors the whole width, so the lowest bit becomes the highest.
Turn on "Show operands aligned bit by bit" and the output adds the operands and the result stacked one bit per column, with the operator and a divider line — the layout you'd sketch on paper to check a result by hand.
Everything runs locally in your browser: numbers never leave your device. Copy the result, download it as a .txt file, or send it straight back into the input to chain another operation.