Binary range

Binary range refers to the smallest and largest numbers that can be stored using a fixed number of bits.

In two’s complement, the range includes both negative and positive integers.

 

State the range of denary values that can be represented using 8‑bit two’s complement.

1. Calculate how many values can be stored with 8 bits
2^8 = 256

2. Half of the values will be positive and half will be negative
256 / 2 = 128

3. Answer
-128 to 127

(NOTE: Zero counts as a positive number so you need to remove 1 from the positive end of the range.)

The formula to calculate the range of numbers that can be represented using two’s complement is:

-2^(n-1)    to    2^(n-1) – 1

Example:
State the range of denary values that can be represented using 8‑bit two’s complement.

-2^(n-1)    to    2^(n-1) – 1
-2^(8-1)    to    2^(8-1) – 1
-2^(7)    to    2^(7) – 1
-128    to   128 – 1
-128    to   127