The molecular basis of signal processing at gene regulatory elements