Logic gate (1)
Logic gates are used to build advanced circuits for different powered components in allied settlements. Each logic gate has two ports: the red port indicates input, and the black port indicates output. Based on the state of the wires connected to the red input node, each logic gate determines whether power passes through or not through the black output node.
There are 3 different types of logic gates: positive logic gates, negative logic gates and exclusive logic gates.
The AND, OR and XOR gates can directly run live or uncharged wires from other components. However, the NAND, NOR, NOT and XNOR gates require at least one input that is coming from the output of another powered logic gate, even if that gate is not transmitting power due to its conditions not being met.
In the following tables, digit 1 means the power passes and 0 means the power does not pass through.
|Input a||Input b||Output OR||Output AND||Output XOR||Output NOR||Output NAND||Output NXOR|
Connecting insufficient wires to a logic gate will adversely affect the performance of the circuit. For instance, an OR gate with only one input is redundant, and functions the same as a continuous wire. Some gates, such as the XOR and XNOR gates, can accept more than two inputs, though this is not universally the case. Not connecting negative gates to the output of positive gates can cause the circuit to fail, though the circumstances under which this occurs are disputed.