Optical multiple-output and multiple-valued logic operation based on fringe shifting techniques using a spatial light modulator.