1. In the complex plane, the vertices $A, B, C$ of the right triangle $\triangle ABC$ correspond to the complex numbers $z+1, 2z+1, (z+1)^2$, respectively, with $A$ being the right-angle vertex, and $|z|=2$. Let the set $M=\left\{m \mid z^{m} \in \mathbf{R}, m \in \mathbf{N}_{+}\right\}, P=\left\{x \left\lvert\, x=\frac{1}{2^{m}}\right., m \in M\right\}$. Then the sum of all elements in the set $\boldsymbol{P}$ is $\qquad$
$$
\text { II, 1. } \frac{1}{7} \text {. }
$$

From $\overrightarrow{A B} \perp \overrightarrow{A C}$, we get
$$
\frac{(z+1)^{2}-(z+1)}{(2 z+1)-(z+1)}=\lambda i \quad(\lambda \in \mathbf{R}, \lambda \neq 0) \text {. }
$$

Solving for $z$, we get $z=-1+\lambda i$.
Since $|z|=2$, then $1+\lambda^{2}=4$, which means $\lambda= \pm \sqrt{3}$.
Therefore, $z=-1 \pm \sqrt{3} i=2\left(\cos \frac{2 \pi}{3} \pm i \sin \frac{2 \pi}{3}\right)$.
From $z^{m} \in \mathbf{R}$, we get $\sin \frac{2 m}{3} \pi=0$.
Since $m \in \mathbf{N}_{+}$, then $m=3 k\left(k \in \mathbf{N}_{+}\right)$.
Thus, the elements $x=\frac{1}{2^{m}}=\frac{1}{2^{3 k}}\left(k \in \mathbf{N}_{+}\right)$ in set $P$. Therefore, the sum of all elements in set $P$ is $\frac{1}{7}$.