Difference between revisions of "Xor"

From WikiManual
Jump to: navigation, search
Line 1: Line 1:
 
Takes the two top values on the conditions stack and xor's them together. If one of them is true and one is false it puts true on the stack. If both are true, or if both are false, it puts false on the stack.  
 
Takes the two top values on the conditions stack and xor's them together. If one of them is true and one is false it puts true on the stack. If both are true, or if both are false, it puts false on the stack.  
  
=== Logical Operators===
+
0 0 and ''puts''''' 0 '''''on the stack''
* [[and]]
+
1 0 and ''puts''''' 1 '''''on the stack''
* [[or]]
+
0 1 and ''puts''''' 1 '''''on the stack''
* [[xor]]
+
1 1 and ''puts''''' 0 '''''on the stack''
* [[not]]
+
 
 +
{{logic}}

Revision as of 19:49, 23 December 2005

Takes the two top values on the conditions stack and xor's them together. If one of them is true and one is false it puts true on the stack. If both are true, or if both are false, it puts false on the stack.

0 0 and puts 0 on the stack
1 0 and puts 1 on the stack
0 1 and puts 1 on the stack
1 1 and puts 0 on the stack

Logic:

true
false
and
or
not
xor