The use of a new Sagnac interferometer switch (SIS) to perform digital optical logic is described. The optical logic switch consists of a Sagnac interferometer with an optical nonlinear material in its loop. Both the SIS input and output logic variables are optical pulses. The output SIS state is a function of the initial mirror alignment and the state of the inducing light beam. Using various SIS interconnections, all 16 two-variable binary logic functions can be implemented. Parallel logic processing of different logic functions can be performed using a single Sagnac interferometer. Since SIS elements are cascadable, sequential operation is also possible. As an example, an implementation of the SIS optical binary full adder is illustrated. If one input is a cw analog signal and another input is an ultrafast optical pulse train, the SIS can also be used as an ultrafast optical sampling device. Conditions for proper optical sampling frequency are presented.