741 views
1 votes
1 votes
a mod n : tell the formula ?

2 Answers

Best answer
1 votes
1 votes

In arithmetic modulo b, we express any $a$  as $nb + r$, where $r$ must be a non-negative integer.

-4 can be expressed as $-2 * 2 + 0$, So -4 mod 2 = 0

One good example would be -2 mod 6.

-2 can be expressed as $(-1 * 6) + 4$, so -2 mod 6 = 4.

Hope it's clear now.

selected by
1 votes
1 votes
I dont give exact answer,but i can give you approach that i follows.

Lets say we have a number n (say 13),now if i find mod of this with some number(+ve) say m=4, it will give me 1(13%4).

Now suppose i add multiple of 4(4x) into n.Say 13+(4*2),will it change my Mode?No way ,right?

Now say i have -ve number -13,now if i add multiple of 4,that is greater that 13 say 16,now it becomes -13+16,which is 3%4=3.

Hope this clears,-4mod2,will be (-4+2*3)=(-4+6)=(2)mod2,which is 0.

Related questions

0 votes
0 votes
2 answers
1
Shefali asked Sep 22, 2015
1,083 views
If the initial stage of mod-11 counter is 0110, then what will be the counting sequence for next 24 clock pulses?What will be counting sequence for the next 17 clock puls...
1 votes
1 votes
2 answers
3
kvkumar asked Dec 3, 2016
640 views
L = {an bam|n,m ≥ 0 and n = m mod 5} is regular