Signed vs. Unsigned Numbers
Was also learning more about this at Ericsson.
- In a signed representation, the largest number is . The next number after is (the largest negative number)
- I.e. go from (largest positive number) to (largest negative number)
- In an unsigned representation, the largest number is . The next number after is .
- i.e. go from to
Donβt believe me? The Source of Truth is code right. Consider the following code:
Notice that unsigned can give a bigger number because you have that additional bit that would otherwise be used to represent the negative sign for the signed numbers.
To understand how to read /write these signed numbers, see Complement.