One of the basic operations in sensory processing is the computation of the temporal order of excitation of sensors. Motivated by the discrepancy between models and experiments at high signal contrast, we obtain families of algorithms by solutions of a general set of equations that define temporal order detection as an input-to-output relationship. Delays and nonlinear operations are the basis of all algorithms found, but different algorithmic structures exist when the operations are multiplications, OR gates, different types of AND-NOT logical gates, or concatenated ANDNOT gates. Among others, we obtain the Hassenstein-Reichardt model, a network using a multiplicative operation that has been proposed to explain fly optomotor behavior. We also find extensions of the Barlow-Levick model (based on an AND-NOT gate with delayed inhibition and nondelayed excitation as inputs), originally proposed to explain the bipolar cell response of the rabbit retina to motion stimuli. In the extended models, there are two more steps, another AND-NOT gate, and a subtraction or two subtractions that make the model responsive only to motion. In response to low-contrast inputs, the concatenated AND-NOT gates or the AND-NOT gate followed by a subtraction in these new models act as the multiplicative operation in the Hassenstein-Reichardt model. At high contrast, the new models behave like the Hassenstein-Reichardt model except that they are independent of contrast as observed experimentally.