parent
b23a9794a4
commit
32310aecad
4 changed files with 23 additions and 0 deletions
|
|
@ -157,6 +157,16 @@ class Value(metaclass=ABCMeta):
|
|||
"""
|
||||
return Operator("r&", [self])
|
||||
|
||||
def xor(self):
|
||||
"""Compute pairwise exclusive-or of every bit.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Value, out
|
||||
``1`` if an odd number of bits are set, ``0`` if an even number of bits are set.
|
||||
"""
|
||||
return Operator("r^", [self])
|
||||
|
||||
def implies(premise, conclusion):
|
||||
"""Implication.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue