CalcWorldHub
Free online calculator · no signup

Two’s complement range calculator

Find the signed integer range representable with a chosen bit width. Enter your values below to see the result and method.

A better way to figure it out
Clear
inputs.
∑
Clear result · useful details
Free calculatorNo signup ✓

Related calculators and articles

Compare methods and explore more free tools in computer science.

Browse the full computer science category →

Two’s complement range calculator — Bit width and calculation method
Two’s complement range calculator: inputs and calculation method.
Free calculator guide

How to use the Two’s complement range calculator

Find the signed integer range representable with a chosen bit width. Use the free tool above without creating an account.

∑
Illustration for this free CalcWorldHub tool.

What it calculates

Find the signed integer range representable with a chosen bit width. The output reflects the input definitions and conventions used by the formula, so keep formats and units consistent when comparing scenarios.

Inputs and units

Enter Bit width. Review the labels and example values before calculating.

Formula and method

minimum = −2^(b−1); maximum = 2^(b−1) − 1

The calculator applies this relationship directly and keeps intermediate values unrounded for the displayed estimate.

Worked example

An 8-bit two’s complement integer ranges from −128 to 127.

How to interpret the result

Use the result to answer the specific sizing, encoding, performance, or representation question stated on this page. It is conditional on the chosen inputs; change one input at a time to see how the estimate responds.

Assumptions and limitations

Bit width must be a positive integer within the supported range. This describes the usual fixed-width signed two’s complement convention.

Frequently asked questions

Why is the negative endpoint one smaller than the positive endpoint?

Two’s complement has one zero representation. With b bits it represents −2^(b−1) through 2^(b−1)−1, giving one additional negative value.

What is the 8-bit signed range?

An 8-bit two’s-complement integer ranges from −128 to 127.

Does increasing the bit width double the range?

Each added bit doubles the number of representable values, while shifting the minimum and maximum endpoints according to the two’s-complement formulas.

How do I use the Two’s complement range calculator?

Enter Bit width. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Two’s complement range?

An 8-bit two’s complement integer ranges from −128 to 127.