Two's Complement Calculator
Choose encode or decode and enter a number or a bit string.
Zeros and ones, from 2 to 64 of them. The first bit is the sign.
Try
Result
You entered
Read as an unsigned number
Hexadecimal
Number of bits
Show the work
Place values in two's complement
In bits the leftmost bit has the place value , which is negative; every other bit has the usual positive power of .
Adding the place values of the 1 bits
Add the place value of every bit that is and ignore the zeros.
Result
So stands for .