  In this paper, we study the dihedral codes, i.e. the left ideals of
$\mathbb{F}_qD_{n}$ in the case $\gcd(q, n) = 1$. An explicit algebraic
description of the dihedral codes and their duals is obtained. In addition, a
criterion for self-duality of a dihedral code is obtained. Bases, generating
and check matrices of dihedral codes are constructed. Given a dihedral code, we
consider exterior and interior codes that are induced by cyclic codes. Using
this codes, some properties of generating matrices are described and a
connection to cyclic code theory is established. In addition, some estimates of
code parameters are obtained and several illustrative examples are given.
