Calculate
How to Use
- Choose the input base (Decimal, Hex, Binary, or Octal) for Number A.
- Enter your first number.
- Select a bitwise operation.
- For binary operations (AND, OR, XOR, shifts), enter Number B as well.
- Click Calculate to see the result in all bases with bit visualization.
Frequently Asked Questions
What is a bitwise AND operation?
A bitwise AND compares each bit of two numbers. The result bit is 1 only if both corresponding bits are 1, otherwise it's 0. Example:
5 AND 3 = 1 (0101 AND 0011 = 0001).
What is a bitwise XOR operation?
Bitwise XOR (exclusive OR) returns 1 for each bit position where the two bits differ, and 0 where they are the same. Example:
5 XOR 3 = 6 (0101 XOR 0011 = 0110).
What is a left shift operation?
Left shift (
<<) moves all bits to the left by a given number of positions. Vacated bits are filled with 0. Each left shift by 1 multiplies the number by 2. Example: 5 << 1 = 10.
What is a bitwise NOT operation?
Bitwise NOT (
~) inverts every bit. In 32-bit signed integers, ~5 = -6 because it flips all 32 bits including the sign bit.
How do I enter hexadecimal numbers?
Select Hex from the base dropdown, then type digits 0–9 and letters A–F (case-insensitive). You can switch bases anytime and re-enter your number.