Skip to Main Content
In this correspondence we give a new definition of modular arithmetic weight (relative to any modulus and any radix ), which has two very useful properties, i) It is defined for all integers and is invariant under congruence modulo . ii) It yields a metric for all moduli . In the important cases , and , it coincides with the modular weight of Rao and Garcia, and thus acts as a proper measure of errors for these moduli. Due to these properties, we are able to obtain conceptually simpler proofs of several known (as well as some new) results on the computation of modular distance in cyclic AN-codes. Along these same lines we introduce the notion of modular-cyclic nonadjacent form (NAF) when . For moduli of this type, we show that every integer has a modular-cyclic NAF; the number of nonzero digits is the modular weight. It is a curious fact that a "modular" version of the well-known Chang/Tsao-Wu algorithm (for computing the NAF) turns out to yield the modular-cyclic NAF directly.