  The linear complexity and the $k$-error linear complexity of a binary
sequence are important security measures for key stream strength. By studying
binary sequences with the minimum Hamming weight, a new tool named as hypercube
theory is developed for $p^n$-periodic binary sequences. In fact, hypercube
theory is based on a typical sequence decomposition and it is a very important
tool in investigating the critical error linear complexity spectrum proposed by
Etzion et al. To demonstrate the importance of hypercube theory, we first give
a standard hypercube decomposition based on a well-known algorithm for
computing linear complexity and show that the linear complexity of the first
hypercube in the decomposition is equal to the linear complexity of the
original sequence. Second, based on such decomposition, we give a complete
characterization for the first decrease of the linear complexity for a
$p^n$-periodic binary sequence $s$. This significantly improves the current
existing results in literature. As to the importance of the hypercube, we
finally derive a counting formula for the $m$-hypercubes with the same linear
complexity.
