Bitwise Operations Calculator

Input base

Bitwise AND (&): A bit is 1 only when both inputs have 1 in that position. Otherwise it's 0. Used for masking — keep some bits, clear others.

Result (decimal)
8
Hexadecimal
0x8
Binary
0b1000
Octal
0o10
Binary (low 32 bits)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
bit 31-24bit 23-16bit 15-8bit 7-0

The Bitwise Operations Calculator takes two integers — typed in any base (decimal, hex, binary, octal) — and runs AND (&), OR (|), XOR (^), NOT (~), left shift (<<), arithmetic right shift (>>), or unsigned right shift (>>>) on them. The result is reported in all four bases, with a 32-bit visual grid so you can read the bits position by position. The math runs on BigInt, so results that exceed 32 bits are computed without silent truncation — the grid shows the low 32 bits and the numeric fields show the full BigInt value.

Built by Bob QA by Ben Shipped

How to use

  1. 1

    Pick the input base. The number you type is interpreted as that base. Decimal accepts 0-9, hex 0-9 + a-f, binary 0/1, octal 0-7. Prefixes (0x, 0b, 0o) are optional and accepted.

  2. 2

    Type the first operand in the A field.

  3. 3

    Type the second operand in the B field. NOT is unary — when you pick NOT, the B field is disabled.

  4. 4

    Pick the operation from the dropdown. The plain-English explanation under the dropdown updates to describe what the chosen operation does.

  5. 5

    Read the result in the four bases. The 32-bit grid shows the low 32 bits with green cells for 1 and neutral cells for 0; the position labels run 31, 24, 16, 8, 0 from left to right.

  6. 6

    Tap Copy on any output to grab it. Shift amounts beyond 32 bits work — the value migrates upward and the grid shows the low 32 bits.

Frequently asked questions

Ratings & Reviews

Rate this tool

Sign in to leave a written review.
Loading reviews…