This page is a toolbox check. Before you read the parent note CAM topic note, every symbol, gate, and idea it uses gets built here from the ground up — no prior notation assumed. If a smart 12-year-old can follow line one, we did our job.
Memory — any memory — is a row of boxes. Each box holds some bits and each box has a number (its address).
Everything below exists to make that reverse arrow happen in parallel. Prerequisite ideas from Static RAM (SRAM) (how one bit is stored) sit underneath this whole page.
D — the stored bit sitting inside a memory cell (the "D" is for Data).
S — the search bit you are looking for (the "S" is for Search).
Why give them different letters? Because the entire job of a CAM cell is to ask "is my stored D the same as your incoming S?" — we must be able to name the two things we compare.
There are only four possible pairs of (D,S). Let's tabulate whether they agree:
D
S
agree?
0
0
✅ yes
0
1
❌ no
1
0
❌ no
1
1
✅ yes
Two useful signals fall right out of this table, and they are exact opposites of each other.
Why do we need both? A row matches only when every bit agrees. Later we'll see it's cheaper in hardware to hunt for disagreement (XOR) and let any single disagreement veto the match — so XOR is the workhorse, and XNOR (D⊙S) is the tidy way to write "this bit agrees."
The subscript i is just a counter naming the bit position: D0 is bit 0, D1 is bit 1, and so on. In a full array we add a second subscript r for the row: Dr,i = the i-th bit of the word stored in row r.
That double-equals in the parent's formula is not magic; it is one rule.
Apply it to the match line:
⋁i(Di⊕Si)=⋀i(Di⊕Si)=⋀i(Di⊙Si)
Read left to right: "NOT (any bit mismatches)" becomes "every bit does-not-mismatch" becomes "every bit is equal." That last equality uses D⊕S=D⊙S — NOT-XOR is XNOR. This is the single most important algebraic move in the whole topic, and it comes straight from Boolean Algebra & De Morgan's Laws.
Read it: "bit i counts as matched if it is masked (Mi=1), or if it genuinely equals the search bit." A memory built from these — where each cell stores 0, 1, or X — is a Ternary CAM (TCAM), the engine behind Longest Prefix Matching in routers.