Two's complement is how virtually every processor stores signed whole numbers. Read it like ordinary binary, with one change: the MSB's weight is negative.
In 4 bits the weights are −8, 4, 2, 1. So 0101 = 5, and 1011 = −8 + 2 + 1 = −5. In n bits the MSB is worth −2ⁿ⁻¹.
The intuition is a counter running backwards. Wind a 4-bit counter back one step from 0000 and every bit rolls over to 1111: that's −1. Another step gives 1110 = −2, and so on down to 1000 = −8. Every pattern with MSB 1 equals its unsigned value minus 2ⁿ.
Why hardware uses it:
- One zero. Unlike sign magnitude, there's no −0.
- One adder for everything. Adding the bits as if they were unsigned gives the right signed answer too, as long as it fits.
- Easy negation. Invert every bit and add 1 (twos complement negation).
- Subtraction is addition. A − B = A + (−B), so an adder subtractor needs only XOR gates and a carry-in.
The range is −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1: one more negative value than positive. In 8 bits that's −128 to 127. Results outside it cause signed overflow, and widening a value needs sign extension.