DIGITAL · TOOL

Bitwise Calculator

AND/OR/XOR/shift — mixed dec/hex/bin input, exact wraparound per bit width.

Basic No backend · 100% client-side

What it does: Performs bitwise operations on two integers, with results in binary/decimal/hex.

When to use it: Tweaking bit masks, setting register bits, or parsing protocols.

→ 0x00
Next

You might also need

How to

How to use the bitwise calculator

Enter numbers and pick an operation.

  1. 01

    Enter the operands

    Mix decimal, 0x hexadecimal and 0b binary freely.

  2. 02

    Pick operation and bit width

    AND/OR/XOR/shift, etc.; the bit width determines wraparound and display width (8/16/32/64).

  3. 03

    Read the result in three bases

    Gives binary, hexadecimal and decimal results at once.

FAQ

Common questions, answered in 3 minutes

What is the bit width for?

It determines how many bits the result wraps and displays in. For example, in 8 bits 0x80<<1 overflows back to 0x00, matching real register behavior.

Why does NOT depend on the bit width?

NOT inverts all bits, so the result depends on the bit width: in 8 bits ~0x00=0xFF, while in 32 bits it is 0xFFFFFFFF.

Is the shift arithmetic or logical?

This tool performs logical shifts (filling with 0) and masks to the bit width. Arithmetic right shift (preserving the sign) is handled separately.

Can it compute beyond 32 bits?

Yes, up to 64 bits; it uses BigInt internally for exact arithmetic and is not limited by JS 32-bit bitwise operations.

Data Provenance

Standards and sources referenced by this tool

Item Value / Formula Source
Bitwise operations AND/OR/XOR/NOT/shift Boolean bitwise operations

Exact bitwise operations with BigInt, no external API.

⚡ Powered by Circflow