Why a computer counts in twos, not tens
From the earlier rungs you know a computer is built out of switches — tiny transistors that are either on or off, conducting or not. A switch has exactly two reliable states, and asking it to hold ten distinct voltage levels for the digits 0 through 9 would be like asking someone to tell ten shades of grey apart in a dim room: doable in theory, fragile and error-prone in practice. So we use only two states, and we name them 0 and 1. Each such on-or-off answer is one bit, the atom of all information.
Base two is not a different kind of arithmetic, just a different number of fingers. In our everyday base ten each place is worth ten times the one to its right: 1, 10, 100, 1000. In binary each place is worth twice the one to its right: 1, 2, 4, 8, 16, and so on — the powers of two. The binary number 1011 means one 8, no 4, one 2, and one 1, which is 8 + 2 + 1 = 11. Reading binary is exactly the grade-school place-value idea you already trust, with the multiplier swapped from ten to two.
Bits, bytes, and words
A single bit holds almost nothing — yes or no, on or off. Real data needs bits grouped together. The standard bundle is eight bits, called a byte, holding one of 2^8 = 256 patterns. A byte is the smallest chunk most machines will hand you individually; it is the unit your memory is addressed in, and it is just large enough to hold one ordinary character of text, which is no accident. Above the byte sits the word — the natural gulp of bits a particular processor likes to chew at once, typically 4 bytes (32 bits) or 8 bytes (64 bits) on modern machines.
These three sizes — bit, byte, and word — are the rulers you will measure everything with from here on. The word size is one of a processor's deepest traits: it sets how big an address can be (and thus how much memory the machine can name), and how wide its registers and adder are. That is why people talk about a 32-bit versus 64-bit machine — the difference is the width of the word, and with it the size of the world the processor can directly point at. We will not chase that thread further now; just hold the three rulers.
Hexadecimal: shorthand for tired humans
Binary is honest but exhausting to read: a single 32-bit word is thirty-two 0s and 1s, easy to miscount. Hexadecimal — base sixteen — is the cure. It uses sixteen digits: 0 through 9, then A, B, C, D, E, F for the values ten through fifteen. The magic is that sixteen is two to the fourth power, so each hex digit packs exactly four bits with no remainder. Hex is not a different way of storing numbers; the bits in the machine are unchanged. It is purely a friendlier notation for the same bits, the way 'a dozen' is friendlier than 'twelve ones'.
Because four bits map to one hex digit, converting between binary and hex is no arithmetic at all — just regrouping. Slice the binary into nibbles (groups of four bits) starting from the right, and read each nibble off a tiny table you will soon memorize. The pattern 1111 is F, 1010 is A, 0000 is 0. To make hex unambiguous in writing, we tag it with a 0x prefix, so 0x1F is hex, while plain 31 stays decimal.
binary: 1011 1110 1110 1111 nibbles: 1011 1110 1110 1111 hex: B E E F result: 0xBEEF (= 48879 in decimal) handy reference: 0000=0 0100=4 1000=8 1100=C 0001=1 0101=5 1001=9 1101=D 0010=2 0110=6 1010=A 1110=E 0011=3 0111=7 1011=B 1111=F
Converting between bases, by hand
Two directions of base conversion are worth owning cold. Binary-to-decimal is just adding up the place values where a 1 sits — for 1011, that is 8 + 2 + 1 = 11. The reverse, decimal-to-binary, uses repeated division: divide by two over and over, and the remainders, read bottom to top, spell the binary digits. The reason is the same place-value logic running backwards: each division by two peels off the rightmost bit as a remainder.
- Take the decimal number, say 13. Divide by 2: 13 / 2 = 6 remainder 1.
- Divide the quotient again: 6 / 2 = 3 remainder 0; then 3 / 2 = 1 remainder 1; then 1 / 2 = 0 remainder 1.
- Stop when the quotient hits 0. Read the remainders from last to first (bottom to top): 1, 1, 0, 1.
- That is 1101, which is 8 + 4 + 1 = 13. Check by going back to decimal to be sure the round trip agrees.
Notice you never have to pass through decimal to move between binary and hex — that detour only invites mistakes. Group the bits into nibbles and you are done. And when these are unsigned integers (plain counts with no minus sign), n bits cover 0 to 2^n - 1 and nothing outside. That ceiling is real: push past it and the number wraps around, a hazard the very next guides on two's complement and overflow take head on. For now, the skill to walk away with is moving fluidly between base two, base ten, and base sixteen.
Bits are not just numbers
Here is the quiet, profound idea that the rest of this rung depends on: a pattern of bits has no built-in meaning. The byte 0x41 is 65 if you read it as an unsigned number, the letter 'A' if you read it as text, and a particular shade of dark red if you read it as part of a colour. Nothing in the bits themselves says which. Meaning lives entirely in the agreement — the convention — between whoever wrote the bits and whoever reads them. This is the deepest reason binary is enough for everything: numbers, letters, sound, images all become the same alphabet of 0s and 1s, distinguished only by how we agree to interpret them.
This connects straight to the layers of abstraction from the foundations rung. Down at the bottom the hardware shuffles featureless bit patterns; the meaning — number, character, instruction, address — is imposed by the layers above, by the conventions baked into the instruction set, the compiler, and the program. The same machinery that adds two unsigned counts can, with a different agreed reading of the very same bits, add two signed numbers — which is exactly the elegant trick the next guide builds with two's complement.