CS uses a lot of modulus arithmetic. I am teaching Cryptography this year and it is very prominent. Unfortunately the Casio scientific calculator we are using (and allowed to bring into exam hall) do not have a specific mod function BUT… i found a trick to get the mod answer (Puan Rashidah was the one who initially showed me this trick).
Locate the ab/c button. That can be used as the mod.
- to calculate 29 mod 6, the display will show 29 ⌋ 6
- The answer on the display is 4 ⌋ 5 ⌋ 6
- 4 = quotient, 5 = remainder (the answer!), 6 = divisor
- Make sure that, the divisor in the answer is the same as the divisor in the question. If they are the same, then the remainder is your Modulus!
- If it is not, for example, 500 ⌋ 45
- You will get 11 ⌋ 1 ⌋ 9. 9 is not the same as 45. So 1 is NOT the answer.
- But you can still get the answer. 9 x 5 = 45
- So, you can apply the same to the answer 1 -> 1 x 5 = 5. So 5 is your MOD answer.
Yeay!