Two's Complement
Learn the representation of signed numbers in binary using two's complement.
What is two’s complement?
Two’s complement is the most widely used representation of signed numbers. It provides ease of representation and computation. Unlike one’s complement, two’s complement has a unique representation for 0. Two’s complement representation also has a sign bit on the extreme left.
Because there’s a unique representation of , the range of two’s complement is larger than one’s complement. The comes from the positive side representation, so the range of an -bit two’s complement number is: - to . Note that is usually a power of .
Get hands-on with 1200+ tech skills courses.