Binary

Binary is a base 2 number system. It is called base 2 because there are only 2 digits: 0 and 1. Decimal also has the digits 0 and 1, so a subscript "(2)" is usually added to binary numbers to not confuse people.

Computers work in binary, because it is the simplest way to store information using electricity. A wire can be powered on to represent a 1, or powered off to represent a 0. Large sets of binary numbers can be used by computers to represent other types of information, such as text, songs, or videos. 

 Number system 

When being introduced to binary numbers, it helps to go back and think about how decimal numbers work. A single-digit number can only go from 0 to 9, and people often need to use larger numbers than that. So, we add another digit, and say that it counts tens instead of ones. Another digit counts hundreds, then another counts thousands, and so on.

Binary is the same. A single-digit number can only go from 0 to 1, so we add another digit that counts twos instead of ones, then another that counts fours, then eights, and so on.

For example, let's look at the number 1101 in decimal and binary. In decimal, the number means "add one thousand, one hundred, one". In binary, the number means "add one eight, one four, one". Therefore, 1101 in binary is equal to 13 in decimal.

 Computers 
All computers use binary at the lowest level. Most hard memory, like compact discs and DVDs, use binary to represent large files.

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. 

Category:Computer science
Category:Mathematics
Category:Encodings