How many different groups whose order is 16 that every element to the fourth power is unit element? Consider a group $G$ whose order is 16, and every element $x$ satisfies $x^4=e$, where $e$ is the unit element. I am asked how many different groups are there under isomorphism. 
I only learned the structure of finite abelian groups. And 16-group is not necessarily abelian I guess. And for p-group, its center has an element other than the unit. This is what I know. I'm sorry that I don't know where to go next. Thank you for help! 
 A: First assume that $G$ is abelian. Then we have $C_4\times C_4$, $C_4\times C_2\times C_2$, and $C_2\times C_2\times C_2\times C_2$, because the other two groups $C_8\times C_2$ and $C_{16}$ have an element of order $8$. Now let $G$ be non-abelian. We can go through the classification via the order of the center, i.e., via $|Z(G)|$, which must be in $\{8,4,2,1\}$. It is easy to see that $|Z(G)|=8$ is impossible, because $G/Z(G)$ cyclic implies that $G$ is abelian - a contradiction. Also $|Z(G)|=1$ is impossible, as $2$-groups are nilpotent and have non-trivial center.
So let $|Z(G)|=4$, i.e., either $Z(G)\cong C_4$, or $Z(G)\cong C_2\times C_2$.
In the last case we obtain $D_4\times C_2$, $Q_8\times C_2$, $C_4\rtimes C_4$ and $(C_2\times C_2)\rtimes C_4$. All of them satisfy $x^4=e$ for all $x$.
In the other case we obtain the groups $SU(2)$ and $M_{16}$. Here $M_{16}$ has an element of order $8$. Now let $|Z(G)|=2$. Then we obtain the diciclic group $Dic_4$, the semidihedral group of degree $2$, and the dihedral group $D_8$. It is easy that they have an element of order $8$. 
So in total $8$ groups out of the $14$ satisfy the property that the order of all elements is at most $4$.
