See also [Binary stars]?, Optical binary.
Base two: a number representation consisting of zeroes and ones. It is used by practically all computers because of its ease of implementation using digital electronics and Boolean algebra.
As in all place-based number systems, the location of each digit is significant. The right most digit (or the first digit to the left of the decimal point if the number contains a decimal point) corresponds to the ones-place (20 = 1) and the value represented by that digit is simply the digit (1 or 0) multiplied by 1. The digit to the left of the one-place corresponds to the 21-place, so that digit represents (1 or 0) multiplied by 21. The next digit corresponds to 22 (= 4) and so on. Digits to the right of the decimal place correspond to 2-1, 2-2, ...
To obtain the Decimal equivalent of a binary number, simply multiply the various digits by their appropriate place-values and add the results together. For example:
To convert from an integer decimal number to its binary equivalent, divide the number by two and place the remainder in the ones-place. Divide the result by two and place the remainder in the next place to the left. Continue until the result is zero. For example:
Operation | Remainder | Result |
---|---|---|
118/2 = 59 | 0 | 0 |
59/2 = 29 | 1 | 10 |
29/2 = 14 | 1 | 110 |
14/2 = 7 | 0 | 0110 |
7/2 = 3 | 1 | 10110 |
3/2 = 1 | 1 | 110110 |
1/2 = 0 | 1 | 1110110 |
giving a final result of 1110110.
See also Register, Decimal, Hexadecimal, Octal, Floating point.