Something like this :
+--F (wire I crosses F and O)
Input (wire I) ------+--O (wire O crosses G)
G----- Output (wire O =/= wire I, in terms of color)
- F : faulty logic lamp (sold 2 gold, ouch !)
- O : regular logic lamp (on, or off, doesn't matter)
- G : any logic gate (OR, AND, NOR, NAND, XOR, XNOR)
The faulty logic lamp overwrite the current gate to a "random access gate" (turns blue, and is the same "blue gate" from any other gate).
But with only 1 lamp below it, it has only 2 states upon the faulty lamp receiving Input :
- if the normal lamp below is ON : the blue gate always outputs (1/1 = 100% probability)
- if the normal lamp below is OFF : the blue gate never outputs (0/1 = 0% probability)
So if the exact same input that uses the faulty lamp cross the regular lamp, the resulting gate produces a tick that happens one input tick out of 2, in a periodic fashion.
This has now been verified. The gate outputs a signal only if the Input sets the lamp to ON. It is a way to detect an "upfront" signal.
Note : if you short-circuit the gate and the lamp, no more signal will be taken into account, and you cannot use a junction box, you have to use a different color between the input and the output.
Example of a binary counter.