Binary
Also known as: base 2, binary numbers
Binary is a base-2 number system that uses only two digits, 0 and 1, to represent all values. Binary is the fundamental language of all digital computers.
๐ก Intuition
Counting with only two states: on/off, yes/no, 0/1. Each extra digit doubles the count.
Core Idea
Computers use binary because electronic switches have exactly two states: on (1) or off (0).
Formal View
๐ฌ Example
๐ฏ Why It Matters
Binary is the fundamental language of all digital computers. Every file, image, video, and program is ultimately stored as sequences of 0s and 1s. Understanding binary is essential for grasping how computers store numbers, perform arithmetic, and encode information.
โ ๏ธ Common Confusion
Each position is a power of 2 (1, 2, 4, 8 ...). Reading right-to-left: position 0 = 1, position 1 = 2, etc.
๐ญ Hint When Stuck
When converting binary to decimal, write the powers of 2 above each digit from right to left (1, 2, 4, 8, 16, \ldots). Then multiply each binary digit by its power and add the results. To convert decimal to binary, repeatedly divide by 2 and record the remainders from bottom to top.
Related Concepts
Next Steps
How Binary Connects to Other Ideas
Once you have a solid grasp of binary, you can move on to bits bytes and data representation.
Go Deeper
Frequently Asked Questions
What is Binary in CS Thinking?
Binary is a base-2 number system that uses only two digits, 0 and 1, to represent all values. Each digit position represents a power of 2, and computers use binary because electronic circuits have exactly two states: on and off.
Why is Binary important?
Binary is the fundamental language of all digital computers. Every file, image, video, and program is ultimately stored as sequences of 0s and 1s. Understanding binary is essential for grasping how computers store numbers, perform arithmetic, and encode information.
What do students usually get wrong about Binary?
Each position is a power of 2 (1, 2, 4, 8 ...). Reading right-to-left: position 0 = 1, position 1 = 2, etc.