Design and Demonstration of Optical Logic Gates with Electronic Interface for Optical Switching Applications