We study perfect codes in the homogeneous metric over the ring
$\mathbb {Z}_{{2}^k}, k\ge 2$. We derive arithmetic nonexistence results from Diophantine equations on the parameters resulting from the sphere packing conditions, and a Lloyd theorem based on the theory of weakly metric association schemes.