We study two-digit attractors (2-attractors) in $\mathbb{R}^d$, which are self-affine compact sets defined by two affine contractions with the same linear part. They have widely been studied in the literature under various names (integer self-affine 2-tiles, twindragons, two-digit tiles, 2-reptiles and so on) due to many applications in approximation theory, in the construction of multivariate Haar systems and other wavelet bases, in discrete geometry and in number theory. We obtain a complete classification of isotropic 2-attractors in $\mathbb{R}^d$ and show that all of them are pairwise homeomorphic but not diffeomorphic. In the general, nonisotropic, case we prove that a 2-attractor is uniquely defined by the spectrum of the dilation matrix up to affine similarity. We estimate the number of different 2-attractors in $\mathbb{R}^d$ by analysing integer unitary expanding polynomials with free coefficient $\pm2$. The total number of such polynomials is estimated using the Mahler measure. We present several infinite series of such polynomials. For some 2-attractors their Hölder exponents are found. Some of our results are extended to attractors with an arbitrary number of digits. Bibliography: 63 titles.