First some additional facts: You can display numbers from -(2^(n-1)-1) till (2^(n-1)-1). If you look closely at those numbers, you may see: That is one number too fewer, than you would expect. 2*(2^(n-1))+ 1 (for the

zero) is only (2^n)-1. So where is the additional number? The explanation is: There are two zeros. By

definition not only 0...0 is zero, but also 1...1. This is pretty obvious, as a negative number is defined as the number with all bits

negated. So -0 is 1...1, it would be really bad, if this would be for example -1, as the following thing would not work: 5 + (-(3-3)), which is 5, but would be 4.

This double zero may look like a nice feature, but one which does no harm.

**But look closer!** Your numbers now look like ...,-3,-2,-1,0,0,+1,+2,+3,... . This makes calculations a bit more complicated than for the

two's complement. Example:

a = 5, b = -2

a = 0101, b = 1101

a + b =

**10010**
Doing the same as for the

two's complement,reducing to 4 bits, we get 0010. But 0010=2, that's not what we wanted. The reason are the two zeros. Normally you have 4, 3, 2, 1, 0, -1 between a and b, that are 6

numbers, here we have 4, 3, 2, 1, 0, 0, -1, that are

seven numbers. To handle this

problem one

mods the

result with (2^n)-1 (which is 1...1). 10010 mod 1111 = 0011.