  Cyclotomic polynomials are basic objects in Number Theory. Their properties
depend on the number of distinct primes that intervene in the factorization of
their order, and the binary case is thus the first nontrivial case. This paper
sees the vector of coefficients of the polynomial as a word on a ternary
alphabet $\{-1,0 ,+1\}$. It designs an efficient algorithm that computes a
compact representation of this word. This algorithm is of linear time with
respect to the size of the output, and, thus, optimal. This approach allows to
recover known properties of coefficients of binary cyclotomic polynomials, and
extends to the case of polynomials associated with numerical semi-groups of
dimension 2.
