Try To Calculator logoTry To Calculator

Two's Complement Calculator

Last updated: January 30, 2026

Key takeaway: Check this two's complement calculator if you want to find the opposite of a binary number in its two's complement representation. You can also convert a decimal value to its binary and 2's complement forms. This free Two's Complement Calculator is designed for students, teachers, and anyone who needs quick math answers — enter your values above to get instant results.

Here is the two's complement calculator (or 2's complement calculator), a fantastic tool that helps you find the opposite of any binary number and turn this two's complement to a decimal value. You have an opportunity to learn what the two's complement representation is and how to work with negative numbers in binary systems. In the text, you can also find how this two's complement converter works or how to turn any signed binary to decimal by hand.

🔎 If you only need to convert decimal to binary or vice versa, check binary converter!

How to work with negative numbers in binary? – 2's complement representation

In the binary system, all numbers are a combination of two digits, 00 or 11. Each digit corresponds to a successive power of 2, starting on the right.

For example, 1212 in binary is 11001100, as 12=8+4=123+122+021+02012=8+4=123+122+021+020 (using scientific notation). The hexadecimal system is an extended version of the binary system(which uses base 16 instead of base 2). The latter is frequently used in many computer software and systems. If you want to read more, head to our decimal to hexadecimal converter.

Learning about binary leads to many natural questions: What about negative numbers in the binary system? Or how do I subtract binary numbers? As we can only use 11 to show that something is present or 00 to mean that there is a lack of that thing, there are two main approaches:

  1. Two's complement representation, or, in other words, signed notation – the first bit tells about the sign. The convention is that a number with a leading 11 is negative, while a leading 00 denotes a positive value. In an 8-bit representation, we can write any number from -128 to 127. The name comes from the fact that a negative number is a two's complement of a positive one.

  2. Unsigned notation – a representation that supports only positive values. Its advantage over the signed one is that, within the same 8-bit system, we can get any number from 0 up to 255.

The unsigned notation is good enough if we need to add or multiply positive numbers. But, usually, the more practical solution is to work with negative numbers as well. A useful thing about the 2's complement representation is that subtraction is equivalent to an addition of a negative number, which we can handle.

How to use two's complement calculator? Two's complement converter in practice

Whenever you want to convert a decimal number into a binary value in two's complement representation, follow these steps:

  1. Choose the number of bits in your notation. The higher value, the broader range of numbers you can input.

  2. Write any whole decimal within the range that appears under the Decimal to binary section.

  3. … and that's it – the 2's complement calculator will do the rest of the work! It shows the equivalent binary number and its two's complement.

Do you want to estimate the outcome by hand? This is how two's complement calculator does it:

  1. Choose the number of bits in the binaries representation. Let's assume we want values in the 8-bit system.

  2. Write down your number, let's say 16. 16 in binary is 1 00001 0000.

  3. Add some leading 00's so that the number has eight digits, 0001 00000001 0000. That's 16 in the two's complement notation.

And what about its counterpart, 1616?

  1. Switch all the digits to their opposite (0101 and 1010). In our case, 0001 00001110 11110001 00001110 1111.

  2. Add 1 to this value, 1110 1111+1=1111 00001110 1111+1=1111 0000.

  3. 1111 00001111 0000 in the two's complement representation is 1616 in decimal notation and is the 2's complement of 0001 00000001 0000.

Look, as long as you are proficient in switching digits and adding unity to a binary value, evaluating negative numbers in binary is not a big deal!

🔎 In case of adding binary numbers, you may find our binary addition calculator helpful.

Turning two's complement to decimal

Our 2's complement calculator can also work the other way around – converting any two's complement to its decimal value. Let's try to convert 1011 10111011 1011, a signed binary, to decimal. Two useful methods help you find the outcome:

Method 1

Convert this signed binary into a decimal, like normal, but multiply the leading digit by 11 instead of 11. Starting from the right:

decimal=120+121+022+123+124+125+026127=1+2+8+16+32128=69decimal=120+121+022+123+124+125+026127=1+2+8+16+32128=69

Method 2

We can see that the first digit is 11, so our number is negative. First, find its two's complement, then convert the value to a decimal, and come back to the original value:

  1. Reverse digits, 1011 10110100 01001011 10110100 0100.
  2. Add a unity, 0100 0100+1=0100 01010100 0100+1=0100 0101.
  3. Convert to a decimal (starting from the right),
decimal=+120+021+122+023024+025+126+027decimal=+120+021+122+023024+025+126+027
  1. decimal=1+4+64=69decimal=1+4+64=69.
  2. As 6969 is the absolute value of our initial (negative) binary, add a minus sign in front of it.
  3. 1011 10111011 1011 is 6969 in two's complement binary notation.

Signed binary to decimal table

If you want to find any whole number in the two's complement eight-bit representation, you may find this table handy. You can see both the value and its two's complement in the same row.

If you are interested in working with the values of a different number of bits, just use our two's complement calculator to save yourself time and effort!

DecimalBinaryDecimalBinary
00000 0000
10000 0001-11111 1111
20000 0010-21111 1110
30000 0011-31111 1101
40000 0100-41111 1100
50000 0101-51111 1011
60000 0110-61111 1010
70000 0111-71111 1001
80000 1000-81111 1000
90000 1001-91111 0111
100000 1010-101111 0110
110000 1011-111111 0101
120000 1100-121111 0100
130000 1101-131111 0011
140000 1110-141111 0010
150000 1111-151111 0001
160001 0000-161111 0000
170001 0001-171110 1111
180001 0010-181110 1110
190001 0011-191110 1101
200001 0100-201110 1100
210001 0101-211110 1011
220001 0110-221110 1010
230001 0111-231110 1001
240001 1000-241110 1000
250001 1001-251110 0111
260001 1010-261110 0110
270001 1011-271110 0101
280001 1100-281110 0100
290001 1101-291110 0011
300001 1110-301110 0010
310001 1111-311110 0001
320010 0000-321110 0000
330010 0001-331101 1111
340010 0010-341101 1110
350010 0011-351101 1101
360010 0100-361101 1100
370010 0101-371101 1011
380010 0110-381101 1010
390010 0111-391101 1001
400010 1000-401101 1000
410010 1001-411101 0111
420010 1010-421101 0110
430010 1011-431101 0101
440010 1100-441101 0100
450010 1101-451101 0011
460010 1110-461101 0010
470010 1111-471101 0001
480011 0000-481101 0000
490011 0001-491100 1111
500011 0010-501100 1110
510011 0011-511100 1101
520011 0100-521100 1100
530011 0101-531100 1011
540011 0110-541100 1010
550011 0111-551100 1001
560011 1000-561100 1000
570011 1001-571100 0111
580011 1010-581100 0110
590011 1011-591100 0101
600011 1100-601100 0100
610011 1101-611100 0011
620011 1110-621100 0010
630011 1111-631100 0001
640100 0000-641100 0000
650100 0001-651011 1111
660100 0010-661011 1110
670100 0011-671011 1101
680100 0100-681011 1100
690100 0101-691011 1011
700100 0110-701011 1010
710100 0111-711011 1001
720100 1000-721011 1000
730100 1001-731011 0111
740100 1010-741011 0110
750100 1011-751011 0101
760100 1100-761011 0100
770100 1101-771011 0011
780100 1110-781011 0010
790100 1111-791011 0001
800101 0000-801011 0000
810101 0001-811010 1111
820101 0010-821010 1110
830101 0011-831010 1101
840101 0100-841010 1100
850101 0101-851010 1011
860101 0110-861010 1010
870101 0111-871010 1001
880101 1000-881010 1000
890101 1001-891010 0111
900101 1010-901010 0110
910101 1011-911010 0101
920101 1100-921010 0100
930101 1101-931010 0011
940101 1110-941010 0010
950101 1111-951010 0001
960110 0000-961010 0000
970110 0001-971001 1111
980110 0010-981001 1110
990110 0011-991001 1101
1000110 0100-1001001 1100
1010110 0101-1011001 1011
1020110 0110-1021001 1010
1030110 0111-1031001 1001
1040110 1000-1041001 1000
1050110 1001-1051001 0111
1060110 1010-1061001 0110
1070110 1011-1071001 0101
1080110 1100-1081001 0100
1090110 1101-1091001 0011
1100110 1110-1101001 0010
1110110 1111-1111001 0001
1120111 0000-1121001 0000
1130111 0001-1131000 1111
1140111 0010-1141000 1110
1150111 0011-1151000 1101
1160111 0100-1161000 1100
1170111 0101-1171000 1011
1180111 0110-1181000 1010
1190111 0111-1191000 1001
1200111 1000-1201000 1000
1210111 1001-1211000 0111
1220111 1010-1221000 0110
1230111 1011-1231000 0101
1240111 1100-1241000 0100
1250111 1101-1251000 0011
1260111 1110-1261000 0010
1270111 1111-1271000 0001
-1281000 0000

FAQs

What is the two's complement?
The two's complement is a way to represent negative numbers in binary when the minus sign is not available. The minus sign is substituted in the two's complement representation by a digit, usually the leading one. If the leading digit is 0, the number is positive. If the leading digit is 1, the number is negative.
How do I calculate the two's complement of a number?
To calculate the two's complement of a number: If the number is negative, subtract it from the power of 2 with exponent corresponding to the number of bits of your chosen representation. Convert the number to binary. If the number was negative, add 1 to the proper position and pad with 0. If the number was positive, left-pad the result with 0 to the desired length.
What are the disadvantages of the two's complement notation?
The two's complement notation takes one number away from the binary representation of a number. This means that, using an 8-bit representation allows us to represent numbers from −27 = −128 to 27−1 = 127. If we had renounced the use of negative numbers, 8 bits would have allowed us to represent numbers from 0 to 28−1 = 255.
What is the 8-bit two's complement notation of -37?
The 8-bit two's complement representation of −37 is 110110112. To find this result: Subtract 37 from 27: 128 − 37 =91. Find the binary representation of 91: 91 = 64 + 16 + 8 + 2 + 1 = 1·26 + 0·25 + 1·24 + 1·23 + 0·22 + 1·21 + 1·20 =1011011 Place 1 in the correct position to mark that we started from a negative number: −3710 = 110110112

Related calculators