Computers represent negative numbers within a fixed bit width using two's complement.
Two's complement is the standard way to represent negatives in fixed-width integers such as 8, 16, 32 and 64 bits.
Flip every bit (one's complement) and add 1.
For example, -1 in 8 bits is 11111111.
Values beyond the width are truncated or flip sign. This tool's bit grid shows the value per width so you can spot overflow immediately.