This page drills the counting and constraint maths behind Flash memory (NOR vs NAND) : bits-per-cell, density ratios, write-amplification arithmetic, endurance budgets, and the "you can't flip one bit" corner cases. We build each number from zero — no formula is used before it is earned.
Before we start, three plain-word reminders (each one is a "symbol" we will reuse):
Definition The four numbers we count with
F = feature size : the smallest line width a chip factory can print. Think of it as the width of one pencil stroke. Cell areas are measured in F 2 (a little square of that stroke width).
L = number of distinguishable threshold levels a cell's voltage window is chopped into. Each level is one "symbol" the cell can hold.
b = bits per cell = log 2 L . (log 2 L asks: "how many yes/no questions to pin down which of L levels we're in?")
P/E cycle = one Program-then-Erase of a block. Endurance = how many of these a block survives.
log 2 and not plain division?
Each bit doubles the number of states you can name: 1 bit → 2 states, 2 bits → 4, 3 bits → 8. So states grow as 2 b . To invert that ("I have L states, how many bits?") we need the function that undoes "2 to the power of" — that is log 2 . No other tool answers "which exponent gives this?"
Every flash-arithmetic problem you will meet falls into one of these cells. The worked examples below are tagged with the cell they cover.
#
Case class
Degenerate / edge form
Example
A
Bits from levels (b = log 2 L )
L = 2 (SLC, one bit), L not a power of 2
Ex 1, Ex 2
B
Density ratio (NOR vs NAND area)
equal process F
Ex 3
C
Combined density (area × bits/cell)
SLC-NOR vs QLC-NAND extreme
Ex 4
D
Write amplification (edit one byte)
1 byte changed → whole block
Ex 5
E
Endurance budget (writes before wear-out)
worst case, no wear leveling
Ex 6, Ex 7
F
Real-world word problem (SSD lifetime)
daily writes over years
Ex 7
G
Exam twist / trap (charge = 0, not 1)
zero charge = erased = 1
Ex 8
Worked example Ex 1 — Cell A: bits from an SLC cell (the degenerate case)
An SLC cell splits its threshold window into L = 2 levels. How many bits?
Forecast: guess before reading — is it 1, 2, or "log of something"?
Write down the rule. b = log 2 L . Why this step? Bits count the yes/no questions needed to name which level we're in.
Substitute L = 2 . b = log 2 2 . Why this step? SLC = Single-Level Cell = two states (charged / empty), the smallest non-trivial L .
Evaluate. log 2 2 = 1 because 2 1 = 2 . Why this step? "2 to what power gives 2 ?" → 1 .
b = log 2 2 = 1 bit.
Verify: two states genuinely need exactly one bit (0 or 1) to distinguish — no over/under-counting. ✅
Worked example Ex 2 — Cell A edge: a level count that is NOT a power of 2
A hypothetical cell reliably resolves L = 6 threshold levels. How many whole bits can it safely store?
Forecast: log 2 6 ≈ 2.58 — but you can't store a fraction of a bit in a robust code. Round which way?
Compute the raw value. log 2 6 = ln 2 ln 6 ≈ 2.585 . Why this step? log 2 x = ln x / ln 2 lets us evaluate any base-2 log with a normal calculator.
Round DOWN. Usable whole bits = ⌊ log 2 6 ⌋ = 2 . Why this step? To store b full bits you need 2 b clean levels; 2 3 = 8 > 6 , so 3 bits won't fit, but 2 2 = 4 ≤ 6 fits.
b usable = ⌊ log 2 6 ⌋ = 2 bits.
Verify: 2 2 = 4 ≤ 6 ✅ and 2 3 = 8 > 6 ✅ — so 2 is the largest safe integer. This is exactly why real NAND targets L = 2 , 4 , 8 , 16 (clean powers of two): no levels wasted.
Worked example Ex 3 — Cell B: density ratio on the same process
On one process (F identical for both), how many more cells fit in NAND vs NOR? Use A NAND ≈ 4 F 2 , A NOR ≈ 10 F 2 .
Forecast: smaller cell = more per area. Guess the multiplier.
Divide the areas. A NAND A NOR = 4 F 2 10 F 2 . Why this step? "How many small cells fill the space of one big cell" is a ratio of areas — the F 2 units cancel, leaving a pure number.
Cancel F 2 . = 4 10 = 2.5 . Why this step? Same process ⇒ same F ⇒ it divides out. The answer is process-independent.
A NAND A NOR = 2.5 × .
Verify: look at the red NAND string in the figure — no per-cell bit-line contact, unlike the NOR cell's contact stub. Fewer contacts ⇒ smaller ⇒ ~2.5× denser. Units: F 2 / F 2 = dimensionless ✅.
Worked example Ex 4 — Cell C: combined density, the extreme corners
Compare SLC NOR (worst density) against QLC NAND (best density) on the same process. How many raw bits per unit area does NAND win by?
Forecast: multiply the area advantage by the bits-per-cell advantage.
Area advantage (from Ex 3): 2.5 × more cells. Why this step? Sets how many cells share the silicon.
Bits-per-cell advantage. SLC = 1 bit, QLC = log 2 16 = 4 bits. Ratio = 4/1 = 4 . Why this step? 2 4 = 16 so QLC stores 4 bits — four times SLC's payload per cell.
Multiply the two independent gains. 2.5 × 4 = 10 . Why this step? Cells-per-area and bits-per-cell are separate factors, so total bits-per-area is their product.
NAND advantage = 2.5 × 4 = 10 × .
Verify: cross-check with the parent's Ex 2 (TLC gave 2.5 × 3 = 7.5 × ). QLC's extra bit lifts 7.5 to 2.5 × 4 = 10 — consistent and larger, as expected. ✅
Worked example Ex 5 — Cell D: write amplification, changing one byte
A 256 KB block holds 4 KB pages. You change 1 byte . How many bytes must actually be erased+rewritten in the naive "read-modify-write the block" scheme, and what is the write-amplification factor (WAF)?
Forecast: you touched 1 byte — but flash erases whole blocks. Guess how many real bytes move.
Recall the constraint. You can set bits 1 → 0 per page, but 0 → 1 needs a block erase . Why this step? Editing a byte in place may need some 0 → 1 flips, which are impossible without erasing the enclosing block.
Count block size in bytes. 256 KB = 256 × 1024 = 262144 bytes. Why this step? The whole block is read to RAM, erased, and rewritten.
Compute WAF. WAF = logical bytes changed physical bytes written = 1 262144 . Why this step? WAF measures how much the drive actually writes per byte you asked to change — the intrinsic tax of NAND.
WAF = 1 262144 = 262144.
Verify: in the figure, the single red byte forces the entire grey block to cycle. Sanity: WAF ≥ 1 always (you write at least what you asked); here it is enormous, which is exactly why controllers batch writes and remap instead of editing in place. ✅
Worked example Ex 6 — Cell E: raw endurance budget (no wear leveling)
A TLC block survives 3 , 000 P/E cycles. If a hot file keeps hammering one block over and over, how many rewrites of that file until the block dies?
Forecast: with no spreading, one block eats all the wear.
Identify the limit. Endurance = 3000 P/E cycles for this block. Why this step? Each full rewrite of the file = one erase + one program = one P/E cycle on that block.
Map rewrites to cycles. 1 rewrite = 1 P/E cycle (worst case, same block). Why this step? Without wear leveling every rewrite lands on the same silicon.
N rewrites = 3000.
Verify: dimensionally, cycles/(cycles per rewrite) = rewrites; 3000/1 = 3000 ✅. This tiny number is the reason the FTL exists — see Wear leveling and write amplification .
Worked example Ex 7 — Cells E+F: real-world SSD lifetime word problem
A 512 GB TLC SSD rated at 3 , 000 P/E cycles has ideal wear leveling (writes spread perfectly across all blocks). You write 50 GB per day. Ignoring write amplification, how many years until the flash wears out?
Forecast: total lifetime writes = capacity × cycles. Then divide by daily rate.
Total writable bytes over life. TBW = capacity × P/E cycles = 512 × 3000 = 1 , 536 , 000 GB. Why this step? Perfect wear leveling means every block can be cycled its full 3000 times, so the whole drive absorbs capacity × cycles of writes.
Days of life. 50 GB/day 1 , 536 , 000 GB = 30 , 720 days. Why this step? Lifetime writes divided by write rate gives elapsed time; the GB units cancel, leaving days.
Convert to years. 365 30720 ≈ 84.16 years. Why this step? 365 days = 1 year converts the answer to a human scale.
t ≈ 84.2 years.
Verify: units check — GB/day GB = days , then / ( days/year ) = years ✅. The comfortably-long life is because wear leveling exists; drop it (Ex 6 world) and one block dies in days. Real drives shrink this via write amplification (WAF > 1). See Solid State Drives (SSD) .
Worked example Ex 8 — Cell G: the inverted-convention exam trap
Trap question: "A cell has no charge on its floating gate. It reads as bit ___, and its threshold voltage V t h is (high / low)?"
Forecast: intuition screams "empty = nothing = 0". Resist it.
Apply the encoding rule. No charge ⇒ low V t h ⇒ cell conducts at read voltage ⇒ reads 1 . Why this step? Bits are read by whether the transistor turns on, not by "is there stuff inside." (See MOSFET and threshold voltage .)
State the erased convention. Erasing a block pulls charge off → all cells become V t h -low → all read 1 . Why this step? "Erased = all ones" is the standard, and programming later flips selected 1 → 0 .
no charge ⇒ low V t h ⇒ reads 1.
Verify: consistent with the parent's mistake callout ("charged = 0, erased/empty = 1"). Charge count 0 ↔ bit 1 — the convention is deliberately inverted. ✅
Mnemonic Counting shortcut
Levels double per bit: SLC 2, MLC 4, TLC 8, QLC 16. So bits = "how many times you double 1 to reach L ." Reverse of 2 b .
Recall Quick self-test
A cell resolves 5 clean levels — how many whole bits? ::: ⌊ log 2 5 ⌋ = 2 bits (since 2 2 = 4 ≤ 5 < 8 = 2 3 ).
Same-process area ratio NOR:NAND with 10 F 2 and 4 F 2 ? ::: 2.5 × .
Change 1 byte in a 256 KB block, naive scheme — bytes rewritten? ::: 262144 (the whole block).
Empty floating gate reads as which bit? ::: 1 (low V t h , conducts).