Computer Math Operations

By: Chase Pasciuto

Basic Math Operators

+ (add),

  • intNumber = num1 + num2

- (subtract)

  • intNumber = num1 - 50

/ (divide)

  • intNumber = 51 / num2

* (multiply)

  • intNumber = num1 * num2

^ (Exponents)

  • intNumber = 5^3 ‘5 cubed


Examples of Division Types

Regular Division

Regular division-Simply just regular division

  • Rounds the decimal portion if assigned to an integer.
  • This is the division with which you are most familiar.
  • Example 10/5=2


Integer Division

Integer division - It is Division But your answer is just an integer with no remainder

  • cuts off the decimal portion and returns the integer ( \ )
  • Example 5/2=2


Modular Divsion

Modulus division - Division but only the answer is the remainder

  • returns the remainder resulting form the division (mod)
  • Example: 19/5=3R4, so the Answer would be 4 since its the remainder


Operators of Operations

Just as in math,There is an order to be followed


  • Parentheses
  • Exponents
  • Multiply
  • Divide (It will be completed in the order ot appears it desnt follow the division rules, SO put it in the right place)
  • Add
  • Subtract