Gate

ANDGate2

Class bw.gate.ANDGate2

_images/ANDGate2.svg

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.

__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

Class bw.gate.ANDGate3

_images/ANDGate3.svg

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.

__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

Class bw.gate.ANDGate4

_images/ANDGate4.svg

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.

__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

Class bw.gate.Buffer

_images/Buffer.svg

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.

__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

Class bw.gate.IMPLYGate

_images/IMPLYGate.svg

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.

__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

Class bw.gate.NANDGate2

_images/NANDGate2.svg

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.

__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

Class bw.gate.NANDGate3

_images/NANDGate3.svg

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.

__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

Class bw.gate.NANDGate4

_images/NANDGate4.svg

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.

__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

Class bw.gate.NORGate2

_images/NORGate2.svg

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.

__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

Class bw.gate.NORGate3

_images/NORGate3.svg

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.

__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

Class bw.gate.NORGate4

_images/NORGate4.svg

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.

__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

Class bw.gate.NOTGate

_images/NOTGate.svg

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.

__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

Class bw.gate.ORGate2

_images/ORGate2.svg

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.

__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

Class bw.gate.ORGate3

_images/ORGate3.svg

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.

__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

Class bw.gate.ORGate4

_images/ORGate4.svg

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.

__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

Class bw.gate.XNORGate2

_images/XNORGate2.svg

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.

__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

Class bw.gate.XORGate2

_images/XORGate2.svg

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.

__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.