Two's Complement Converter

Convert signed integers and fixed-width two's-complement bit patterns.

Scope: Widths are explicit and bounded; values outside the selected signed range are rejected rather than truncated.

Workbench

Inputs stay on this page.

Converts exact signed integers and fixed-width two’s-complement patterns for widths 2 through 128, with explicit range and length validation.

How to use Two's Complement Converter

  1. Fill in the fields:

    • Direction: Signed integer to bit pattern, Bit pattern to signed integer.
    • Fixed bit width from 2 to 128.
    • Signed integer or exact bit pattern.
  2. Press “Convert two's complement”.

  3. Copy the result, or download it as twos-complement.json.

About this tool

Convert signed integers and fixed-width two's-complement bit patterns.

Converts exact signed integers and fixed-width two’s-complement patterns for widths 2 through 128, with explicit range and length validation.