In the binary numeration system, symbols representing integers less than 2 are generally represented by 1 or 0, which is one of two states with equal probability.
The number of bits in a binary bit can represent the word length of a machine word, and the amount of information contained in a binary bit is called a bit.
Extended data:
In the original code, most significant bit is used as a symbol (0 means positive, 1 means negative), and the remaining bits represent the absolute value of the value itself. The original code, complement and complement of a positive integer are all the same. The complement of a negative integer is the bit inversion of its original code except the sign bit (that is, 0 changes 1, 1 changes 0), and its complement is the last bit of its complement plus 1.
Read in a field of length w, which contains the binary bit string of the above form. Fields are not allowed to consist of space characters, and spaces before and after fields will be ignored.