Engineering Math - Quick Reference                                 Home : www.sharetechnote.com

 

 

 

Modulo Math

 

 

 

 

 

Formal Definition

 

 

Example 01 >

 

Let's suppose a = 15, n = 6. We can express this according to the definition as follows.

    15 = 2 x 6 + 3 ==> q = 2, r = 3

     

    This is represented as follows in modular form.

     

    15 mod 6 = 3

 

Example 02 >

 

a

n

q

r

0

6

0

0

1

6

0

1

2

6

0

2

3

6

0

3

4

6

0

4

5

6

0

5

6

6

1

0

7

6

1

1

8

6

1

2

9

6

1

3

10

6

1

4

11

6

1

5

12

6

2

0

13

6

2

1

14

6

2

2

15

6

2

3

16

6

2

4

17

6

2

5

18

6

3

0

19

6

3

1

20

6

3

2

...

...

...

...