← All text tools

Bitwise Calculator

Run AND, OR, XOR, NAND, NOR, XNOR, NOT and bit shifts on 8 to 64 bit numbers and see both inputs and the result in binary, decimal and hex.

  • Free
  • No sign-up
  • Works on any device

About Bitwise Calculator

See what AND, OR, XOR, NOT, NAND, NOR, XNOR and shifts really do to the bits. Enter numbers in decimal, hex (0x), binary (0b) or octal (0o), choose a word size of 8, 16, 32 or 64 bits, and the table lines up A, B and the result in grouped binary with the unsigned decimal, signed decimal and hex value of each. Negative numbers are held in two's complement, so -1 is all ones. Shifts come in three kinds: left, arithmetic right which keeps the sign, and logical right which fills with zeros. For example 12 AND 10 is 1100 AND 1010, which gives 1000, or 8.

How to use Bitwise Calculator

  1. Type number A, choose the operation and, if it needs one, number B or the shift count.
  2. Pick the word size (8, 16, 32 or 64 bits) and the base your numbers are written in.
  3. Read the aligned binary rows and the unsigned, signed and hex results.

Why use this tool?

Also known as

Frequently asked questions

What is the difference between >> and >>> ?

Both move bits to the right. The arithmetic shift >> copies the sign bit into the empty places, so negative numbers stay negative, while the logical shift >>> fills them with zeros.

Why does NOT 12 give 243 in 8 bits?

NOT flips every bit of the word: 00001100 becomes 11110011, which is 243 as an unsigned number and -13 as a signed one. A bigger word gives a bigger unsigned answer.

How do I check if a bit is set?

AND the number with a mask that has only that bit on, for example 1 shifted left by n. A nonzero result means the bit is set.

Is Bitwise Calculator free?

Yes. Bitwise Calculator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Bitwise Calculator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools