From here
(https://en.wikipedia.org/wiki/Method_of_complements)
I can see that in order to subtract two numbers $x$ and $y$ each having $n$ digits in that number system say having radix $b$, i.e we want to find $x - y$:
Consider $b^n - 1 - (x - y) = z$.
Now complement of $z = b^n - 1 - z = (x - y)$.
Now look at $z$
$z = (b^n - 1 - x) + y$ = Sum of $y$ and diminished radix complement of $x$ . Hence to find $x - y$ find $b - 1$ complement of x and add to $y$ and take the compliment.
For example consider $8 - 7 = 1000 - 111$
Here $1$'s complement of $x$ is $0111$ adding to $y$ gives $1110$ its complement gives $0001 = 1 = 8 - 7$ This method works very well with say binary numbers $x$ and $y$ but only when $x>=y$ not when $x<y$. How can we find such a simple method for it? Can someone help?
I'll try to explain two's complement with an example. Suppose we use have $8$-bit integers, so we could represent the number from $0$ to $255$ if we only used positive integers. If we want to use negative integers as well, we have to decide how many positive numbers we will have, and how many negative. Since we also have to represent $0$, we can't have the same number of positive and negative numbers, and the choice we make is to represent the integers for $-128$ to $127$ inclusive.
The numbers from $0$ to $127$ are represented in binary, as usual. Notice that these numbers all fit in $7$ bits, so in our eight-bit notation, they all have a leading $0$. That leaves the $128$ numbers that start with $1$ to be the negative numbers. The trick is that we make them represent $n-128$ where $n$ is the nonnegative number represented by the last $7$ bits.
For example $1111\space 0101$ represents $0111\space 0101 -128,$ which comes out to $61-128=-67,$ if I've done the arithmetic right. The reason for this representation is that it allows computers to use exactly the same circuits for addition and subtraction of signed and unsigned numbers, saving room on the chip.
You examples should work if you interpret them this way.
EDIT: This is how the subtraction $7-8$ would be done using our $8$-bit numbers. $7= 0000\space 0111, 8= 0000\space 1000$ $$ 0000\space 0111\\ 0000\space 1000\\ ----\space ----\\ 1111\space 1111 $$ Notice that when we get to the leftmost column, we have to "borrow" a $1$ from the outside. Observe also that the last $7$ bits of the answer are $1$ which gives $127$ in binary, so that the answer is $127-128=-1$.