A new optical logic operation technique is proposed which is based on spatial encoding and superposition of a decoding mask with the coded input patterns. Sixteen logical functions of two logical variables can be realized. In the present method, the multiple instruction-stream multiple data-stream (MIMD) logic operation is realized, that is, different logical operations are performed in parallel. The new method is the MIMD extension of Tanida and Ichioka's optical shadow-casting logic, which is based on a SIMD (single instruction-stream multiple data-stream) logic gate array. Simple examples are demonstrated. An application of this method to the Minnick cellular architecture is discussed.