Consider a hypercube canonically embedded into $\mathbb R^n$, such that, in particular, the vertices have coordinates in $\{0,1\}^n$ and the edges are aligned with the coordinate axes. Each coordinate of each vertex can then be naturally represented by a single bit, and two vertices are connected by an edge if and only if their coordinates differ along only one axis.
There are $n!$ ways to map the $n$ coordinate axes to the bits of an $n$-bit string. Furthermore, for each bit, there is a choice of two complementary representations (corresponding to mirroring the hypercube along the axis), for a total of $2^n$ choices. Thus, we have (at least) $n! \cdot 2^n$ distinct ways to map the vertices of an $n$-hypercube onto $n$-bit bitstrings such that adjacent vertices map to strings that differ by one bit.
Showing that these indeed constitute all such mappings is a bit more difficult, but I really just wanted to point out this method of enumerating the mappings for the sake of its nice geometric interpretation.
A related approach is to embed the hypercube into $\mathbb R^n$ such that the vertices lie in $\{-1,1\}^n$, and note that symmetries of the hypercube can then be represented by $n \times n$ signed permutation matrices, which form the hyperoctahedral group of order $n! \cdot 2^n$.