What is two's complement, and how do I calculate it?

Two's complement is one way negative numbers can be represented in Binary. In Decimal notation, we use a + or - sign to indicate whether it is a postive or negative number respectivly. Two's complement is a little different. Normally, each digit in your binary number will represent (from right to left) 1, 2, 4, 8, 16... In two's complement, we make that left most digit represent the negative value instead - for example 1, 2, 4, 8, -16. We can still represent positive numbers in exactly the same way - 01100 is still 12 (8+4), 00010 is still 2. But we can also represent a negative number, using the -16. 10000 would therefore represent -16 (the smallest number we can write) and 10110 would represent -10 (-16 + 4 + 2). This gives us a nice way of calculating the "two's complement" of a given number - you invert all the digits and add 1 - inverting the digits of 01100 gives 10011 and adding 1 gives 10100, which is -12 (-16+4). We can also quickly check if a number is positive or negative by looking at the most significant (left most) bit - if it's a 0, the number is a positive number, if it's a 1 the number is negative.

TH
Answered by Tim H. Computing tutor

10965 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

What is the denary representation of the binary number 10110110?


Perform AND, OR & XOR operations on 0001 1111 & 1010 1010


Convert the following binary number into hexadecimal : 10111000


How do I convert decimal to binary?


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2026 by IXL Learning