Binary is a way to show any type of data (such as numbers and text). Computers work in binary.
Binary is a number system and is known as a base 2 system because it uses two characters – 0 and 1. Decimal, the system most of the world uses for daily life, is a base 10 system – it uses 10 characters (0–9). When binary numbers are written, a subscript "(2)" is added to distinguish them from the same number in base 10.
Number system[change | change source]
When being introduced to binary numbers, it helps to go back and think about how base 10 or decimal numbers work. Consider the number 1101(10) (base 10). We identify this number as one-thousand, one-hundred, one because it has a 1 in the thousands place, a 1 in the hundreds place, and a 1 in the ones place. These "places" represent increasing powers of 10. In binary, the places represent increasing powers of two.
Because 1101 only has the digits 0 and 1, it could also be a binary number. This would be written as 1101(2). But since the places represent 8, 4, 2, and 1 instead of 1000, 100, 10, and 1, the value in base 10 would be 8 + 4 + 1 = 13(10).
For another example, the binary number 101(2) is 5 in decimal. The bit on the right is 1 and has a value of 1 (2^0). The middle bit has a value of 2 (2^1 or just 2), but it is a 0, so it is not added. The bit on the left is 1 and has a value of 4 (2^2 or 2 * 2). The bits that are 1s have values of 1 and 4. 1 + 4 = 5.
Computers[change | change source]
With computers, eight binary bits together is called a byte. The size of files is commonly measured in kilobytes or megabytes (sometimes in gigabytes). A kilobyte is 1000 bytes. A megabyte is 1000 kilobytes, a gigabyte is 1000 megabytes and a terabyte is 1000 gigabytes. Sometimes, it is easier to measure bytes in groups of 1024, since 1024 is a power of 2. There are 1024 bytes in a kibibyte, 1024 kibibytes in a mebibyte, and 1024 mebibytes in a gibibyte.
|Wikimedia Commons has media related to Binary.|