Definition
How can a computer store a song, a photo and this sentence using only 0 and 1?
Computers store all information as numbers written in binary, a system that uses only two digits, 0 and 1. Each 0 or 1 is called a bit, and a group of eight bits is a byte. Letters, colours and sounds are all turned into binary numbers.
In simple words
Inside a computer are billions of tiny switches that are either off (0) or on (1). With enough switches you can write any number. Then we agree on meanings: the number 65 can mean the letter A, a group of three numbers can mean a colour, and a long list of numbers can mean a song.
Why it matters
AI learns by working with numbers. Knowing that every photo, word and sound becomes numbers explains how a machine can 'see' or 'hear' at all, and why storage is measured in bytes, megabytes and gigabytes.
How it works
Binary works like the cards in the activity below. Each card is worth double the one to its right: 1, 2, 4, 8, 16. Turn cards face up and add their values to make any number.
| Unit | Size | Roughly holds |
|---|---|---|
| Bit | One 0 or 1 | Yes or no |
| Byte | 8 bits | One letter |
| Kilobyte (KB) | About 1,000 bytes | A short message |
| Megabyte (MB) | About 1 million bytes | A photo or a song |
| Gigabyte (GB) | About 1 billion bytes | A film |
Try it yourself
Binary cards
Flip the cards to make each target number. Face up is 1, face down is 0.
Common mistakes
- Thinking computers understand words directly. Everything is numbers underneath.
- Mixing up bits and bytes. A byte is eight bits.
- Thinking binary is a different language for each computer. It's the same 0s and 1s everywhere.
Check yourself
Summary
- Computers store everything as binary: 0s and 1s.
- A bit is one 0 or 1; a byte is eight bits.
- Letters, colours and sounds are all turned into numbers.
Finished reading?
Sources: CS Unplugged: Binary numbers