Operators

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Shortcut Operators

Operators that combine the operation and assignment process into one operation, such as +=, -=, *=, or /=.

Operator Precedence

PEMDAS then Relational then Logical then Assignment

Relation Operators

< , > , <= , >= , == , != (<>)

Logical Operators

&& (AND), || (OR), ^ (XOR), ! (NOT)

Arithmetic Operator

+ for plus, - for minus, * for multiplication, / for division, and % for modulus

Equality Operator

==, !=

AND

A binary Boolean operation that results in true only if both boolean values are true, otherwise the result is false

Integer Modulus

A division process that results in a whole number answer representing the remainder of the division process, discarding the actual answer. Indicated by the % sign.

Integer Division

A division process that results in a whole number answer, discarding or truncating any fractional remainder.

Expression

A set of operands and operations that produce a mathematics based or logic based result. Concatenation, or joining of strings, is also considered an expression.

Binary

A word that is used to describe the base 2 number system. A type of operator that performs a calculation on two operands (+, -, *, /, %) or two input elements to work.

Binary Operator

An arithmetic operator that needs two input elements to work

Unary Operator

An operator in mathematics or in logic which works on only one operand, such as the negative, positive, or complement operators.

Overloaded Operator

An operator that can perform more than one function (ex. + for addition and for string concatenation).

Operator

Basic building blocks of programming statements.

Logical Operators

Binary operators that compare the results of two expressions. The result is either true or false.

Relational Operators

Binary operators that compare two operands, or two values, with each other, resulting in a true or false.

Shift Operators

Bitwise operators in programming which shift the binary bits of a value either to the left or to the right.

XOR (exclusively OR)

The binary Boolean operation that results in true if only one of the two operands is true, with the other being false.

OR

The binary operation in Boolean logic that results in a true value if either or both operands are true.

NOT

The operation Boolean logic that indicates negation, or "opposite of" operator. A symbol used in mathematical and logical expressions, such as the plus (+) or division (/) sign.

Order of Operations

The order of precedence of all of the operators in a computational system, such as mathematics (PEMDAS) or logic (NAXO)

Concatenation

The process of connecting or joining two strings of characters into a larger string of characters, an operation often indicated by the plus (+) sign.

OR

false only when both are false

XOR

true only when both are opposite

AND

true only when both are true


Ensembles d'études connexes

Employee Rewards and Benefits Exam 3

View Set

Quantitative Analysis - Chapter 2

View Set

Midterm research ot fall 2023 hintz

View Set

Accounting 100 Adaptive Practice Chapter 2

View Set

Ch 27: Nursing Assessment of the Newborn

View Set

Teaching Competencies for Music Educators, Technology, Performance Competencies for Music Educators, Music PRAXIS II, Music Praxis: Instruction, Professional Issues, and Technology, Music Praxis 5114

View Set