We classify the main variants of the SARS-CoV-2 virus representing a given biological sequence represented as a symbolic sequence of digital codes and its evolution by a cellular automata with a properly chosen rule.The spike protein, common to all variants of the SARS-CoV-2 virus, is then represented by an image of the cellular automaton evolution which represents in a more visible way important features of the protein. We use information theory Hamming distance between different stages of the evolution of the cellular automaton representing seven variants with respect to the original Wuhan/China virus. We show that our approach allows to classify together variants with common ancestors and same mutations. Although being a much simpler method, it can be used as an alternative for building phylogenetic trees.