Saturday, November 3, 2018

Remainders and Modulo

Background

Up to this point, the examples within entries have been written with numbers that divide evenly into each other, such as . So what happens if numbers don't evenly divide into each other?

Question
Evaluate the following:
  •  
  • 15 mod 7 
Answer
  • 15 mod 7 = 1 
Analysis

When we take a composite number and divide it by one of its factors, the quotient will work out to also be a factor. For instance, we can divide 6 by one of its factors, 2, and get another factor, 3:



What happens if we take a number and divide it by something other than a factor? We'll end up with a remainder.

We can look at . Let's talk about what we're asking. Let's say you have 15 cookies and there are 7 people in your family. It's decided that you'll divide the cookies evenly. So what can we do?

If we give each person 1 cookie, we've distributed 1 x 7 = 7 cookies and there are 8 left over.
If we give each person 2 cookies, we've distributed 2 x 7 = 14 cookies and there is 1 left over.
We can't give each person 3 cookies - that would be 3 x 7 = 21 and we don't have that many cookies.

Ok - so each person gets 2 cookies and now there is 1 left over. There are a couple of things we could do, but for right now let's simply set that 1 cookie aside and not have anyone eat it.

And so we say that  with a remainder of 1 - each person gets 2 cookies and there is 1 left over.

Notice that with the way we've asked the question, we're interested in the number of cookies each person gets and less interested in the number of cookies left over. However, we can ask the question to ask about the number of cookies left over - that type of question is the modulo. We abbreviate the word to "mod". So let's ask the same question but focus on the cookies left over:

15 mod 7 = 1

We can also look at this in terms of bases. Let's look at 15 base 10 and convert it to base 7. Let's set up the place holders, then fill in the digits:



The green number, the 2, is the number of cookies each person gets.
The red number, the 1, is the remainder/modulo. 

In fact, that right-most number, the 1's number, will always be the remainder/modulo whenever we do this calculation by converting a number from base 10 to another base.

Vocabulary used:

For more information check out these links (comment to add your favourite link):

Where might you have come from?

Fact-orials Index

Numbers:
Operations:
Associated Operations:
Where might we go?

Associated Operations:

No comments:

Post a Comment

Hi there - I'm glad to see you are thinking about or maybe even getting ready to post a comment! I moderate all comments so please be patient while I hit the "ok" button on yours. Feel free to make suggestions on web resources to add, directions the entries should go,... whatever. And thanks again for leaving some feedback!