An associative ring $R$ is called an $E$-ring if all endomorphisms of its additive group $R^+$ are left multiplications, that is, for any $\alpha\in\mathrm{End}\,R^+$ there is $r\in R$ such that $\alpha(x)=x\cdot r$ for all $x\in R$. $E$-rings were introduced in 1973 by P. Schultz. A lot of articles are devoted to $E$-rings. But most of them are considered torsion free $E$-rings. In this work we consider $E$-rings (including mixed rings) whose ranks do not exceed $2$. It is well known that an $E$-ring of rank $0$ is exactly a ring classes of residues. It is proved that $E$-rings of rank 1 coincide with infinite $T$-ring (with rings $R_\chi$). The main result of the paper is the description of $E$-rings of rank $2$. Namely, it is proved that an $E$-ring $R$ of rank $2$ or decomposes into a direct sum of $E$-rings of rank $1$, or $R=\mathbb{Z}_m\oplus J$, where $J$ is an $m$-divisible torsion free $E$-ring, or ring $R$ is $S$-pure embedded in the ring $\prod\limits_{p\in S}t_p(R)$. In addition, we obtain some results about nilradical of a mixed $E$-ring.
Bibliography: 15 titles.