+ 2
Which is the highest priority between AND & OR logic ?
8 Respostas
+ 8
NOT is the highest. AND is the second. OR is the lowest.
TRUE or FALSE and not TRUE
<=>
TRUE or (FALSE and (not TRUE))
+ 1
Could anyone give an example for it? I tried hard to do this but didn't succeed:(
0
first and then or
0
it's impossible to see difference between priorities in your example. Result of this example will be "TRUE" independently from priorities "OR" and "AND", isn't it?
- 1
and
- 1
My apologies, it's really not obvious example, top answer is the best. You right.
- 1
Additionally to the top one:
NOT tells you to reverse the logic so you must do it always first to calculate with the right value
AND can be substituted for multiplication so it is high priority
OR is for addition so the lowest priority