🔢Binary Number System
Also known as Binary, Base 2, Base-2, Binary Number
A way of writing numbers with only 0 and 1. Computers use it inside.
Think of it like
Think of it like a row of light switches. Each one is either off or on.
Example
Emma writes 5 in binary as 101: one 4, no 2 and one 1. In Python, bin(5) gives the same answer.
Why it matters
All that a computer stores, from text to photos, is binary deep down.
Definition
Example code
python
>>> bin(5)
'0b101'
>>> int('101', 2)
5Common mistake
Key takeaways
- 1Two digits. Only 0 and 1.
- 2Each place doubles. 1, 2, 4, 8 and on.
- 3Off or on. Why computers use it.