This page builds every word, number, and symbol the parent note leans on — starting from "what is a byte" and ending at "what does 214 mean here". If the parent note said it without explaining it, we explain it here.
Before any protocol, there is the smallest thing a computer stores: a bit — a single switch that is either 0 or 1. Eight bits in a row make one byte.
WHY the topic needs this: every "frame header is 9 bytes", every "24-bit Length", every "one byte for a whole header" in the parent note is literally counting these bulbs. If you can't see the bulbs, those numbers are meaningless.
Figure s01 — what it shows: eight bulbs make one byte. The pattern 0110 1010 is drawn with lit bulbs = 1; each column is labelled with its place-value 27,26,…,20. Adding the lit place-values (64+32+8+2=106) shows how a row of bulbs becomes a number. Read the caption bulb by bulb before moving on.
27=128, so 7 bits hold 0 to 127.
28=256, so 8 bits hold 0 to 255 (that's 256patterns, but the biggest single number is 255).
214=16384 — this is the parent's "default max frame size" (the count of possible values; the largest is 16383).
224=16,777,216 is the number of patterns a 24-bit Length field has, so it names the values 0 to 224−1=16,777,215 — the largest single Length is 16,777,215, not 16,777,216.
231 ≈ 2.1 billion — the number of Stream IDs (we'll meet these below).
Recall Why is the max value
2N−1 and not 2N?
Because we include 0 as a valid pattern ::: with N bits you get 2N patterns numbered 0,1,…,2N−1, so the largest single number is 2N−1.
HTTP/1.1 is a text protocol: it literally sends the letters G, E, T, a space, then the path — human-readable when printed. HTTP/2 is a binary protocol: it sends raw numbers in fixed slots, not spelled-out words.
WHY hex here: the wire is bytes, and one byte = two hex digits reads far cleaner than eight bits. Every "0x40" below is just a byte written in this shorthand.
WHY the topic needs this: the parent's whole "Text → binary framing" line rests on this distinction. Binary lets HTTP/2 pack a whole header line into one byte (Section 4 of the parent) — impossible with spelled-out text. And without a fixed byte order, two machines would read the same Length or Stream ID as two different numbers, so every field diagram below assumes big-endian, most-significant-byte-first.
The parent's HPACK section uses three bits of math notation without defining them. Here they are.
WHY the topic needs this: the parent's prefix-integer trick emits (I' mod 128) + 128 and updates I' ← floor(I'/128). That is exactly "leftover eggs into a 7-bit carton, then count the full cartons," repeated until nothing is left. We verify the parent's example below.
Figure s02 — what it shows: the three output bytes for 1337 as coloured boxes, left to right: the prefix 31 (blue, "full, I overflowed"), then 154 (orange, 26 + 128, its continuation flag on), then 10 (green, last byte). Arrows carry the working value I′ from box to box, and the bottom line reproduces the arithmetic 1306=10×128+26. Trace the arrows to seeI′ shrinking.
A Stream ID is just a whole number written into 31 bits of the frame header. It is the label that says "this chunk belongs to conversation number 3."
WHY the topic needs this: multiplexing (parent §3) reassembles interleaved chunks by this label. Server push (parent §5) reserves an even ID so a pushed resource can't clash with a client request. And the parent's SETTINGS frame has to live somewhere — it lives on stream 0, the connection-wide channel. The 31-bit size gives 231 possible labels — plenty.
Now we can read the parent's frame formula symbol-by-symbol. A frame is a fixed 9-byte header followed by a payload.
Figure s03 — what it shows: the 9-byte header drawn as a single left-to-right strip, each field a coloured box whose width is proportional to its bit-count (Length widest at 24, Stream ID next at 31, R a sliver at 1). Labels under each box give the bit-count; call-out arrows mark "no more than 214 by default" on Length and "odd = client, even = server push, 0 = connection" on Stream ID. The strip is the byte layout you'd see on the wire.
WHY the topic needs this: every higher idea is a stream of these frames. A message (request or response) = one HEADERS frame + zero or more DATA frames sharing one Stream ID. Multiplexing = interleaving frames of different Stream IDs on one connection.
HTTP/2 does not touch the wire directly; it rides on top of two lower layers the parent assumes you know.
WHY the topic needs this:
The parent's "one handshake vs six" is a claim about TCP+TLS RTTs: T2≈1×(TCP RTT+TLS RTTs) vs T1.1≈6× that.
The famous "TCP-level head-of-line blocking still exists" mistake is because TCP insists on in-order bytes — one lost packet stalls every stream. That's why HTTP-3-and-QUIC switches transports.
Recall Why can multiplexing remove application HOL blocking but not transport HOL blocking?
Streams are independent at the HTTP layer, but they all share one TCP byte-stream ::: TCP delivers bytes strictly in order, so one lost packet forces every stream to wait for the retransmission — a transport-level stall HTTP/2 can't dodge.
HPACK (parent §4) stitches together three ideas that each have their own vault note. None is new machinery invented for HTTP/2 — HPACK just combines them, so meeting each one now makes the parent's §4 read as assembly rather than magic.
Figure s04 — what it shows: one header field entering HPACK and taking one of two forks. Fork A (green, "already known") → a varint index number → tiny output. Fork B (orange, "new literal") → Huffman-coded characters → small output. A red guard box labelled "fixed table, no adaptive mixing" sits across both forks with the caption "blocks CRIME length-leak." Follow whichever fork applies to see which tool does the shrinking.
WHY the topic needs this: without Huffman you can't explain "literal header encoded in fewer bits"; without varint you can't read the index bytes; without the CRIME idea you can't explain why the parent insists "HPACK is not just gzip."
The map below reads top-to-bottom: an arrow X→Y means "you need X before Y makes sense." The bottom node "HTTP 2 topic" is the parent note; every other node is a foundation built on this page. Follow any path down and you retrace the order we taught these ideas.
Left branch (blue foundations): bit/byte → powers of two → Stream ID and frame header → multiplexing.
Transport branch: TCP in-order bytes feeds both multiplexing and the TCP HOL blocking caveat.
Right branch (compression): Huffman, varint prefix int, and the CRIME idea all feed HPACK.