Silicon has properties that make it the preferable semiconductor material for realizing a wide suite of electronic devices. In this paper, all basic optical logic operations, including XOR, AND, OR, NOT, NOR, XNOR, and NAND, are demonstrated by means of simulation using K-shaped compact silicon waveguides operated at the 1.55 μm telecommunications wavelength. This waveguide comprises three waveguide strips, all made of silicon printed on silica. By adjusting the phase of the incident beams, the pursued logic operations can be realized. To evaluate how well the considered operations are performed, the contrast ratio (CR) is employed as a figure of merit. Compared to other reported waveguides, the suggested K-shaped waveguide achieves higher CRs and a speed of the order of 120 Gb/s.