Important
<aside>
Not every operator is included here. I only went into details for specific operators that I thought needed further exploration. For notes on every operator go through the slides on BuX.
</aside>
Arithmetic Operators
Modulus
a % b
Find the remainder when a is divided by b.
Use cases:
- Check if divisible: if a is divisible by b, the result of the modulus operation will be 0
- Check if multiple: a is a multiple of b if the result of the modulus operation is 0
- Convert units: minutes to hours and minutes, milliliters to liters and milliliters etc. (need to use modulus and division operators)
- Digit extraction: extract the digits of a number by using the modulus and division operators
This is not a comprehensive list of uses, just the most common ones.
Finding the modulus on your calculator
- Casio fx-991CW
- Casio fx-991EX
- Casio fx-991ES Plus
Comparison Operators