You are on page 1of 17

prayer

Thank you for today.


Thank you for ways in which you provide for us all
For your protection and love, we thank you
Help us to focus our hearts and minds
Now on what we are about to learn
Inspire us by your Holy Spirit as we listen and write
Guide us by your eternal light as we discover more about
the world around us.
We ask all this in the name of Jesus..
Amen.
Operators

Operators are symbols that indicate


the operation to beperformed on the
data.
Classifications of operators
1. Arithmetic Operators - operators that represent mathematical operations

FUNCTION OPERATOR EXAMPLE RESULT


Addition + 8+1 9

Subtraction - 8-1 7

Multiplication * 8*8 64

Division / 8/4 2

Exponentiation ^ 8^2 64

Modulus Mod 8 mod 5 3

Negation - -8 -8
Classifications of operators
When multiple operations are involved in a problem, the order of the operators
will be as follows:
1st: Negation
2nd: Exponentiation
3rd: Multiplication, Division
4th: Addition, Subtraction
5th: Modulus

Example: 5 + (4 * 2 / 2) - 3 = 6
= 5 + (8 / 2 ) - 3
= (5 + 4) - 3
= 9- 3
= 6
Classifications of operators
2. Relational Operators - operators that are used to compare two values based on a certain
condition
- Yields a true or false result

FUNCTION OPERATOR EXAMPLE RESULT


Greater than > 8>5 True

Less than < 8<5 False

Equal to = 8=8 True

Not equal to <> 8<>5 True


Greater than or
Equal to >= 8 > = 10 False

Less than or Equal


<= 8<=9 True
to
Classifications of operators
3. Logical Operators - operators that determine if particular condition is satisfied

FUNCTION OPERATOR EXAMPLE RESULT


AND AND 8 > 5 AND 8 < 10 True

OR OR 8 < 5 OR 8 < 6 False

NOT NOT NOT (2 < 8) False


Classifications of operators
Conditions of AND Operator

Condition 1 Condition 2 Result


True True True

True False False

False True False

False False False


Classifications of operators
Condition 1 Condition 2 Result
Conditions of AND Operator
True True True
True False False
Examples: False True False
A = 100 B = 50 False False False

Condition 1 Operator Condition 2 Result


A<=B B<=A
(False) AND (True) False

A>=B B<=A
AND True
(True) (True)
Classifications of operators
Conditions of OR Operator

Condition 1 Condition 2 Result


True True True

True False True

False True True

False False False


Classifications of operators
Condition 1 Condition 2 Result
Conditions of OR Operator
True True True
True False True
Examples: False True True
A = 100 B = 50 False False False

Condition 1 Operator Condition 2 Result


A<=B B<=A
(False) OR (True) True

A>=B B<=A
OR True
(True) (True)
Classifications of operators
Conditions of NOT Operator

Condition NOT Condition


True False

False True
Classifications of operators
Conditions of OR Operator Condition NOT Condition
True False
Examples: False True
A = 100 B = 50

Condition NOT Condition Result


A>B
(True) NOT (A > B) False

B>A
NOT (B > A) True
(False)
Evaluation of different types of operators
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators

Evaluation of different types of logical


operators
1. NOT
2. AND
3. OR
Evaluation of different types of operators
Example:
5 * 5 + 10 / 5 > 40 AND 8 < 10 OR 7 < 4 3. Logical Operators
1. Arithmetic Operators False AND True
(5 * 5) + (10 / 5)
False
= 25 + 2
= 27 False OR False
False
2. Relational Operators
27 > 40 AND 8 < 10 OR 7<4
Answer is False
False True False
Evaluation of different types of operators
Example:
819 > 900 AND NOT 27 < = 48 OR 419 < > 238
1. Arithmetic Operators
False AND False
n/a
2. Relational Operators False

819 > 900 AND NOT 27 < = 48 OR 419 < > 238 False OR True
False True True
True

3. Logical Operators
Answer is True
819 > 900 AND False OR 419 < > 238
False True
Evaluation of different types of operators
Example:
(10*40) (55/5) + 629 < 444 AND 1047 > = 1047 OR NOT 476 < > 476
1. Arithmetic Operators False AND True OR True
(10*40) (55/5) + 629
False
= 400 * 11 + 629
= 4400 + 629 False OR True
= 5029 True
2. Relational Operators
Answer is True
5029 < 444 AND 1047 > = 1047 OR NOT 476 < > 476
False True False

3. Logical Operators
False AND True OR NOT False

True
Evaluation of different types of operators
Example:
NOT 1076 < > 1077 OR 1177 > = 1177 AND 786 > 5 + (52 * 7 / 4) - 25
1. Arithmetic Operators 3. Logical Operators
5 + (52 * 7 / 4) - 25 NOT True OR True AND True
= 5 + (364 / 4) - 25 False
= 5 + 91 - 25
False OR True AND True
= 71
True
2. Relational Operators
False OR True
NOT 1076 < > 1077 OR 1177 > = 1177 AND 786 > 71
True True True True

Answer is True

You might also like