Sometimes, you need to judge the input signal and generate an output through a certain algorithm. This kind of circuit is a well-known logic gate (the "gate" only allows signals that satisfy the "logic" to be output). Although there are many kinds of logic gates, there are only three basic ones: AND gate, OR gate and NOT gate.
Disjunctive gate
As long as any input of the OR gate is 1, the output is 1.
AND gate
The output will be 1 only when all inputs of the AND gate are 1.
Not gate (inverter)
Such that the input signal is inverted (for example, the input is 0 and the output is1; The input is 1 and the output is 0)
Implication gate
Implicit gate is also called "substantial condition" in logic, which is simply "if A is B".
Of all the four results of A → B, only when A is true and B is false will the output signal of the implication gate be false. Other conditions include gates whose output is true.
If 1 stands for true and 0 stands for false, then the implication gate can also be understood as "A is less than or equal to B" (A
Scheme C needs two engravings when the output is true, and only needs 1 engraving when the output is false. Similarly, another scheme needs 1 s when the output is false, and needs an instantaneous response when the output is 1. If it is necessary to synchronize the output cycles, a Redstone repeater is generally used to delay the "faster" input by 1 Redstone cycle to synchronize the output (input A is used for C, and input B is used for other schemes).