the read-only-input and work-tape convention
Here is a puzzle. We want to talk about machines that use less memory than the size of their own input, say only O(log n) cells of scratch work for an input of n symbols. But on an ordinary single-tape machine, the input already sits on the tape and occupies n cells, so you can never count below n. It is like asking a student to take notes using less paper than the exam question is printed on, when the question and the notes share the same sheet. The fix is to give them a separate scratch pad.
The convention is to use a machine with two kinds of tape. There is one read-only input tape: the input is written there and the head may move across it and read symbols, but it may never overwrite them. Then there are one or more read/write work tapes, initially blank, where the machine does all its scribbling. Space complexity is then defined as the number of work-tape cells used, completely ignoring the input tape (and any write-only output tape, when present). Suddenly sublinear bounds make sense: a machine can read its long input while keeping only a few work cells, so classes like L (log space) become meaningful.
This is the standard setup behind L, NL, and every sublinear space class. The point is that reading is free of memory cost, only remembering costs space. A log-space machine cannot copy its whole input into work memory (that would need n cells), so it must process the input by repeatedly scanning it, holding only a constant number of pointers and counters. Caveat: this convention only changes the picture for sublinear space; for polynomial space and above, whether you charge for the input tape makes no difference, since you already have room to spare.
To decide whether the number of 1s in the input equals the number of 0s, a machine scans the read-only input tape and keeps a single counter (a difference) on its work tape. That counter never exceeds n, so it fits in about log n work cells: O(log n) space, even though the input itself is n cells long.
Only work-tape cells are charged; the read-only input tape is free, so sublinear space becomes possible.
This convention matters only for sublinear space (L, NL). For polynomial space and beyond, charging the input tape changes nothing, since the bound already exceeds n.