The binary numeral system is positional notation with radix two. Each binary digit is zero or one, and its place value is a power of two. A one includes that weight in the sum; a zero skips it. The binary representation therefore selects and represents the integer .
To obtain those binary digits from , repeatedly use Euclidean division by two:
The remainders, in the order produced, are . Read them in reverse order to get . The final zero is the quotient that stops the conversion, not an additional leading binary digit. Starting with zero itself needs the special single-digit representation .
A useful independent check reads the binary digits from left to right. Start with and, for each binary digit , replace by . For , the intermediate values are . This reconstructs the integer without reversing a list and explains why appending a zero on the right doubles the value.
Binary is well suited to computation because each binary digit has just two possibilities. A stored bit can encode either possibility; groups of bits encode larger integers. Practical integer arithmetic can use a radix that is itself a power of two, grouping several binary digits into each stored numeral digit.[ref] A displayed negative integer, such as , uses a separate sign. A computer's particular signed storage convention is an additional encoding choice, so the displayed sign should not be confused with an extra binary place.
A binary digit is a zero or one in the base-two positional representation of an integer. The sum determines the Thue–Morse sequence and is the Hamming weight of the binary representation.
The most significant bit is the binary digit with greatest positional weight in a specified binary representation. For a positive integer written without leading zeros, it is the leading one: in , it has weight .
For a fixed-width word, the term instead denotes the leftmost position even when that bit is zero. In two's-complement signed representation, that position is the sign bit. Stating the width and whether the value is signed prevents confusing the highest position of a word with the highest nonzero bit of an integer.
The least significant bit is the binary digit in the position of weight . For a nonnegative integer , its value is , so it records parity. In it is one; in it is zero.
The phrase must be distinguished from the least significant set bit, the lowest position containing a one. For , that set bit has weight four, even though the least significant bit is zero. The distinction matters in bit masks, divisibility by powers of two, and binary arithmetic.

Articles by others on the same topic (0)

There are currently no matching articles.