A bit (short for binary digit) is the smallest unit of data on a computer; each bit has a single value of either 1 or 0. Executable (ready-to-run) programs are often identified as binary files and given a file name extension of “.bin.” Programmers often call executable files binaries.
Binary numbers look strange when they are written out directly. This is because the digits’ weight increases by powers of 2, rather than by powers of 10. In a digital numeral, the digit furthest to the right is the “ones” digit; the next digit to the left is the “twos” digit; next comes the “fours” digit, then the “eights” digit, then the “16s” digit, then the “32s” digit, and so on. The decimal equivalent of a binary number can be found by summing all the digits. For example, the binary 10101 is equivalent to the decimal 1 + 4 + 16 = 21:
|DECIMAL = 21||64||32||16||8||4||2||1|
|BINARY = 10101||0||0||1||0||1||0||1|