# If the integer representation used is "0 through 4,294,967,295 (2^32 − 1)", so does this mean the register cannot handle negative numbers?

From Wikipedia:

A 32-bit register can store 2^32 different values. The range of integer values that can be stored in 32 bits depends on the integer representation used. With the two most common representations, the range is 0 through 4,294,967,295 (2^32 − 1) for representation as an (unsigned) binary number, and −2,147,483,648 (−2^31) through 2,147,483,647 (2^31 − 1) for representation as two's complement.

So if the integer representation used is "0 through 4,294,967,295 (2^32 − 1)", so does this mean the register cannot handle negative numbers?

From a similar standpoint, if the integer representation used is "−2,147,483,648 (−2^31) through 2,147,483,647 (2^31 − 1)", so does this mean that the register cannot handle numbers greater than 2,147,483,647?

• I feel like we're going in circles. A 32-bit register is a collection of 32 bits. That's it. If you treat it as encoding an unsigned integer, it can store any integer from $0$ to $2^{32}-1$. If you treat it as encoding a signed integer using two's complement, it can store any integer from $-2^{31}$ to $2^{31}-1$. If you treat it as storing a fixed point unsigned with 2 bits after the dot, it can store any number from $0$ to $2^{30}-1/4$ in jumps of $1/4$. And so on. Oct 22 '20 at 19:18
• @Yuval Filmus What's the highest and lowest value it can represent? Oct 22 '20 at 19:26
• Whatever you want. It depends on the representation. In IEEE 754 binary32, the answer is $(2 − 2^{−23}) × 2^{127}$. Oct 22 '20 at 19:28
• @Yuval Filmus Thanks, I will go through it. Oct 22 '20 at 19:30
• @NirajRaut You need to realize the distinction between what can be represented and how many different things (assuming that different things should have different representations) can be represented. $2$ bits can represent $2^2=4$ different things. You can represent $5$. You can say that $00$ represents $5$, $01$ represents dog, $10$ represents -0.12 and $11$ represents $\star$. We cannot represent the integers from $0$ to $5$ with $2$ bits because we would need to repeat a code.
– plop
Oct 22 '20 at 20:30