Binary is a number system that uses two symbols, 0 and 1, and it is the foundation of all digital computing. Computers store and process information as patterns of these two values because electronic and optical components can represent two stable states, for example high or low voltage, magnetised in one direction or the other, or light on or off. Each position in a binary number has a weight that is a power of two, so the value 1101 in binary equals 13 in decimal because it is 8 + 4 + 0 + 1. The smallest unit is a bit, which can be 0 or 1. Eight bits form a byte, which can represent values from 0 to 255 and is commonly used to encode characters, colours and small integers.
All software and data reduce to binary patterns. Text is stored using character encodings that map each symbol to a byte value. Images, audio and video are sequences of bytes arranged according to a file format. Program instructions are machine code, which the processor reads as binary operations. Arithmetic, comparisons and decisions inside the CPU are performed with logic that combines bits using and, or and not. Because binary is so simple to store, copy and test for errors, it allows computers and networks to be fast, reliable and scalable.