Until now, we have discussed only positive numbers. These numbers were called "unsigned 8-bit integers". In an 8-bit byte, we can represent a set of 256 positive numbers in the range 0_{10}-255_{10}. However, in many operations it is necessary to also have negative numbers. For this purpose, we introduce "signed 8-bit integers". Since we are limited to 8-bit representation, we remain also limited to a total of 256 numbers. However, half of them will be negative (-128_{10} through -1_{10}) and half will be positive (0_{10} through 128_{10}).

The representation of signed (positive and negative) numbers in the computer is done through the so-called 8-bit 2's complement representation. In this representation, the 8^{th} bit indicates the sign of the number (0 = +, 1 = -).

The signed binary numbers must conform to the obvious laws of signed arithmetic. For example, in signed decimal arithmetic, -3_{10} + 3_{10} = 0_{10}. When performing signed binary arithmetic, the same cancellation law must be verified. This is assured when constructing the 2's complement negative binary numbers through the following rule:

To find the negative of a number in 8-bit 2's complement representation, simply subtract the number from zero, i.e. -X = 0 - X using 8-bit binary arithmetic.

Example 1: Use the above rule to represent in 8-bit 2's complement the number -3_{10}

*Solution:* Subtract the 8-bit binary representation of 3_{10} from the 8-bit binary representation of 0_{10} using 8-bit arithmetic (8-bit arithmetic implies that you can liberally take from, or carry into the 9^{th} bit, since only the first 8 bits count!).

BINARY DECIMAL 00000000 - 0_{10} - __00000011__ __3___{10} 11111101 -3_{10}

Note that, in this operation, a 1 was liberally borrowed from the 9^{th} bit and used in the subtraction!*Verification* We have establish that -3_{10} = 11111101_{2}. Verify that -3_{10} + 3_{10} = 0_{10} using 8-bit arithmetic. BINARY DECIMAL 11111101 - -3_{10} - __00000011__ __3___{10} 00000000 0_{10}Note that, in this operation, a carry of 1 was liberally lost in the 9^{th} bit!

Example 2: Given the binary number 00110101, find it's 2's complement.

*Verification*: 01110101 + 10001011 = (1)00000000. Since the 9^{th} bit is irrelevant, the answer is actually 00000000, as expected

The rule outlined above can be applied to both binary and hex numbers.

Example 3: Given the hex number 6A, find its 8-bit 2's complement.

*Solution*: Subtract the number from 00_{16} using 8-bit arithmetic:

*Verification*: 6A_{16} + 96_{16} = (1)00. Since the 9^{th} binary bit is irrelevant, the answer is actually 00_{16}, as expected