How can computers do everything with just 0s and 1s?

Let's begin with the smallest unit of all: the bit.Because 0 and 1 are easy to show as two states, like high and low voltage, so a machine can tell them apart reliably. And each time you add one more digit to a row of 0s and 1s, the number of possible patterns doubles. So numbers, letters and colors can all be turned into rows of 0s and 1s.


The bit: the smallest unit of information
The smallest unit of information a computer handles is called a bit. According to Encyclopaedia Britannica, a bit shows the result of choosing between just two options, such as 0 or 1. The name is short for binary digit. Inside memory parts, 1 is stored as a high voltage and 0 as a low voltage.
Two states are easy to tell apart
Stanford University course notes explain that inside a chip, 0s and 1s are stored as electric charge, and on a hard drive as tiny magnetic spots pointing north or south. Britannica says binary matters for computers because 0s and 1s can be shown compactly and reliably by devices with two states, such as on-off or open-closed.
Each extra digit doubles the patterns
With just one digit, you can show 2 patterns. With two digits you get 4 patterns (00, 01, 10 and 11), and with three you get 8, doubling each time you add one. A group of eight digits is called 1 byte, and it can show 256 different patterns. Ordinary numbers work the same way: for example, 5 is written 101 in binary.

- 1The 2 patterns you can make with 1 bulb
- 2The 4 patterns with 2 bulbs
- 3The 8 patterns with 3 bulbs
- 4Using on/off combinations to show colors and pictures

Letters and colors are stored as numbers
Computers give numbers to letters and colors too, and handle them as rows of 0s and 1s. According to Stanford's course notes, 1 byte can store one letter, and the letter A is number 65. The color of each dot on a screen is stored as red, green and blue amounts in 1 byte each, which is why each is a number from 0 to 255.
Based on Stanford University course notes.
Simple instructions, repeated many times
The CPU, the part that does the calculating, carries out simple instructions. Stanford's course notes say that 1 line of code in the programming language Python expands into about 10 CPU instructions. By repeating simple steps with 0s and 1s very fast, many, many times, computers can do complicated jobs.
Want to know more?
- In binary, the number 10 from our everyday decimal system is written 1010 (Encyclopaedia Britannica).
- According to Stanford's course notes, the contents of a computer's working memory (RAM) are erased when the power is turned off.

Quick quiz: test yourself
Remember what you just read? Give it a try!What is the main reason computers use 0s and 1s?
Show the answer
- Two states can be shown reliably
- 0 and 1 are the smallest numbers
- It means no math is needed
Two states can be shown reliably 0 and 1 can be shown as two states, like high and low voltage, so a machine can tell them apart without mistakes.
0 and 1 can be shown as two states, like high and low voltage, so a machine can tell them apart without mistakes.
Next quiz ›Sources
- bitEncyclopaedia Britannica(ブリタニカ百科事典)
- binary number systemEncyclopaedia Britannica(ブリタニカ百科事典)
- Bits and Bytes (CS101)Stanford University(スタンフォード大学)
- CS106A Lecture 16: bits and bytes, computer hardware CPU, RAMStanford University(スタンフォード大学)
This article was written after checking the sources above as of 2026-10-03. Explanations may change as research progresses. Photo credits are shown below each photo.
Next fun fact ▶
TechnologyHow does AI translation actually translate?One tap and it turns into another language. How does AI translation do it?
40 surprising animal facts with big photos and short, easy text. A fun-facts book for kids and grown-ups to read together.
See it on Amazon

