Numbers & representations

Bitwise Calculator

Calculate AND, OR, XOR, complements, shifts and rotations with an explicit bit width and signed interpretation.

Stays in your browserFiles and text are processed in this tab.
Bitwise CalculatorLocal processing
Enter at least one value.

Numbers & representations

How it works

Bitwise operations act on individual binary positions. With 8 bits, 12 is 00001100 and 10 is 00001010; AND gives 00001000, which is decimal 8.

What you can do

Enter operand A per line and a shared operand B for two-input operations. Set the width and signed mode. Inspect the first pair as aligned bits and compare unsigned, signed, binary and hexadecimal output.

How to use it

  1. Choose the operation, bit width, signed interpretation and bases. Enter B for two-operand operations, or the shift amount when shown.
  2. Paste one value per line or open a UTF-8 text file.
  3. Select Convert, inspect the result, then copy or download TXT. Changes clear old results. Undo restores your previous input and settings.

Errors and limits

Operands outside the selected range are rejected. Results wrap to the chosen width. Arithmetic right shift interprets the highest bit as the sign; logical shift inserts zeros. Rotations use the shift modulo the width. Count mode returns an ordinary integer count.

Limits: 200,000 input characters, 500 values and 1,000,000 output characters. The entire batch stops on an invalid line.

Each numeric input accepts at most 1,000 digits. Intermediate integer arithmetic is bounded to 16,384 bits.

Frequently asked questions

Why can NOT 0 produce 255 or −1?

The 8-bit result is 11111111 in both cases. Unsigned interpretation gives 255; signed two’s complement gives −1. Width and interpretation must be specified together.

Are my values uploaded?

No. Processing and file reading happen in this browser tab. Values are not placed into URLs or sent to a conversion service. Downloaded files remain under your control.

Related tools