answersLogoWhite

0

The or operator will evaluate to true if either side of the operation is true.

The xor operator will evaluate to true only if exactly one side of the operation is true.

This means that these two operators will evaluate equally for all cases except when both sides of the operations are true.

true or true -> true

true xor true -> false

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is the difference between Conditional and Logical operator in C?

entirely different thingsconditional operator: ? : logical operators:AND: && OR: NOT: !also you can count XOR: != eg:if ((a==3) != (b==c)) printf ("XOR: Exactly one of the two conditions is true\n");


How do you represent assignment by bitwise XOR operator?

The bitwise XOR operator is ^, or shift 6. The bitwise XOR assignment operator is ^=.


What is difference between conditional operator and bitwise operator?

A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.


Construct the xor operator using only and or and not gates?

X-----Not--------------- | AND----------------| | |------------------ --------- |_ |__________ ---------OR-------OUTPUT | AND-----------------| Y-----|-Not-------------


What is the Java logical operators that has the highest order of preference?

"The following" doesn't make sense if you don't include a list. You can find a list of Java operators, including their precendence, at http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html. Or search for [java operator precedence] for additional places that explain this topic.

Related Questions

What is the difference between Conditional and Logical operator in C?

entirely different thingsconditional operator: ? : logical operators:AND: && OR: NOT: !also you can count XOR: != eg:if ((a==3) != (b==c)) printf ("XOR: Exactly one of the two conditions is true\n");


What are 3 logical operators?

there r 4 logical operator not 3 AND, OR, XOR, and NOT


How do you represent assignment by bitwise XOR operator?

The bitwise XOR operator is ^, or shift 6. The bitwise XOR assignment operator is ^=.


What is the major difference between arithmetic and logical operations?

Arithmetic operations are addition,subtraction,multiplication,division.Logical operations are OR,AND NOT,NOR,NAND,XOR,XNOR.


What is difference between conditional operator and bitwise operator?

A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:1 + 2The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.


What is the difference between differential and linear cryptanalysis?

The main difference from linear attack is that differential attack involves comparing the XOR of two inputs to the XOR of the corresponding outputs.


What is the difference between x and y in the context of their exclusive relationship in the operation of XOR?

In the context of XOR operation, the difference between x and y lies in their exclusive relationship, meaning that the result is true only when either x or y is true, but not both.


Construct the xor operator using only and or and not gates?

X-----Not--------------- | AND----------------| | |------------------ --------- |_ |__________ ---------OR-------OUTPUT | AND-----------------| Y-----|-Not-------------


How do you swap two numbers with bitwise operator in c plus plus?

// Note: ^ is the XOR operator a = a ^ b b = b ^ a a = a ^ b


What is the Java logical operators that has the highest order of preference?

"The following" doesn't make sense if you don't include a list. You can find a list of Java operators, including their precendence, at http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html. Or search for [java operator precedence] for additional places that explain this topic.


What is the use of bitwise operator in c plus plus?

They perform bitwise operations like AND (&), OR (|), XOR (^) and NOT (~).


Can you explain the usage of the XOR symbol in Boolean logic and how it differs from other logical operators?

The XOR symbol in Boolean logic represents the exclusive OR operation, which is true only when one of the inputs is true, but not both. This differs from other logical operators like AND and OR, which have different truth conditions.