User Tools

Site Tools


crpl:docs:xor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
crpl:docs:xor [2014/07/08 21:13] ParkourPenguincrpl:docs:xor [2021/02/05 11:43] – Rmoved discussion tag Karsten75
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#logical_operators|Logical Operators]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#logical_operators|Logical Operators]]
 =====  xor  ===== =====  xor  =====
  
 ^Arguments^Result^Notation^ ^Arguments^Result^Notation^
-|Two items on the stack|The conditional NOR of the two arguments |''b1 b2 -- b3 ''|+|Two items on the stack|The conditional XOR of the two arguments |''b1 b2 -- b3 ''|
  
  
 === Description === === Description ===
-Pops two items from the stack, treats them as boolean values, 'xors' them, and pushes 0 or 1 back to the stack.+Pops two items from the stack, treats them as boolean values, 'xors' (exclusive or) them, and pushes 0 or 1 back to the stack.
  
 If both items are TRUE, 0 is pushed to the stack. If both items are FALSE, 0 is pushed to the stack. If one item is TRUE and the other is FALSE, 1 is pushed to the stack. If both items are TRUE, 0 is pushed to the stack. If both items are FALSE, 0 is pushed to the stack. If one item is TRUE and the other is FALSE, 1 is pushed to the stack.
crpl/docs/xor.txt · Last modified: 2022/07/01 14:46 by Karsten75