Bitwise calculator (AND, OR, XOR, NOT, shift)
Do bitwise AND, OR, XOR, NOT and shift operations on decimal, hexadecimal or binary numbers, seeing every bit side by side.
How to useCalculate bit by bit.
Bitwise calculator (AND, OR, XOR, NOT, shift): what it is for
Type two numbers in decimal, hexadecimal (0x) or binary (0b), choose the operation and see the bits of each number and the result side by side, in 8, 16 or 32 bits. The result is shown as signed and unsigned decimal, hexadecimal, binary and octal, with the count of set bits and a copy button.
How to use
- Type numbers A and B.
- Choose the operation and the width.
- Check the bits and copy the result.
When to use it
- Build masks and flags.
- Study digital logic and programming.
- Check network and permission calculations.
Frequently asked questions
What are bitwise operations used for?
To set, clear and test bits: permission masks (like chmod), flags in network protocols, subnet calculations, hex colors, cryptography and optimizations in games and embedded systems.
How do I type hexadecimal or binary?
Use the 0x prefix for hexadecimal (0xFF) and 0b for binary (0b1010). Without a prefix, the number is read as decimal. Negative numbers use two's complement.
What is the difference between >> and >>>?
>> keeps the sign (fills with the sign bit), while >>> always fills with zeros and treats the number as unsigned. For positive numbers, both give the same result.
Is it really free?
Yes, 100% free. No sign-up, no subscription and no usage limits. All Tools123 are free.