Number Systems and Bit Manipulation
Convert confidently between binary, hex, and decimal, understand exactly why two's complement makes negative-number arithmetic just work, master the bitwise operators with real use cases, and see IEEE 754 floating-point bits directly.
Prerequisites: comfort with basic arithmetic and any one programming language (examples use Python 3, which needs no extra install); no prior low-level programming experience needed.
Sourcing & version notes: verified against the IEEE 754-2019 standard for floating-point arithmetic (unchanged in the specific single/double-precision formats this project covers since the 2008 revision) and Python 3's built-in numeric formatting functions (bin(), hex(), oct(), the struct module), which have been stable for many Python versions. Nothing in this project depends on a fast-moving tool or spec version — binary representation and two's complement are fixed mathematical facts, not evolving standards.
A computer's memory is, at the hardware level, just an enormous number of two-state cells — on or off, 1 or 0. Every number, every character, every image, every piece of code you've ever run is ultimately some pattern of bits; the difference between them is entirely in how software agrees to interpret that pattern. This project stays at the numeric layer: how bits represent positive integers, negative integers, and fractional numbers, and the operators that manipulate bits directly rather than through arithmetic.
This matters even if you never write a line of low-level code again after this project: understanding why 0.1 + 0.2 != 0.3 in nearly every mainstream language, why integer overflow wraps the way it does, and why a permissions system might store roles as a single integer are all direct, practical payoffs of the next five steps — not academic trivia.
Binary, hex, and decimal are the same numbers, different notation
Two's complement: how negative numbers actually work
The bitwise operators, with reasons you'd actually reach for each one
Floating point: what those bits actually mean, and why 0.1 + 0.2 isn't 0.3
Secret Mission: build a bit-flags permission system and a float inspector
Before You Go
Test what you just learned
Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.
Log in to unlock0 / 7 complete
