Modular Arithmetic
Last updated
Was this helpful?
Last updated
Was this helpful?
When we divide two integers we will have an equation that looks like the following:
Sometimes, we are only interested in what the remainder is when we divide A by B. For these cases there is an operator called the modulo operator (abbreviated as mod).
Using the same A, B, Q, and R as above, we would have: A mod B = R.