# Why is a negative number a pseudo-positive number in ones' complement?

I'm studying ones' complement representation and I read in a book that a negative number in ones' complement is a pseudo-positive of value $R^n - 1 - |x|$.

However there is no demostration and I can't find it anywhere. If someone could tell me the reason I will be very thankful.

One's complement stores negative numbers as their bitwise negation.

Suppose we're working in $b$ bits. A positive integer $x$ is represented in binary by writing it as $x = \sum_{i=0}^b a_i2^i$, where each $a_i\in\{0,1\}$. The bitwise negation of $x$, then, is $$\overline{x} = \sum_{i=0}^b (1-a_i)2^i = \sum_{i=0}^b 2^i - \sum_{i=0}^b a_i2^i = 2^b - 1 - x\,.$$

• Yes, this was what I wanted to know. Thanks! – Joseph Jul 10 '15 at 18:44

• Actually, Joseph is asking exactly one question, and it's neither of the ones you answer. The question is, how is it that the definition of ones' complement causes the negative number $-x$ to be represented as the specific positive $2^n-1-|x|$? – David Richerby Jul 10 '15 at 14:07
• It differs because it asks why $-x$ is represented by a specific positive number, not why it's represented by any old positive number. – David Richerby Jul 10 '15 at 14:16