Question
please give very detailed explanation
3. For each expression a modn, find an integer b such that b = a mod n and o <b<n. (a) 77 mod 12. (b) -96 mod 7. (c) 1001 mod
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Theory:

In computing, the modulo operation finds the remainder after division of one number by another (called the modulus of the operation). Given two positive numbers, a and n, a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n, where a is thedividend and n is the divisor.

floor is an rounded near value of divisor.

Examples:floor(2.7)=2 , floor(-3.7)=-4

The formula to calculate a mod b is = a - b × floor(a/b) (*)

a)77 mod 12 = 77 - 12 × floor(77/12)

=77-12×6

=77-72

Ans =5

b)-96 mod 7 = -96 - 7 × floor(-96/7)

=-96-7*(-14)

=-96+98

Answer =2

c)1001 mod 3 = 1001 - 3 × floor(1001/3)

=1001-3*(333)

=1001-999

Answer =2

Add a comment
Know the answer?
Add Answer to:
please give very detailed explanation 3. For each expression a modn, find an integer b such...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT