Related Classes: EECS 370

This is the most commonly used methodology to represent signed integers in binary. Recall that in binary, the -th digit from the right represents , where starts at 0. Consider the following number:

Two’s Complement numbers are very similar: the only difference is that the most significant bit is now negative. Considering the same example, the number in two’s compliment is: If you want to negate a number, it’s very simple in two’s complement: flip every bit (or nor a number with itself or 0) and then add 1.

So, to get the -3 above, we’d start with a binary 3: . Then, we’d flip all the bits to get . Finally, we’d add 1 to get , which is the same as above.

As you might be able to tell, the range of an -bit two’s complement number is: (inclusive).