Let the edge length of the unit cell be $a \ pm$.
$\therefore$ Volume of the unit cell $= a^{3} \times 10^{-30} \ cm^{3}$.
Let the number of atoms present per unit cell be $Z$.
The mass of one atom is given by $m = \frac{M}{N_{A}}$,where $M$ is the molar mass and $N_{A}$ is Avogadro's number.
The total mass of the unit cell is $\frac{Z \times M}{N_{A}}$.
The density $(d)$ of a unit cell is defined as the ratio of the total mass of the unit cell to the total volume of the unit cell.
$d = \frac{\text{Total mass of unit cell}}{\text{Total volume of unit cell}} = \frac{Z \times M}{N_{A} \times a^{3} \times 10^{-30}} \ g/cm^{3}$.