Step 1: Write the rows of the matrix.
The given matrix is
\[
A=
\begin{bmatrix}
1 & -1 & 0 & -2
-4 & 4 & 0 & 8
-2 & 1 & 2 & 4
\end{bmatrix}
\]
Let the rows be
\[
R_1=[1,-1,0,-2],
\]
\[
R_2=[-4,4,0,8],
\]
and
\[
R_3=[-2,1,2,4].
\]
Step 2: Check linear dependence of rows.
Observe that
\[
R_2=-4R_1.
\]
So, the second row is a scalar multiple of the first row.
Therefore, \(R_1\) and \(R_2\) are linearly dependent.
Step 3: Check whether \(R_3\) is dependent on \(R_1\).
If \(R_3\) were a scalar multiple of \(R_1\), then there would exist a real number \(k\) such that
\[
R_3=kR_1.
\]
From the first entry,
\[
-2=k(1),
\]
so
\[
k=-2.
\]
Then from the second entry,
\[
1=k(-1)=(-2)(-1)=2,
\]
which is false.
Therefore, \(R_3\) is not a scalar multiple of \(R_1\).
Step 4: Determine the rank.
Since \(R_2\) depends on \(R_1\), but \(R_3\) is independent of \(R_1\), there are exactly two linearly independent rows.
Hence, the rank of the matrix is
\[
2.
\]
Step 5: Final conclusion.
Therefore,
\[
\boxed{2}
\]