Boolean Expressions Reading assignment

Hi @Mining365,

Just be careful with the difference between  !=  and  !

  • !=  is a binary, comparison operator, and means "is not equal to in value"

  • !  is the unary, logical NOT operator

1 Like

Hi @Mrbryce,

Yes… and more specifically, operators perform actions (operations, as you say) on values.

But, you seem to be confused about what exactly binary and logical operators are…

No…what you have described is a Boolean expression. A binary operator is an operator that performs an action on two values. There are also unary operators, which perform actions on just one value, and a ternary operator which performs actions on three values.

Have a look at this post for some examples.

No… logical operators are used in Boolean expressions which evaluate to either true or false . Examples of logical operators are:

  • &&   AND
  • ||   OR
  • !   NOT
2 Likes

What are operators?

Assign values to variables

What binary operators do you know?

& = And

| = Or

~ = Not

What logical operators do you know?

&& = Logical and

|| = Logical or

! = Logical not

1 Like

Ok thanks for putting me straight on this.

1 Like

Hi @jon_m

Thank you for positive comments buddy. It really is so helpful and supportive, :relaxed: :facepunch:

1 Like
  1. What are operators?
    operator inlude two types:
    math operator:±* /
    logical operator >=;<=;==;!=

  2. What binary operators do you know?
    and; or

  3. What logical operators do you know?
    logical operator : and; or; not

1 Like
  1. What are operators?
    Arithmetic operations are called operators.
  2. What binary operators do you know?
    The binary operators are categorized as follows:
    Multiplicative operators: multiplication (*), remainder (%), and division (/)
    Additive operators: addition (+) and subtraction (-)
    Shift operators: left shift (<<) and right shift (>>)
    Relational operators: less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=)
    Equality operators: equality (==) and inequality (!=)
    Bitwise operators: AND (&), OR (|), and XOR (^)
    Logical operators: AND (&&) and OR (||)
    Source: https://www.cs.auckland.ac.nz/references/unix/digital/AQTLTBTE/DOCU_062.HTM
  3. What logical operators do you know?
    AND (&&), OR (||), NOT (!)
1 Like

What are operators?

Operators are constructs which behave like functions but which differ syntactically or semantically from usual functions. Operators in programming languages are being used for arithmetic, comperative and logical results. Languages usually have built-in operators. *

 

What binary operators do you know?

Operators that use two values are called binary operators
x + y, x - y, x * y, x / y, x % y

 

What logical operators do you know?

if x == y && y != z (if x equals y **and** y does **not** equal z)
if z == x || z != y (if z equals x **or** z does **not** equals y)

 

* Operator (Programming Language)
1 Like

Excellent answers sir, well documented! Please keep them like that :muscle:

Carlos Z.

Excellent answers sir, well documented! Please keep them like that :muscle:

Carlos Z.

  1. JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. (+, -) are examples of operators.

  2. Binary Operators: Below are examples
    +, -, *, /, <, >, %

  3. Logical Operators: and, or, and not

1 Like

Likewise mr. thecil. Please never hesitate to correct and guide me.

1 Like
  1. Operators are used to manipulate values. Putting an operator between two values will apply it
    to those values and produce a new value.

  2. The / represents division.
    The + represents addition.
    The - represents subtract.
    The * represents multiply.
    The % represents the remainder, for example X%Y is the remainder of dividing X by Y.

  3. There are three logical operators : and,or and not.

    The && operator represents logical and.
    The || operator represents logical or.
    The ! operator represents logical not.

1 Like
  1. What are operators?
    Operators are constructs which behave like functions but which differ syntactically or semantically from usual functions. Operators in programming languages are being used for arithmetic, comperative and logical results. Languages usually have built-in operators.

  2. What binary operators do you know?
    binary operators for arithmetic (+, -, *, /, and %),
    for comparison (==, !=, ===, !==, <, >, <=, >=)

  3. What logical operators do you know?
    Logical Operators: and, or, and not (&&, ||, !)

1 Like
  • What are operators?
    operators perform the specified operation on multiple values
  • What binary operators do you know?
      • / %
  • What logical operators do you know?
    && || == === != !===
1 Like

What are operators?
An operator in a programming language is a symbol that tells the compiler or interpreter to perform specific mathematical, relational or logical operation and produce final result.

What binary operators do you know?
Operators that perform action on two values such as arithmetic operators (multiplication, division, addition, subtraction), modulus.

What logical operators do you know?
Boolean logic on two expressions, AND, OR, NOT

1 Like
  1. Operators are arithmetical symbols (+, /, =, %, <) as well as and/or
  2. Anything that acts on two variables- (+, /, =, %, <) as well as and/or
  3. && and || (and and or)
1 Like

I had some truble understanding this area but your answer made it very easy to make sense of it all. Thank you! :slight_smile:

  1. Operators are used to perfrom aritmetics on values.
  2. Binary operators take 2 values and process them to provide a result. (+, -, /, *)
  3. Logical operators are used to determine the logic between variables or values. and (&&), or (||), not (!)
1 Like
  • What are operators?

In programming operator is a character that represent action.

  • What binary operators do you know?
multiplication (*), remainder (%), and division (/)
addition (+) and subtraction (-)
less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=)
equality (==) and inequality (!=)
  • What logical operators do you know?

AND (&&), OR (||) and NOT (!)

1 Like