A flip-flop is a logic gate with "memory" - see Wikipedia for more.
 T Flip-flop
This flip-flop toggles states when both C and T are on. Either Q or R are on at all times, but not both. It can be kind of hard to trigger properly the first time. If that happens (both Q and R are alternating on and off), disconnect all power and manually pump one of each of (Q or R) and (H or I), then reconnect power while the two pumps are both being forced on.
 Truth Table
CQ= <-- to power sensor for R (inverted) pI
pr ti= <-- To power sensor for H pc th= <-- To power sensor for I pq
pH CR= <-- To power sensor for Q (inverted)
These three sections do not need to be placed together.
Note: Letters that are upper-case mean that the gear assembly has been pre-toggled.
 Hybrid Logic
Hybrid logic elements use more than just one type of logic.
 Rotation Sensor
A rotation sensor is something that turns a presence or absence of power to the input to a toggle output. This rotation sensor is fluid-conserving and fast.
%>^~# - --- - #~~~~~#
This is the side view. Connect the pump to the input, & fill it with 42 units of water (6 full water tiles). If you want it to be inverting, set the pressure plate to trigger on 2-4 units of water, otherwise set it to 5-7 units.
|%>||Pump (pumps from left)|