Let us consider the simple ask of drawing the markings on a ruler. Each inch on the ruler has a mark at the $1/2$ inch point, slightly shorter marks at $1/4$ inch intervals, still shorter marks at $1/8$ inch intervals, and so forth. Our task is to write a program to draw these marks at any given resolution, assuming that we have at our disposal a procedure $\operatorname{mark}(x,h)$ to make a mark $h$ units high at position $x$.
If the desired resolution is $1/2^n$ inches, we rescale so that our task is to put a mark at every point between $0$ and $2^n$, endpoints not included. Thus, the middle mark should be $n$ units high, the marks in the middle of the left and right halves should be $n-1$ units high, and so forth.
My questions on above text are
I do not understand how author rescaled middle mark should be $n$ units high if desired resolution is $1/2^n$ inches ?
How is the first paragraph is related to second paragraph?
Please explain with simple example like I want to mark at every point between $0$ and $8$.
Thanks for your time and help.