Before you can even ask "big-endian or little-endian?", you must already be fluent in a small pile of ideas that the parent note quietly assumes: what a bit is, what a byte is, what an address is, what significance means, and what that scary-looking 256k actually counts. This page builds every one of them from nothing, in order, each on top of the last.
We need the bit because it is the atom of all digital storage. Everything above — bytes, numbers, addresses — is just a group of bits with an agreed meaning.
Figure 1 shows two switches side by side: the teal one down (value 0, off) and the orange one up (value 1, on). Read it as the visual definition of a bit — only two states exist, with nothing in between.
Figure 1 — A bit is one switch: down = 0 (off), up = 1 (on). No third option.
Why 256? Each of the 8 bits doubles the number of patterns: 2×2×… (eight times) =28=256. Look at the strip of 8 switches below — every distinct arrangement is one value.
The byte matters because it is the smallest chunk memory actually hands you. You never fetch a single bit from memory; you fetch whole bytes. This is exactly why endianness exists — a big number must be split into bytes, not bits.
Figure 2 draws one byte as a row of 8 coloured switches set to the pattern 00010010. Orange switches are 1, teal are 0; below each you see its bit number (7 on the far left down to 0 on the far right, matching the numbering just defined). That exact pattern is the value we will meet again as 0x12. Use the figure to see that "one byte = eight ordered on/off cells".
Figure 2 — One byte = 8 ordered bits, numbered 7 (leftmost, worth 2⁷) down to 0 (rightmost, worth 2⁰). The pattern 00010010 shown here is the value 0x12 (decimal 18).
Why does two hex digits equal one byte? Because 16×16=256 — exactly the number of patterns in a byte. One hex digit covers one nibble (4 bits), so two hex digits cover both nibbles (8 bits).
We need hex because the parent note writes values like 0x12345678 — that's just 4 bytes (12, 34, 56, 78), each a pair of hex digits. Hex makes the byte boundaries visible at a glance.
For 0x12345678, the 12 on the far left is the MSB (worth the most) and the 78 on the far right is the LSB (worth the least). This ordering is the whole reason "big end" vs "little end" even means something.
Figure 3 stacks the four bytes of 0x12345678 as bars whose height is their significance: the tall orange 0x12 (weighted by 2563) down to the short 0x78 (weighted by 2560). The arrow across the top reminds you significance decreases as you move right toward the LSB.
Figure 3 — The four bytes of 0x12345678 ranked by significance: MSB 0x12 (×256³) is worth most, LSB 0x78 (×256⁰) worth least.
Why exactly 256k and not something else? Because each byte contributes 8 bits, and 28=256. Stacking k bytes below a byte multiplies that byte's value by 256 exactly k times — that is 256k. Note 2560=1 (any number to the power 0 is 1), so the LSB is weighted by 1: it truly is the "ones" byte.
The parent's key formula is bk=⌊V/256k⌋mod256. Two new symbols appear here; both answer a precise question.
Why these two, and why together? To grab byte number k you need to (1) shift away the k bytes below it, then (2) keep only the single byte on the bottom:
Dividing by 256k slides byte k down to the "ones" position — but leaves higher bytes stuck on top. floor cleans off any fractional leftovers so we have a clean whole number.
mod 256 then chops off everything above the bottom byte — because 256 is exactly one byte's worth of values.