Apply AND, OR, XOR and bit shifts

Apply AND, OR, XOR and bit shifts. Handy for students, analysts and engineers checking a calculation or conversion before using the result.

Apply AND, OR, XOR and bit shifts. See a clear result update immediately in your browser, with no account, upload or stored data to worry about.

How to use

  1. Enter the first integer, then the operator you need from AND, OR, XOR, SHL or SHR, and finally the second integer.
  2. Follow the field layout with one item per line so the tool can identify each part correctly.
  3. Run the calculation to get the bitwise result in the displayed base.
  4. Review the output and clear the content if you want to test another combination of numbers or shifts.
  5. If the answer looks odd, repeat the calculation with small integers to compare the behavior.

Example

A student prepares an exercise about binary masks using the input 12 and 10. They run the calculation and examine the result to understand which bits remain active after the AND operation.

Input

12
and
10

Limits and formats

Where processing happens

The bitwise calculation is performed locally in your browser. The numbers and operator you enter stay on your device, with no upload or storage. No external request is needed to get the answer.

Frequently asked questions

What do AND, OR and XOR mean?

AND keeps bits shared by both numbers, OR keeps bits present in either number, and XOR keeps bits that differ. These are standard bitwise logical operations in computing.

How do SHL and SHR work?

SHL shifts bits to the left and SHR shifts them to the right. A shift changes the value, and bits moved outside the available width may be lost depending on the context.

Can I use negative numbers?

You can try, but results may depend on the representation used by the browser. For demanding work, check the integer width and the expected format carefully.

Tools in the same category