Why Two's Complement works About to read computer science, I have just stumbled accross the concept of "Two's complement". I understand how to apply the "algorithm" to calculate these on paper, but I have not yet obtained an understanding of why it works. I think this site: https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html provides an explanaition why "flipping the digits" and adding one produces the compliment. What I do not understand is why adding the complement is equivalent to substracting the original number. Could somebody please give an explanation (maybe with a decimal example of the same concept as well?)?
Many thanks!

With the help of the other answers on this post (especially Ben Grossmann's), I managed to figure out Two's Complement and why it works for myself, but I wanted to add another complete barebones answer for anyone who still can't understand. This is my first post, so thank you for reading in advance. Also, much of my mathematic notation is likely to be false, so please refer to other answers for more mathematically accurate explanations.
As Ben Grossmann pointed out, understanding that binary addition is modulo is the key to understanding how Two's Complement works. What that means in a binary sense is that the last carry doesn't get used, so:
1111 1111 + 1 = 0000 0000,
not 1 0000 0000.
In decimal, this looks like $(255+1)\bmod{2^8}$. A similar example that you may find easier to wrap your head around is $(a+b)\bmod{12}$, which should look familiar.
This works for addition, but how about modulo subtraction? Well, continuing with the clock example, if we want to subtract using modulo addition, there is an easy solution: $a+(12-b) \pmod{12}$, or in binary: $a+(2^8-b)\bmod{2^8}$. The $12$ and $2^8$ are canceled out by their corresponding modulo, leaving us with $a-b$. The trick is now getting $2^8-b$, and that trick lies in Two's Complement.
To derive $2^8-b$, or $1\ 0000\ 0000 - b$ using only 8 bits, we first have to convert that into a familiar format:
$1\ 0000\ 0000-b=1111\ 1111-b+1$
This is the equivalent of $11-b+1$ using 12 as our modulo. Subtracting a number from $1111\ 1111$ is the same as inverting it. If this is confusing, then consider the equation
$1111\ 1111-1101\ 1001$
As you may have noticed, no borrows occur, because there are no $0$s in $2^8$. This effectively means that every bit of b is inverted. And so $INV(b)$ can be substituted for $1111\ 1111 - b$.
Plug that into our previous equation, and we now have $a-b=a+INV(b)+1$. There you have Two's Complement.
What this means for negative numbers is that $1111/ 1111=-1$ (as explained above in more detail by Ben Grossmann) and $1000/ 0000=-128$, while $0000\ 0000=0$ and $0111\ 1111=127. The system cycles through first the positives, and once 128 is reached ($1000\ 0000$) it flips the sign and cycles the other way through the negatives. The seventh bit acts like that sign, and no actual sign flip is needed. Without any additional provisions needing to be made, we can now add both negative and positive numbers.
