answersLogoWhite

0


Best Answer

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

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between the or logical operator and the Xor operator?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


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 (~).


How do you perform the xor operation for character in Java?

The XOR operator is the carat character: ^Example:// Create characterchar ch = 'a';System.out.println(ch);// Perform XORch = (char)(ch ^ 86);System.out.println(ch);// Perform XOR...againch = (char)(ch ^ 86);System.out.println(ch);


What are examples of a Boolean operator?

And, or, not, xor, nand, nor. There are a few others, too.