Self-dual binary codes of Hamming weight divisible by 8? Recall that a binary code is a subgroup $C \subset \mathbb F_2^n$; the elements of $C$ are called code words.  The Hamming weight of a code word $c\in C$ is the number of $1$s in it.  A binary code is self-dual if $C = C^\perp := \{v \in \mathbb F_2^n : \langle v,c\rangle = 0\in \mathbb F_2\}$.  Self-dual codes automatically satisfy that all code words have Hamming weight divisible by $2$ (since every element must be orthogonal to itself).
There are many applications for binary codes in which all Hamming weights are divisible by $4$.  A famous theorem says that a self-dual code of this type can exist only when $n$ is a multiple of $8$.
Do there exist self-dual codes all of whose Hamming weights are divisible by $8$?  What is the smallest one?  What dimensions do they exist in?
Note that the binary Golay code, related to the famous Leech lattice, is not of this type, since it has code words with Hamming weight $12$.
 A: Just noticed this question now.  No, there are no such self-dual codes
beyond the trivial one of length zero.
One way to see this is to mimic the proof of Gleason's theorem:
the weight enumerator $W_C(X,Y)$ would have to be invariant under
$(X,Y) \mapsto (2^{-1/2}(X+Y), 2^{-1/2}(X-Y))$ (MacWilliams identity)
and also $(X,Y) \mapsto (X,e^{2\pi i/8} Y)$.  But those linear 
transformations generate a subgroup of $U_2({\bf C})$ 
whose image in $PU_2({\bf C})$ is dense, so there are
no nonconstant invariant polynomials.
[Replacing $e^{2\pi i/8}$ by $i = e^{2\pi i/4}$ yields
the group for weight enumerators of Type II codes,
whose image in $PU_2({\bf C})$ is the octahedral group --
which is known to be a maximal closed subgroup of $PU_2({\bf C})$,
so adding the generator $(X,Y) \mapsto (X,e^{2\pi i/8} Y)$ yields
a dense subgroup.]
A: We say the Code $C$ is formally self-dual (f.s.d) if the codes $C$ and $C^\perp$ have identical weight distribution. So, a self dual code is f.s.d. Also, f.s.d,  code is divisible if there exists an integer $\Delta >1$, such that $\Delta$  divides all the non-zero weights in the code. By $Gleason$-$Pierce$ theorem, there is a complete classification of f.s.d codes over arbitrary field. For your case, you must have $\Delta=8$. There is not simple classification in this case. One approach can be as follows: find $Type$ $II$ self-dual code and then compute $H:=C\otimes C$. So, it seems that the smallest one of such codes depends to smallest $Type$ $II$ code. Also, I think the paper Paper is useful for further studying to answer your question. 
