How do we deal with units when using the modulo operation? I'm wondering how I should deal with units when I do a modulo operation. What is considered legal and what is not.
When I have two numbers that have units such as 13cm and 3cm, I can multiply them:
$$13cm \times 3cm = 39cm^2 $$
Similarly, I can do divisions:
$${39cm^2 \over 3cm} = 13cm$$
Now, I'm wondering what can I do with modulo. It seems to me that only distance less numbers can be used on the right side of the operation and the result keeps the same unit as the left side.
$$39cm \bmod 5 = 4cm$$
Is that correct? Where could I find information about dealing with units and all operators (relations, additions, multiplication, divisions, modulo, power, etc.)

Typically, two values with the same dimension (length, time, current squared over kilogram, etc) can be added or subtracted, and two values of any dimension can be multiplied or divided. Other operations generally don't behave so nicely, but there is a workaround.
Let $x$ be the length of whatever in centimetres. Then if the object has length L, $x = L/1\ cm$. $x$ is a dimensionless value, which means you can work with it in modulus equations (and other functions that don't like units, like $e^x$ and $\cos(x)$). It also has the neat property that it doesn't actually matter what units $L$ is expressed in - if $L = 1\ inch$, then $x = 1\ inch/1\ cm = 2.54\ cm/1\ cm = 2.54$.
