Two's complement

Decimal value
Binary (two's-complement representation)
Two's complement (28 − n)2
0
0000 0000
0000 0000
1
0000 0001
1111 1111
2
0000 0010
1111 1110
126
0111 1110
1000 0010
127
0111 1111
1000 0001
−128
1000 0000
1000 0000
−127
1000 0001
0111 1111
−126
1000 0010
0111 1110
−2
1111 1110
0000 0010
−1
1111 1111
0000 0001

Question: How does the first number (significant bit) affect whether the integers are positive or negative?
Answer: The two's complement 8-bit number represents positive integers from 0 to 127 (01111111), the rest of the combinations with the most significant bit as '1' represent the negative integers −1 to −128.