Concept:
A Geometric Progression (G.P.) is a sequence in which each term is obtained by multiplying the previous term by a constant ratio $r$.
Key formulas:
• $n^{\text{th}}$ term: $a_n = a \cdot r^{n-1}$
• Sum of first $n$ terms (for $|r|<1$):
\[
S_n = \frac{a(1 - r^n)}{1 - r}
\]
Step 1: Identify $a$ and $r$.
Given G.P.:
\[
1, \; \frac{1}{2}, \; \frac{1}{4}, \ldots
\]
Thus,
\[
a = 1, r = \frac{1}{2}
\]
Step 2: Write the sum formula.
\[
S_n = \frac{1\left(1 - \left(\frac{1}{2}\right)^n\right)}{1 - \frac{1}{2}}
\]
\[
= \frac{1 - \left(\frac{1}{2}\right)^n}{\frac{1}{2}}
\]
Step 3: Simplify the expression.
Dividing by $\frac{1}{2}$ is equivalent to multiplying by 2:
\[
S_n = 2\left(1 - \left(\frac{1}{2}\right)^n\right)
\]
\[
= 2 - 2\left(\frac{1}{2}\right)^n
\]
\[
= 2 - \frac{2}{2^n}
\]
\[
= 2 - \frac{1}{2^{n-1}}
\]
Step 4: Use the given sum.
\[
2 - \frac{1}{2^{n-1}} = \frac{1023}{512}
\]
Step 5: Express 2 with denominator 512.
\[
2 = \frac{1024}{512}
\]
So,
\[
\frac{1024}{512} - \frac{1}{2^{n-1}} = \frac{1023}{512}
\]
Step 6: Solve for $n$.
\[
\frac{1}{2^{n-1}} = \frac{1024 - 1023}{512}
\]
\[
= \frac{1}{512}
\]
\[
2^{n-1} = 512
\]
Step 7: Convert 512 into power of 2.
\[
512 = 2^9
\]
Thus,
\[
2^{n-1} = 2^9
\]
\[
n - 1 = 9
\]
\[
n = 10
\]
Final Answer:
\[
\boxed{10}
\]