Math Operators

By: Connor Kelligrew

Basic Math Operators

Add +

Subtract -

Multiply *

Divide /

Exponents ^

Samples of the Math with Different Operators

Addition +

  • intSum = Number1 + Number2
Subtraction -

  • intDifference = Number 1 - Number2
Multiplication *

  • intProduct = Number1 * Number2
Division

  • intQuotient = 88 / Number1
Exponents ^

  • intNumber = 2^8


What is Regular Division?

Regular division is exactly like the division we perform everyday, in fact it is that division. However you divide normally is regular division. It should end up with a quotient that is whole if there is no remainder, or a quotient that is a decimal if it has a remainder.

What is Modular Division?

Modular division produces an answer that is only the remainder. Its symbol is: mod. Say you were doing 9 mod 4, after calculating that 4 goes into 9 twice, there is still 1 remaining. Your answer is 1.

9 mod 4

4 * 2 = 8

9 - 8 = 1

The answer is 1

Big image

What is Integer Division?

Integer division is the opposite of Modular division. Instead of making the remainder the answer, it only contains the whole number in its answer. The symbol is \. So if we used 9 \ 4 again, once you found out that 4 only goes into 9 twice, you would just put 2 as the answer. You don't even have to move on because the remainder is unnecessary in integer division.

9 \ 4

4 * 2 = 8

9 - 8 = 1

The answer is 2

Operators of Operations

An acronym for the order of operations is Please Excuse My Dear Aunt Sally. It stands for parentheses first, exponents second, multiplication third, addition fourth, and subtraction last.
Big image