This paper will report the theoretical study and design of optical logic gates and functions using micromechanical phase-shifting gate technology for the first time, and will also cover the proposed fabrication process for these devices. Micromachined phaseshifting gate technology has been used to design micromechanical optical modulators. The basic principle of this technology is to utilize optical interference effects to modulate the light. Since silicon is highly transparent at wavelength of 1.55 micrometers , which is commonly used in optical communication. The phase-shifting gate is fabricated from silicon using standard microelectromechanical systems (MEMS) techniques. The gate is electro-statically or electro-thermally actuated by microactuators integrated on the same chip to realize the modulation of the light. Assume the logic value is 1 when the light transmittance through the gate is bigger than 70%, logic value is 0 when the transmittance is less than 30%. Otherwise, the logic value is undetermined, namely in transition region. Optical logic gates (AND, OR, NOT, etc) and optical functions (Half Adder, Full Adder, etc) can be readily constructed using this technology. The principle of these logic components is modeled, simulated using Matrix Optics Method. Their optimized design and performance is provided using a CAD program based on layered structures developed in MATLAB. Proposed fabrication process for these devices is also included.