One's complement binary calculator

Enter a binary number:
Inverse code:

The original code is a binary fixed-point representation, that is, the highest bit is the sign bit, "0" represents positive, "1" represents negative, and the remaining bits represent the size of the value.

One's complement: The one's complement of a positive number is the same as its original code; the one's complement of a negative number is the inversion of its original code bit by bit, except for the sign bit. Complement: The one's complement of a positive number is the same as its original code; the one's complement of a negative number is the addition of 1 to the last bit of its one's complement.