Number Systems & Bases

Difficulty
Importance

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

Parallel

Used in

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