Minecraft Java Edition – How to Make a Logic Gate with 4 Inputs and One Output in Minecraft Redstone

minecraft-java-editionminecraft-redstone

How can I make a red_stone logic gate/gates that takes in 4 inputs but only gives an output when 1 of them is powered.

Best Answer

Being X is your output, and A, B, C and D are your inputs,

X = ((A && !B && !C && !D) || (!A && B && !C && !D) || (!A && !B && C && !D) || (!A && !B && !C && D))

There are better methods, but this is one of the simplest to derive. && is an AND gate, and || is an OR gate.
The brackets group simultaneous lines/operations.