A novel implementation method based on the principle of optical interference to realize all-optical logic gates without the need of nonlinear optical materials is proposed. A general design rule of implementing the logic gates is obtained from the dimensionless intensity distribution of interference fringes formed by multiple equally spaced slits. Various designs of logic gates such as NAND, XOR, and so on are presented. The feasibility of implementing the logic gates and their exemplary applications to edge detection are demonstrated in several proof-of-principle experiments. System issues are discussed.