In optical arithmetic, logic, and algebraic operations, spatial input encoding and decoding techniques have already been established as successful candidates for conducting parallel operations with optics. Many authors around the world proposed various schemes for successful conduction of the operations with different methodologies. We propose a new method of coding of any number input variables at a time with the use of spatial light modulators. In various places of information processing with optics, this method can be exploited successfully. We use this coding principle of any number of input variables in all optical multiplexing/demultiplexing processes.