Two's Complement Calculator

Convert decimal numbers to and from two's complement binary representation. Supports 8, 16, and 32-bit formats with step-by-step explanation.

isCalculator Editorial Team Published by:
Reviewed by: Review Board
Last Updated:

Was this calculator helpful?

How to use this tool?

This calculator converts a decimal integer to its two's complement binary representation for a chosen bit width.

  1. Select Bit Width: Choose 8, 16, or 32 bits from the dropdown.
  2. Enter a Decimal Number: Type an integer into the input field. The number must be within the range for the selected bit width (e.g., -128 to 127 for 8-bit).
  3. Click "Convert": Press the button to perform the conversion.
  4. View Results:
    • Binary (Two's Complement): Shows the binary representation, grouped in 4-bit nibbles for readability.
    • Decimal Value: Confirms the original decimal number you entered.
    • Explanation: Provides a step-by-step breakdown of the conversion process, especially for negative numbers.

Note: The calculator only accepts integer inputs. If the number is out of range or not an integer, an error message will appear below the input field.

Previous Results

Generate Charts
Result Inputs Date

Frequently Asked Questions

Two's complement is a way to represent signed integers in binary. It is the most common method for representing negative numbers in computer systems.

First, write the absolute value in binary. Then invert all bits (change 0 to 1 and 1 to 0). Finally, add 1 to the inverted binary number.

For 8-bit two's complement, the range is -128 to 127.

Reviewed by Experts

Eurico José Kiala

Eurico José Kiala

Mathematician

Teacher

LinkedIn
João Lino

João Lino

Mathematician

LinkedIn
Quick Convert
Length Converter
0
Weight/Mass Converter
0
Area Converter
0
Volume Converter
0
Speed Converter
0
Temperature Converter
0
Pressure Converter
0
Energy Converter
0
Power Converter
0
Force Converter
0
Time Converter
0
Angle Converter
0
Fuel Consumption Converter
0
Data Storage Converter
0
Base Numbers Converter
0
Dry Volume Converter
0
Currency Converter
0
Text Case Converter
0