Bitwise Calculator

Quick answer

The bitwise calculator performs AND, OR, XOR, NOR, NAND and XNOR on two binary, octal or decimal numbers with a chosen bit width, and shows the result in binary, decimal (signed and unsigned), octal and hexadecimal.

Result (binary)
0000 0010
Result (decimal, unsigned)
2
Result (decimal, signed two's complement)
2
Result (octal)
2
Result (hexadecimal)
2
Bit by bit
0000 1011 AND 0000 0110 ───────── = 0000 0010

Bitwise operations are the native language of processors. They pack flags into one integer, mask out bytes, compute hashes and checksums, and power graphics, compression and cryptography.

How to use the Bitwise Calculator

  1. Representation
  2. Number format
  3. Number 1
  4. Number 2
  5. Operation

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Choose the representation (bit width), the number format and the operation, then enter both numbers. The bit-by-bit layout shows exactly which bits produced the result.

Formula

AND: 1 if both bits are 1 · OR: 1 if either is 1 · XOR: 1 if they differ NOR = NOT OR · NAND = NOT AND · XNOR = NOT XOR

Worked example

Inputs — Representation: 8-bit; Number format: Binary; Number 1: 1011; Number 2: 0110; Operation: AND.
Results — Result (binary) = 0000 0010; Result (decimal, unsigned) = 2; Result (decimal, signed two's complement) = 2; Result (octal) = 2; Result (hexadecimal) = 2; Bit by bit = 0000 1011
AND 0000 0110
─────────
= 0000 0010.

Key terms

Two's complement
The usual way computers store negative integers.

Frequently asked questions

What does 1011 AND 0110 give?

0010.

Which operations are universal?

NAND and NOR – every logic circuit can be built from either one.

What is XNOR used for?

Equality testing: it outputs 1 when both bits are the same.

Why are results different for different widths?

Inverting operations (NOR, NAND, XNOR) turn leading zeros into ones.

Sources

  1. Wolfram MathWorld – Binary
  2. Harvard CS50 – Binary and bitwise operators

Cite this calculator

Speedy Calculator. (2026). Bitwise Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/bitwise/