Range of Decimals Representable by an nn-bit Ones’ Complement Representation

Range of Decimals Representable by an nn-bit Ones’ Complement Representation

Verified Sources
Nov 4, 2026

In an nn-bit One’s complement system, one bit is used as the sign bit (most significant bit). The remaining value field encodes the magnitude via complements. A key property is that ones’ complement has two zeros: +0+0 and −0-0. 2

To derive the range, note that the largest positive value occurs when the sign bit is 00 and all remaining bits are 11, which yields:

+(2n−1−1)+(2^{n-1}-1)

Similarly, the smallest (most negative) value occurs when the sign bit is 11 and all remaining bits are 00 (which represents the complement corresponding to −(2n−1−1)-(2^{n-1}-1)):

−(2n−1−1)-(2^{n-1}-1)

Therefore, the representable decimal integer range for nn-bit ones’ complement is:

−(2n−1−1) ≤ x ≤ (2n−1−1)-(2^{n-1}-1)\ \le\ x\ \le\ (2^{n-1}-1)

with 2n2^n total bit patterns corresponding to 2n2^n representable values, including both +0+0 and −0-0. 2

A compact visualization of boundaries is:

Footnotes

  1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩ ↩2

  2. Signed number representations - Wikipedia - Covers representable ranges and properties of ones’ complement. ↩ ↩2

type="tip" title="Pro Tip" content="When asked for an nn-bit ones’ complement range, remember: it is symmetric and excludes an extreme negative magnitude. The max magnitude is 2n−1−12^{n-1}-1 and there are two zeros."

Derive the Range for $n$-bit Ones’ Complement

  1. 1
    Step 1

    In ones’ complement, the most significant bit is the sign bit. Positive numbers have sign bit 0; negative numbers have sign bit 1.

    Footnotes

    1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩

  2. 2
    Step 2

    For a positive value, set the sign bit to 0 and all remaining n−1n-1 bits to 1. That integer equals 2n−1−12^{n-1}-1. 2

    Footnotes

    1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩

    2. Signed number representations - Wikipedia - Covers representable ranges and properties of ones’ complement. ↩

  3. 3
    Step 3

    Negatives are represented by bitwise complement of the positive magnitude. The most negative value corresponds to the complement of 2n−1−12^{n-1}-1, giving −(2n−1−1)-(2^{n-1}-1). 2

    Footnotes

    1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩

    2. Signed number representations - Wikipedia - Covers representable ranges and properties of ones’ complement. ↩

  4. 4
    Step 4

    Combine both bounds: −(2n−1−1)≤x≤(2n−1−1)-(2^{n-1}-1)\le x \le (2^{n-1}-1). Include the fact that both +0+0 and −0-0 exist among representable values. 2

    Footnotes

    1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩

    2. Signed number representations - Wikipedia - Covers representable ranges and properties of ones’ complement. ↩

Ones’ Complement Range Boundaries (as functions of nn)

For nn bits, max magnitude is 2n−1−12^{n-1}-1; range is symmetric.

Example instantiations

For intuition, plug in small nn:

  • For n=4n=4:

    −(23−1)=−7≤x≤7=(23−1)-(2^{3}-1)=-7 \le x \le 7=(2^{3}-1)

    and the two zeros +0+0 and −0-0 are both representable. 2

  • For n=8n=8:

    −(27−1)=−127≤x≤127=(27−1)-(2^{7}-1)=-127 \le x \le 127=(2^{7}-1)

    again including both +0+0 and −0-0. 2

Key terms

  • Ones’ complement
  • Sign bit
  • Two’s zero property
  • Representable range

Footnotes

  1. Ones' complement - Wikipedia - Defines ones’ complement, including range behavior and dual zeros. ↩ ↩2

  2. Signed number representations - Wikipedia - Covers representable ranges and properties of ones’ complement. ↩ ↩2

Common Nuances (FAQ)

Mental Model for the Range Question

Choose interpretation

Step 1

Treat the encoding as signed ones’ complement with sign bit and bitwise complement rule."

Compute maximum positive

Step 2

Set sign bit 0 and remaining n−1n-1 bits to 1 → 2n−1−12^{n-1}-1."

Compute minimum negative

Step 3

Complement the positive magnitude → minimum −(2n−1−1)-(2^{n-1}-1)."

State interval

Step 4

Report −(2n−1−1)≤x≤(2n−1−1)-(2^{n-1}-1)\le x \le (2^{n-1}-1) (noting two zeros)."

Ones’ Complement and Signed Integer Ranges

Knowledge Check

Question 1 of 3
Q1Single choice

An nn-bit ones’ complement representation can represent integers in which interval?