  In difference to many recent articles that deal with generalized bent (gbent)
functions $f:\mathbb{Z}_2^n \rightarrow \mathbb{Z}_q$ for certain small valued
$q\in \{4,8,16 \}$, we give a complete description of these functions for both
$n$ even and odd and for any $q=2^k$ in terms of both the necessary and
sufficient conditions their component functions need to satisfy. This enables
us to completely characterize gbent functions as algebraic objects, namely as
affine spaces of bent or semi-bent functions with interesting additional
properties, which we in detail describe. We also specify the dual and the Gray
image of gbent functions for $q=2^k$. We discuss the subclass of gbent
functions which corresponds to relative difference sets, which we call
$\mathbb{Z}_q$-bent functions, and point out that they correspond to a class of
vectorial bent functions. The property of being $\mathbb{Z}_q$-bent is much
stronger than the standard concept of a gbent function. We analyse two examples
of this class of functions.
