A sign bit is the bit that tells you whether a signed number is negative. By convention it's the MSB: 0 means zero or positive, 1 means negative.
How the sign bit behaves depends on the format:
- Sign-magnitude: the sign bit is only a flag, and the other bits give the size. 4-bit
1011is −3. - Two's complement: the sign bit is also a real digit, with a negative weight of −2ⁿ⁻¹. 4-bit
1011is −8 + 2 + 1 = −5. - Unsigned: there is no sign bit. The MSB is just the largest positive weight, and
1011is 11.
In two's complement you can read the sign at a glance, even in hex: a leading digit of 8–F means the sign bit is 1. So 8-bit 80₁₆ is negative and 7F₁₆ is positive.
The sign bit has two more jobs in hardware. After an ALU operation it becomes the negative flag N, and in sign extension it's the bit copied into every new position on the left.