Binary 101
We often hear that computers talk in binary. But what does that term mean? Well, "binary" means "relating to, composed of, or involving two things". In other words, it counts everything in base 2 rather than base 10.
What do I mean by that? Let me explain with an example. Humans tend to use base 10, which means we count using ten digits: 0 through 9. When we reach 9, the next number resets the current digit to 0 and adds a new one to the left, just like 9 turns into 10. Each place in a number represents a power of 10, and the possible values for each digit range from 0 to 9.
In a computer system that uses base 2 (binary), the count resets after just two increments. It goes from 00 to 01, and then instead of 02 (which doesn’t exist in binary), it resets by adding a new digit, becoming 10. In base 2, each digit can only be 0 or 1.
Why do computers prefer binary?
Computers' fundamental operations are based on electric signals, which can be in either of two states.
- 1 represents On, the electricity is flowing (Or full voltage)
- 0 represents Off, no electric current is flowing (Or no voltage)
Imagine if the computer had to understand more than these two states. The electric signal would then have to represent more than two states, which has been attempted with varying voltages. This is much harder to maintain accurately. But with just two states (on/off), transistors, the building blocks of modern computers, can switch quickly and reliably.
Note: Transistors are tiny electronic switches that control an electrical signal representing exactly these two states—on and off.
Binary -- the machine-readable format
Everything a computer does—processing data, storing files, or running programs—boils down to manipulating sequences of 0s and 1s (binary digits, or bits). Since binary format is the easiest and most reliable way for a computer to process and store information, everything inside a computer is ultimately represented in binary, whether it’s text, images, sound, or even complex software programs.
Even though we interact with computers using high-level programming languages, graphical interfaces, and text-based data formats, all of these are converted into binary because that’s what the computer understands.
Text is stored as numbers (e.g., ASCII or Unicode), which are internally represented as binary. Images are represented as binary pixel colour values. Programs, regardless of which high-level language they are written in, eventually get executed by a computer as a sequence of binary instructions.
In short, even though computers use binary as their internal language when talking to the outside world, they translate.