Gate
ANDGate2
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input AND gate.
Args:
input_1
: An object of typeWire
. The first input to the AND gate.input_2
: An object of typeWire
. The second input to the AND gate.output
: An object of typeWire
. The output of the AND gate.
__str__
Print out the wire values of the AND gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
output
)
Construct a new three-input AND gate.
Args:
input_1
: An object of typeWire
. The first input to the AND gate.input_2
: An object of typeWire
. The second input to the AND gate.input_3
: An object of typeWire
. The third input to the AND gate.output
: An object of typeWire
. The output of the AND gate.
__str__
Print out the wire values of the AND gate.
input_1: 0
input_2: 0
input_3: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
input_4,
output
)
Construct a new four-input AND gate.
Args:
input_1
: An object of typeWire
. The first input to the AND gate.input_2
: An object of typeWire
. The second input to the AND gate.input_3
: An object of typeWire
. The third input to the AND gate.input_4
: An object of typeWire
. The fourth input to the AND gate.output
: An object of typeWire
. The output of the AND gate.
__str__
Print out the wire values of the AND gate.
input_1: 0
input_2: 0
input_3: 0
input_4: 0
output: 0
__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
__init__
__init__(
input,
output
)
Construct a new buffer.
Args:
input
: An object of typeWire
. The input to the buffer.output
: An object of typeWire
. The output of the buffer.
__str__
Print out the wire values of the buffer.
input: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new IMPLY gate.
Args:
input_1
: An object of typeWire
. The first input to the IMPLY gate.input_2
: An object of typeWire
. The second input to the IMPLY gate.output
: An object of typeWire
. The output of the IMPLY gate.
__str__
Print out the wire values of the IMPLY gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input NAND gate.
Args:
input_1
: An object of typeWire
. The first input to the NAND gate.input_2
: An object of typeWire
. The second input to the NAND gate.output
: An object of typeWire
. The output of the NAND gate.
__str__
Print out the wire values of the NAND gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
output
)
Construct a new three-input NAND gate.
Args:
input_1
: An object of typeWire
. The first input to the NAND gate.input_2
: An object of typeWire
. The second input to the NAND gate.input_3
: An object of typeWire
. The third input to the NAND gate.output
: An object of typeWire
. The output of the NAND gate.
__str__
Print out the wire values of the NAND gate.
input_1: 0
input_2: 0
input_3: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
input_4,
output
)
Construct a new four-input NAND gate.
Args:
input_1
: An object of typeWire
. The first input to the NAND gate.input_2
: An object of typeWire
. The second input to the NAND gate.input_3
: An object of typeWire
. The third input to the NAND gate.input_4
: An object of typeWire
. The fourth input to the NAND gate.output
: An object of typeWire
. The output of the NAND gate.
__str__
Print out the wire values of the NAND gate.
input_1: 0
input_2: 0
input_3: 0
input_4: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input NOR gate.
Args:
input_1
: An object of typeWire
. The first input to the NOR gate.input_2
: An object of typeWire
. The second input to the NOR gate.output
: An object of typeWire
. The output of the NOR gate.
__str__
Print out the wire values of the NOR gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
output
)
Construct a new three-input NOR gate.
Args:
input_1
: An object of typeWire
. The first input to the NOR gate.input_2
: An object of typeWire
. The second input to the NOR gate.input_3
: An object of typeWire
. The third input to the NOR gate.output
: An object of typeWire
. The output of the NOR gate.
__str__
Print out the wire values of the NOR gate.
input_1: 0
input_2: 0
input_3: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
input_4,
output
)
Construct a new four-input NOR gate.
Args:
input_1
: An object of typeWire
. The first input to the NOR gate.input_2
: An object of typeWire
. The second input to the NOR gate.input_3
: An object of typeWire
. The third input to the NOR gate.input_4
: An object of typeWire
. The fourth input to the NOR gate.output
: An object of typeWire
. The output of the NOR gate.
__str__
Print out the wire values of the NOR gate.
input_1: 0
input_2: 0
input_3: 0
input_4: 0
output: 0
__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
__init__
__init__(
input,
output
)
Construct a new NOT gate.
Args:
input
: An object of typeWire
. The input to the NOT gate.output
: An object of typeWire
. The output of the NOT gate.
__str__
Print out the wire values of the NOT gate.
input: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input OR gate.
Args:
input_1
: An object of typeWire
. The first input to the OR gate.input_2
: An object of typeWire
. The second input to the OR gate.output
: An object of typeWire
. The output of the OR gate.
__str__
Print out the wire values of the OR gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
output
)
Construct a new three-input OR gate.
Args:
input_1
: An object of typeWire
. The first input to the OR gate.input_2
: An object of typeWire
. The second input to the OR gate.input_3
: An object of typeWire
. The third input to the OR gate.output
: An object of typeWire
. The output of the OR gate.
__str__
Print out the wire values of the OR gate.
input_1: 0
input_2: 0
input_3: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
input_3,
input_4,
output
)
Construct a new four-input OR gate.
Args:
input_1
: An object of typeWire
. The first input to the OR gate.input_2
: An object of typeWire
. The second input to the OR gate.input_3
: An object of typeWire
. The third input to the OR gate.input_4
: An object of typeWire
. The fourth input to the OR gate.output
: An object of typeWire
. The output of the OR gate.
__str__
Print out the wire values of the OR gate.
input_1: 0
input_2: 0
input_3: 0
input_4: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input XNOR gate.
Args:
input_1
: An object of typeWire
. The first input to the XNOR gate.input_2
: An object of typeWire
. The second input to the XNOR gate.output
: An object of typeWire
. The output of the XNOR gate.
__str__
Print out the wire values of the XNOR gate.
input_1: 0
input_2: 0
output: 0
__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
__init__
__init__(
input_1,
input_2,
output
)
Construct a new two-input XOR gate.
Args:
input_1
: An object of typeWire
. The first input to the XOR gate.input_2
: An object of typeWire
. The second input to the XOR gate.output
: An object of typeWire
. The output of the XOR gate.
__str__
Print out the wire values of the XOR gate.
input_1: 0
input_2: 0
output: 0
__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.