EN
PortuguêsEnglishEspañolDeutschFrançaisItaliano日本語Русский中文
Home Favorites
Voltar

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 use

Calculate bit by bit.

Available in: PortuguêsEspañolEnglishDeutschFrançaisItaliano日本語Русский中文

Next toolChmod calculator→
Advertisement

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

  1. Type numbers A and B.
  2. Choose the operation and the width.
  3. 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.

Similar tools

Thank you so much for helping!

Every donation helps keep the site online. The tools were made to help you, but we have server costs. If you can chip in, it helps a lot! Pick or type an amount:

Secure payment by Stripe. Opens in a new tab.

The tools are provided as is, without warranty. We are not responsible for the results or for how they are used.