circkit.bitwise¶
- class circkit.bitwise.circuit.BitwiseCircuit(*args, **kwargs)¶
Bases:
CircuitGeneric class for bitwise circuits (unsigned words).
- __init__(*args, word_size=None, **kwargs)¶
- class Operations¶
Bases:
OperationsClass gathering
Operation`s of :class:.ArithmeticCircuit`.- class AND(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class OR(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class XOR(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class NOT(*values, **kvalues)¶
Bases:
Unary- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class SHL(*values, **kvalues)¶
Bases:
UnaryShift left
- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class SHR(*values, **kvalues)¶
Bases:
UnaryShift right
- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class ROL(*values, **kvalues)¶
Bases:
UnaryRotate left
- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class ROR(*values, **kvalues)¶
Bases:
UnaryRotate left
- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class ADD(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class SUB(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class MUL(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class DIV(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class MOD(*values, **kvalues)¶
Bases:
Binary- eval(a, b)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class NEG(*values, **kvalues)¶
Bases:
Unary- eval(a)¶
Evaluate the operation on given inputs (typically values, not nodes).
- class circkit.bitwise.ring.BitwiseRing(word_size)¶
Bases:
objectRing of fixed-width bit-words.
- __init__(word_size)¶
- fetch_int(value)¶
Call self as a function.
- class Word(value, ring)¶
Bases:
objectWrapper for a bit-word.
- Parameters
value (int) –
ring (BitwiseRing) –
- __init__(value, ring)¶
- Parameters
value (int) –
ring (BitwiseRing) –
- class circkit.bitwise.ring.Word(value, ring)¶
Bases:
objectWrapper for a bit-word.
- Parameters
value (int) –
ring (BitwiseRing) –
- __init__(value, ring)¶
- Parameters
value (int) –
ring (BitwiseRing) –