Number Systems & Bases
The problem
Computers store and manipulate everything as sequences of bits, but humans think in base 10. Positional number systems give a precise way to translate between how machines represent quantity (base 2, base 16) and how people do — a translation every lower-level concept in computing assumes you can already do.
Why now
Sets and logic explain how to reason about membership and truth, but say nothing about how quantity is represented positionally. Nothing earlier in the graph provides this — it is foundational machinery, not a consequence of what came before.
Mental model
A number system is an agreement about what each digit position is worth: base 10 uses powers of 10, base 2 powers of 2, base 16 powers of 16. Converting between bases is the same operation — repeated division and remainder, or grouping bits by 4 for hex — wearing different clothes each time.
Unlocks
- Bit ManipulationComputer Science Fundamentals
- Numbers & Floating PointJavaScript Runtime
- Modular ArithmeticMathematical Thinking
- IP Addressing & RoutingNetworking
- Buffers & Binary DataNode.js Internals
- Virtual MemoryOperating Systems
- Types & ValuesProgramming Fundamentals
- Arrays & ListsProgramming Fundamentals
- Strings & TextProgramming Fundamentals
Parallel
Used in
- Binary and hex literals, bitwise operators in every language
- IP addressing and subnetting (binary math)
- Color codes in CSS (#RRGGBB is base-16)
- Two's-complement integer representation in hardware
Projects
- Write a base converter (decimal ↔ binary ↔ hex) without using built-in parseInt/toString
- Manually derive the two's-complement representation of -1 through -5 as 8-bit signed integers
Examples
- 0xFF is 255: F×16¹ + F×16⁰
- A /24 subnet mask (255.255.255.0) is 24 binary ones followed by 8 zeros
Resources
Mastery checklist
- I can convert a number between base 10, base 2, and base 16 by hand
- I can explain what each digit position 'is worth' in an arbitrary base
- I can read an IPv4 subnet mask as a binary bit pattern
- I can explain two's complement and why it lets subtraction reuse addition hardware