one's complement 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 code: 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 code: the complement code of a positive number is the same as its original code; the complement code of a negative number is to add 1 to the last bit of its complement code.