What Is Binary Code? Explained for Kids

Computers show photos, play songs, and run games. Yet deep inside the machine, a great deal of this information is represented using just two symbols: 0 and 1. This way of writing information is called binary.
Why use only two symbols?
Picture a light switch. It can be off or on. Electronic circuits contain tiny components that can represent two distinguishable states. We can call one state 0 and the other 1. By arranging lots of these simple states together, computers can represent very complicated information.
A single binary digit is a bit. Eight bits make a byte. Bits are information; they are not tiny printed zeros stored inside the computer.
Counting in binary
In everyday decimal counting, a digit's position can mean ones, tens, or hundreds. Binary works in a similar way, but its positions represent powers of two: 1, 2, 4, 8, 16, and so on.
Take the four-bit number 1011. From left to right, its positions are worth 8, 4, 2, and 1:
- 1 in the 8s place means 8.
- 0 in the 4s place means 0.
- 1 in the 2s place means 2.
- 1 in the 1s place means 1.
Add them: 8 + 0 + 2 + 1 = 11. So binary 1011 is the decimal number eleven.
How can zeros and ones become letters?
Computers use agreed-upon encoding systems to connect patterns of bits to characters. For example, in ASCII, the decimal number 65 represents the uppercase letter A, and its eight-bit binary form is 01000001.
Many languages and symbols use more complex character encodings, such as Unicode with UTF-8. There is no single eight-bit pattern for every possible character in the world.
What about pictures and sound?
A digital picture is made of tiny units called pixels. Numbers describe their colors or brightness. Those numbers can be stored as bits. Digital audio can also be represented as numbers describing samples of sound. The computer uses software and hardware to turn the stored patterns into pictures you can see and sounds you can hear.
Binary is the foundation, but the whole process involves formats, encodings, and instructions too.
Try it: four-bit number cards
Make four paper cards labeled 8, 4, 2, and 1. Put them in a row. A card face up counts as 1; face down counts as 0. Try to make the number 6. You should turn the 4 and 2 cards face up, making 0110.
Can you make 9? How about 15? What is the biggest number four bits can represent without using extra rules? Answer: 15, with 1111.
Quick questions
Does binary mean every computer program is written with visible zeros and ones? No. People often write code in languages that tools translate into instructions the computer can run.
Is a byte always one letter? No. The number of bytes used for a character depends on its encoding.
Are computer pictures really tiny numbers? Yes. They are made from numbers that software interprets as image information.
Keep exploring
Read How Do Computers Work for Kids? and What Is Coding? Explained for Kids. Explore chips, memory, and storage in the How Computers Work for Kids illustrated guide.