PCC - Math Modular Effects (Lesson)
Math Modular Effects
Modular Effects in Math and Computer Science Programming
Modular is used in math and computer science to describe the effects of analyzing division remainders.
See what patterns you find? What options and randomness can this add to a program? View the video below.
Now that you have reviewed an analyzation of divisors, note that these work as the number system bases that we examined earlier in the year. The numbers 0 through the base number - 1 are the numbers used when writing numbers for the base. Here we learned that consistent divisor to all numbers yields only remainders of 0 through the divisor -1 .
Example: Base 10 (Decimal System) ---> Base - 1 = 10 - 1 = 9
We use the numbers 0 - 9 in all of the place values only.
Dividing 10 into any number is only even (0 remainder) of a remainder of 1 through 9.
Example: Base 8 (Octal System) ---> Base - 1 = 8 - 1 = 7
We use the numbers 0 - 7 in all of the place values only.
Dividing 8 into any number is only even (0 remainder) or a remainder of 1 through 7.
Example: Base 2 (Binary System) ---> Base - 1 = 2 - 1 = 1
We use the numbers 0 - 1 in all of the place values only.
Dividing by 10 into any number is only even (0 remainder) or a remainder of 1 .
All bases and divisors work this way, providing a myriad of selection options in programming to create interest through a variety of options.
Using the Binary Option
The video below illustrates the use of the binary option to determine whether a number is even or odd.
VIDEOS CREATED BY GAVS AND SHARED UNDER CCBYNC.