Logic gates and latches are an enormous feature in redstone science. These circuits allow complex wiring and mind-blowing contraptions. It is basically a machine with multiple outputs and multiple inputs. The outputs are determined based on the state of each input. For example,if both inputs on an AND gate are on, the output will also be on. Hence it’s name “AND gate”, where input 1 AND input 2 need to be powered.
Below is a diagram displaying many logic gates, and below that is a description of each gate’s use.
(Minecraft Wiki - http://minecraftwiki.net/)
Input/output gate: Output on if input on
AND gate: Output on if inputs on
OR gate: Output on if either input on
XOR gate: Output on if inputs different
Rapid pulsar: Same concept as a clock, pulses output
RS NOR latch: Memory cell (Makes more sense with buttons)
NAND gate: Output off if inputs off
NOR gate: Output off when either output on
XNOR gate: Output off if inputs different
Repeater: traditional-style repeater diode, delays circuit
RS NAND gate: Outputs always on, however when a button is pressed, an output is switched off for the length of the button
5-Clock: simple 5 clock, can be majorly reduced in size