ratio.

Find a tool

Browse all tools and categories ↗
INTEGER ARITHMETIC

Bitwise Integer Calculator

Perform exact fixed-width AND, OR, XOR, NOT and shifts with explicit signed or unsigned decimal inputs.

Enter your values

01 / INPUT
Calculated on your device

YOUR CALCULATION

Result

—

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Validate operand ranges, operate on exact BigInt bit patterns within the selected width and interpret the final pattern with the selected signedness.

    AND/OR/XOR/NOT and shifts on a width-bit mask; signed result=pattern−2^width when its sign bit is set

    Worked example

    At unsigned width 8, 12 AND 10 is 8, OR is 14 and XOR is 6. NOT of 12 is the 8-bit pattern 243. Signed right shifts distinguish zero-fill from sign extension.

    Assumptions and input details

    Decimal integer operands only, up to 128-bit width. B is ignored for NOT and shifts, and shift count is ignored for non-shift operations. Shift counts are 0 through selected width. Left-shift overflow is masked away rather than extending width. Hex and binary are explanatory representations of the numeric result, not separate encoding tools.

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Fixed-width integer operations and result patterns are exact within the selected 1–128 bit width. Overflow and signed interpretation follow the stated rules, rather than rounding.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL · COMPUTINGNumber Base Converter

    Convert a signed integer between bases 2–36 using exact arithmetic. Compare binary, octal, decimal, hexadecimal and base-36 values with place-value steps.

    RELATED TOOL · COMPUTINGIEEE 754 Binary32 Bit Pattern Calculator

    Encode a decimal value as a binary32 pattern or decode a 32-bit hexadecimal word, including signed zero, subnormals and special values.

    RELATED TOOL · NUMBER THEORYExact Modular Exponentiation Calculator

    Calculate a large integer power modulo a positive integer without constructing the full power.

    ADVERTISEMENT

    Reserved advertising space.