6. If $a=\frac{1}{2}$, then the integer part of the algebraic expression
$$
\frac{1}{1+a}+\frac{2}{1+a^{2}}+\frac{4}{1+a^{4}}
$$

is ( ).
(A) 6
(B) 8
(C) 10
(D) 12
6. A.

Notice that,
$$
\begin{aligned}
& \frac{1}{1+a}+\frac{2}{1+a^{2}}+\frac{4}{1+a^{4}} \\
= & \frac{1}{1-a}+\frac{1}{1+a}+\frac{2}{1+a^{2}}+\frac{4}{1+a^{4}}-\frac{1}{1-a} \\
= & \frac{8}{1-a^{8}}-\frac{1}{1-a}=6+\frac{8}{255} .
\end{aligned}
$$