1. A two-dimensional array of processing elements wherein: each processing element in the interior of the array comprises: two inputs from processing elements on either side along a first dimension of the array; two outputs to processing elements on either side along a second dimension of the array; and Boolean logic circuitry for generating an output signal that is a Boolean function of two input signals; and at least some of the processing elements in the interior of the array comprise: circuitry for changing the magnitude of the output signal from the Boolean logic circuitry and for applying it to both outputs; and threshold circuitry for comparing signals on the two inputs with a threshold value and providing binary input signals to the Boolean logic circuitry having a first value if the signal on an input exceeds the threshold and a second value if the signal on the input does not exceed the threshold value; and some processing elements on the edge of the array comprise: a first input from a processing element in the interior of the array; a second input from outside of the array; two outputs to processing elements on either side along the edge of the array; a differential amplifier for comparing signals on the first and second inputs and providing a binary output signal having a first value if the signal on the second input exceeds the signal on the first input and a second value if the signal on the second input does not exceed the signal on the first input; and circuitry for changing the magnitude of the binary output signal and for applying it to both outputs.