Bitwise Calculator
Apply AND, OR, XOR, NOT and bit shifts to whole numbers and see the result in decimal and binary.
- A AND B
- 8 (00000000000000000000000000001000)
- A OR B
- 14 (00000000000000000000000000001110)
- A XOR B
- 6 (00000000000000000000000000000110)
- NOT A
- -13 (11111111111111111111111111110011)
- A << B
- 12288 (00000000000000000011000000000000)
- A >> B
- 0 (00000000000000000000000000000000)
What is Bitwise Calculator?
Bitwise operations work on the individual bits of a number. Programmers use them for flags, masks, permissions, hashing and low-level data work.
What this tool does
Takes two whole numbers and shows A AND B, A OR B, A XOR B, NOT A, and A shifted left and right by B places. Each result is shown in decimal and as a 32-bit binary number.
How to use it
- Enter number A and number B.
- Read each result in decimal and binary.
- Use B as the shift amount for the shift lines.
Did you know?
- AND keeps a bit only if both numbers have it. OR keeps it if either has it. XOR keeps it if exactly one has it.
- Shifting left by one place doubles a number, and shifting right by one halves it (rounding down).