The speed limitations of electronic processors have created a demand for a high bandwidth and ultra-fast computing circuits. By replacing the electric logic gates with photonic ones, a high bandwidth and fast photonic microprocessor will be achieved which will overcome the speed limitations of electronic circuits. Digital photonic logic circuits are key elements in the next generation optical computers. In this paper, all-optical logical half-subtractor and digital comparator are designed based on spatial optical solitons. These computational gates are designed simply with repulsive and attractive interactions of three inphase and out of phase spatial optical solitons in a bulky nonlinear Kerr medium. With tuning the phase input solitons and exploiting inphase and out of phase soliton interactions a high functional circuit with broad operational bandwidth, high switching speed and high contrast ratio between ON/OFF states is achieved by a simple structure.