g10 - Programming Op - Maximus
g10 - Programming Op - Maximus
OPERATORS
LEARNING OUTCOMES
familiarize with all the programming
operators that are used in VB.NET
Identify what are the different types of
programming operators and how to use
them
compute a particular programming operator
LEARNING OUTCOMES
identify how to use and compute using each
logical operator in the truth table
analyze how to use truth table
demonstrate how to compute each logical
operator in the truth table
What are the Programming
Operators in VB.NET?
Programming operators in VB.NET are symbols or
keywords that define specific operations
performed on operands (values or variables). These
operators allow you to carry out a variety of
tasks, such as mathematical calculations, logical
comparisons, data manipulation, and more.
PROGRAMMING
OPERATORS
Arithmetic Operators
Comparison Operators
Logical Operators
Assignment Operators
Arithmetic Operator
These are used to perform mathematical operations.
Comparison Operator
These operators are commonly used in conditional
statements and loops to make decisions based on the
comparison results. Comparison operators are used to
compare two variable's values and return either True or
False
Comparison Operator
Operator Symbol
<
Less Than or Equal
Checks if the left operand is less than or equal to the
right operand.
Operator Symbol
<=
Greater Than
Checks if the left operand is greater than the right
operand.
Operator Symbol
>
Greater Than or Equal
Checks if the left operand is greater than or equal to
the right operand.
Operator Symbol
>=
Equal to
Checks if two values are equal.
Operator Symbol
=
Not Equal
Checks if two values are not equal.
Operator Symbol
<> OR !=
REMINDER:
LOGICAL NOT
LOGICAL OR
LOGICAL XOR
LOGICAL AND
Logical NOT
negates the value of the given
operands/variables value
Var_Name
Not
Truth Table - Logical NOT
LO OPERAND 1 RESULT
! true ?
! false ?
Truth Table - Logical NOT
LO OPERAND 1 RESULT
! true FALSE
! false TRUE
Logical OR
returns True if at least one of the
given operand or variable has a
value of True
Var_Name
Or
Truth Table - Logical OR
OPERAND 1 LO OPERAND 2 RESULT
false || true ?
false || false ?
Truth Table - Logical OR
OPERAND 1 LO OPERAND 2 RESULT
Var_Name
Xor
Truth Table - Logical XOR
OPERAND 1 LO OPERAND 2 RESULT
false ^ true ?
false ^ false ?
Truth Table - Logical XOR
OPERAND 1 LO OPERAND 2 RESULT
Var_Name
And
Truth Table - Logical AND
OPERAND 1 LO OPERAND 2 RESULT
T
Logical NOT
Operand1 Result
F T
T F
F T
T F
Logical OR
Operand1 Operand2 Result
F T
T F
F F
T T
Logical OR
Operand1 Operand2 Result
F T T
T F T
F F F
T T T
Logical AND
Operand1 Operand2 Result
F T
T F
F F
T T
Logical AND
Operand1 Operand2 Result
F T F
T F F
F F F
T T T
Logical XOR
Operand1 Operand2 Result
F T
T F
F F
T T
Logical XOR
Operand1 Operand2 Result
F T T
T F T
F F F
T T F
ASSIGNMENT 1 - ADVANCE LEVEL
Instruction: Based on the provided table,
compute the values of the variables or
operands using the given logical operator.
T T F
T F F
F T F
F T F
T F F
ACTIVITY 2 - ADVANCE LEVEL
Instruction: Based on the provided table,
compute the values of the variables or
operands using the given logical operator.
F T T
F T F
F T T
F T F
F T T
ACTIVITY 2 - ADVANCE LEVEL
p q r (!r&&p) || (p ^ !q) (r || p) && (p &&r)
T T F
T F F
F T F
F T F
T F F
Thank You
Prepared by: