Modular math?

alexjohnson16

Platinum Member
Dec 27, 2002
2,074
0
0
Ran across a problem on one of my quizzes that says to figure out (-9x12)(mod 4). Can someone show me how to do this? Or show me another problem that shows how to do it?

I searched the notes and can't find anything at all.
 

reverend boltron

Senior member
Nov 18, 2004
945
0
76
think about 14%5..

which is 14 mod 5, which is basically integer division, where you take the remainder, instead of the quotient.

so.. 14%5 is like 14/5 = 2 REMAINDER 4.. you keep the remainder 4.. answering 4. :)
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Do you know how to do mods in general? Like 4 mod 3? If so, then you can reduce the problem above by rewriting it as:

(-9x12)mod4 to (-9x3x4)mod4 to ...... the answer. :)