:tocdepth: 2 ==== Gate ==== .. _ANDGate2: ANDGate2 ======== Class ``bw.gate.ANDGate2`` -------------------------- .. image:: images/schematics/gate/ANDGate2.svg :width: 360px Defined in `bitwise/gate/AND.py `_. Two-input `AND gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input AND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the AND gate. * ``input_2``: An object of type ``Wire``. The second input to the AND gate. * ``output``: An object of type ``Wire``. The output of the AND gate. .. highlight:: none __str__ ------- Print out the wire values of the AND gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the AND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _ANDGate3: ANDGate3 ======== Class ``bw.gate.ANDGate3`` -------------------------- .. image:: images/schematics/gate/ANDGate3.svg :width: 360px Defined in `bitwise/gate/AND.py `_. Three-input `AND gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, output ) Construct a new three-input AND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the AND gate. * ``input_2``: An object of type ``Wire``. The second input to the AND gate. * ``input_3``: An object of type ``Wire``. The third input to the AND gate. * ``output``: An object of type ``Wire``. The output of the AND gate. .. highlight:: none __str__ ------- Print out the wire values of the AND gate. :: input_1: 0 input_2: 0 input_3: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, output=None ) Force specific values on the wires of the AND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _ANDGate4: ANDGate4 ======== Class ``bw.gate.ANDGate4`` -------------------------- .. image:: images/schematics/gate/ANDGate4.svg :width: 360px Defined in `bitwise/gate/AND.py `_. Four-input `AND gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, input_4, output ) Construct a new four-input AND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the AND gate. * ``input_2``: An object of type ``Wire``. The second input to the AND gate. * ``input_3``: An object of type ``Wire``. The third input to the AND gate. * ``input_4``: An object of type ``Wire``. The fourth input to the AND gate. * ``output``: An object of type ``Wire``. The output of the AND gate. .. highlight:: none __str__ ------- Print out the wire values of the AND gate. :: input_1: 0 input_2: 0 input_3: 0 input_4: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, input_4=None, output=None ) Force specific values on the wires of the AND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _Buffer: Buffer ====== Class ``bw.gate.Buffer`` -------------------------- .. image:: images/schematics/gate/Buffer.svg :width: 360px Defined in `bitwise/gate/BUF.py `_. `Digital buffer `_. __init__ -------- :: __init__( input, output ) Construct a new buffer. Args: ~~~~~ * ``input``: An object of type ``Wire``. The input to the buffer. * ``output``: An object of type ``Wire``. The output of the buffer. .. highlight:: none __str__ ------- Print out the wire values of the buffer. :: input: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input=None, output=None ) Force specific values on the wires of the buffer. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _IMPLYGate: IMPLYGate ========= Class ``bw.gate.IMPLYGate`` --------------------------- .. image:: images/schematics/gate/IMPLYGate.svg :width: 360px Defined in `bitwise/gate/IMPLY.py `_. `IMPLY gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new IMPLY gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the IMPLY gate. * ``input_2``: An object of type ``Wire``. The second input to the IMPLY gate. * ``output``: An object of type ``Wire``. The output of the IMPLY gate. .. highlight:: none __str__ ------- Print out the wire values of the IMPLY gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the IMPLY gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NANDGate2: NANDGate2 ========= Class ``bw.gate.NANDGate2`` --------------------------- .. image:: images/schematics/gate/NANDGate2.svg :width: 360px Defined in `bitwise/gate/NAND.py `_. Two-input `NAND gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input NAND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NAND gate. * ``input_2``: An object of type ``Wire``. The second input to the NAND gate. * ``output``: An object of type ``Wire``. The output of the NAND gate. .. highlight:: none __str__ ------- Print out the wire values of the NAND gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the NAND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NANDGate3: NANDGate3 ========= Class ``bw.gate.NANDGate3`` --------------------------- .. image:: images/schematics/gate/NANDGate3.svg :width: 360px Defined in `bitwise/gate/NAND.py `_. Three-input `NAND gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, output ) Construct a new three-input NAND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NAND gate. * ``input_2``: An object of type ``Wire``. The second input to the NAND gate. * ``input_3``: An object of type ``Wire``. The third input to the NAND gate. * ``output``: An object of type ``Wire``. The output of the NAND gate. .. highlight:: none __str__ ------- Print out the wire values of the NAND gate. :: input_1: 0 input_2: 0 input_3: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, output=None ) Force specific values on the wires of the NAND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NANDGate4: NANDGate4 ========= Class ``bw.gate.NANDGate4`` --------------------------- .. image:: images/schematics/gate/NANDGate4.svg :width: 360px Defined in `bitwise/gate/NAND.py `_. Four-input `NAND gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, input_4, output ) Construct a new four-input NAND gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NAND gate. * ``input_2``: An object of type ``Wire``. The second input to the NAND gate. * ``input_3``: An object of type ``Wire``. The third input to the NAND gate. * ``input_4``: An object of type ``Wire``. The fourth input to the NAND gate. * ``output``: An object of type ``Wire``. The output of the NAND gate. .. highlight:: none __str__ ------- Print out the wire values of the NAND gate. :: input_1: 0 input_2: 0 input_3: 0 input_4: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, input_4=None, output=None ) Force specific values on the wires of the NAND gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NORGate2: NORGate2 ======== Class ``bw.gate.NORGate2`` --------------------------- .. image:: images/schematics/gate/NORGate2.svg :width: 360px Defined in `bitwise/gate/NOR.py `_. Two-input `NOR gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input NOR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NOR gate. * ``input_2``: An object of type ``Wire``. The second input to the NOR gate. * ``output``: An object of type ``Wire``. The output of the NOR gate. .. highlight:: none __str__ ------- Print out the wire values of the NOR gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the NOR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NORGate3: NORGate3 ======== Class ``bw.gate.NORGate3`` --------------------------- .. image:: images/schematics/gate/NORGate3.svg :width: 360px Defined in `bitwise/gate/NOR.py `_. Three-input `NOR gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, output ) Construct a new three-input NOR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NOR gate. * ``input_2``: An object of type ``Wire``. The second input to the NOR gate. * ``input_3``: An object of type ``Wire``. The third input to the NOR gate. * ``output``: An object of type ``Wire``. The output of the NOR gate. .. highlight:: none __str__ ------- Print out the wire values of the NOR gate. :: input_1: 0 input_2: 0 input_3: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, output=None ) Force specific values on the wires of the NOR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NORGate4: NORGate4 ======== Class ``bw.gate.NORGate4`` --------------------------- .. image:: images/schematics/gate/NORGate4.svg :width: 360px Defined in `bitwise/gate/NOR.py `_. Four-input `NOR gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, input_4, output ) Construct a new four-input NOR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the NOR gate. * ``input_2``: An object of type ``Wire``. The second input to the NOR gate. * ``input_3``: An object of type ``Wire``. The third input to the NOR gate. * ``input_4``: An object of type ``Wire``. The fourth input to the NOR gate. * ``output``: An object of type ``Wire``. The output of the NOR gate. .. highlight:: none __str__ ------- Print out the wire values of the NOR gate. :: input_1: 0 input_2: 0 input_3: 0 input_4: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, input_4=None, output=None ) Force specific values on the wires of the NOR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _NOTGate: NOTGate ======= Class ``bw.gate.NOTGate`` --------------------------- .. image:: images/schematics/gate/NOTGate.svg :width: 360px Defined in `bitwise/gate/NOT.py `_. `NOT gate `_. __init__ -------- :: __init__( input, output ) Construct a new NOT gate. Args: ~~~~~ * ``input``: An object of type ``Wire``. The input to the NOT gate. * ``output``: An object of type ``Wire``. The output of the NOT gate. .. highlight:: none __str__ ------- Print out the wire values of the NOT gate. :: input: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input=None, output=None ) Force specific values on the wires of the NOT gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _ORGate2: ORGate2 ======= Class ``bw.gate.ORGate2`` --------------------------- .. image:: images/schematics/gate/ORGate2.svg :width: 360px Defined in `bitwise/gate/OR.py `_. Two-input `OR gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input OR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the OR gate. * ``input_2``: An object of type ``Wire``. The second input to the OR gate. * ``output``: An object of type ``Wire``. The output of the OR gate. .. highlight:: none __str__ ------- Print out the wire values of the OR gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the OR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _ORGate3: ORGate3 ======= Class ``bw.gate.ORGate3`` --------------------------- .. image:: images/schematics/gate/ORGate3.svg :width: 360px Defined in `bitwise/gate/OR.py `_. Three-input `OR gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, output ) Construct a new three-input OR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the OR gate. * ``input_2``: An object of type ``Wire``. The second input to the OR gate. * ``input_3``: An object of type ``Wire``. The third input to the OR gate. * ``output``: An object of type ``Wire``. The output of the OR gate. .. highlight:: none __str__ ------- Print out the wire values of the OR gate. :: input_1: 0 input_2: 0 input_3: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, output=None ) Force specific values on the wires of the OR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _ORGate4: ORGate4 ======= Class ``bw.gate.ORGate4`` --------------------------- .. image:: images/schematics/gate/ORGate4.svg :width: 360px Defined in `bitwise/gate/OR.py `_. Four-input `OR gate `_. __init__ -------- :: __init__( input_1, input_2, input_3, input_4, output ) Construct a new four-input OR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the OR gate. * ``input_2``: An object of type ``Wire``. The second input to the OR gate. * ``input_3``: An object of type ``Wire``. The third input to the OR gate. * ``input_4``: An object of type ``Wire``. The fourth input to the OR gate. * ``output``: An object of type ``Wire``. The output of the OR gate. .. highlight:: none __str__ ------- Print out the wire values of the OR gate. :: input_1: 0 input_2: 0 input_3: 0 input_4: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, input_3=None, input_4=None, output=None ) Force specific values on the wires of the OR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _XNORGate2: XNORGate2 ========= Class ``bw.gate.XNORGate2`` --------------------------- .. image:: images/schematics/gate/XNORGate2.svg :width: 360px Defined in `bitwise/gate/XNOR.py `_. Two-input `XNOR gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input XNOR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the XNOR gate. * ``input_2``: An object of type ``Wire``. The second input to the XNOR gate. * ``output``: An object of type ``Wire``. The output of the XNOR gate. .. highlight:: none __str__ ------- Print out the wire values of the XNOR gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the XNOR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments. .. _XORGate2: XORGate2 ======== Class ``bw.gate.XORGate2`` --------------------------- .. image:: images/schematics/gate/XORGate2.svg :width: 360px Defined in `bitwise/gate/XOR.py `_. Two-input `XOR gate `_. __init__ -------- :: __init__( input_1, input_2, output ) Construct a new two-input XOR gate. Args: ~~~~~ * ``input_1``: An object of type ``Wire``. The first input to the XOR gate. * ``input_2``: An object of type ``Wire``. The second input to the XOR gate. * ``output``: An object of type ``Wire``. The output of the XOR gate. .. highlight:: none __str__ ------- Print out the wire values of the XOR gate. :: input_1: 0 input_2: 0 output: 0 .. highlight:: python3 __call__ -------- :: __call__( input_1=None, input_2=None, output=None ) Force specific values on the wires of the XOR gate. Note that this method takes `zero` positional arguments; all values must be given as keyword arguments.