We demonstrate an optical half-subtracter and half-adder module that performs simultaneous bit-wise subtraction and addition of two 5 Gbit/s RZ data streams. We generate Borrow (/X∙Y) and Difference/Sum (X⊕Y, or XOR) outputs using cross-gain modulation (XGM) in two parallel SOAs. Taking advantage of the gain saturation inherent to SOAs, we generate two signals, /X∙Y, and X∙/Y, and combine them using a passive optical coupler to generate the XOR Difference/Sum output. We use difference-frequency-generation-based λ-conversion in a PPLN waveguide to generate the Carry (X∙Y) output. The PPLN waveguide allows bit-synchronous wavelength shifting, is wide-bandwidth, and offers no intrinsic chirp. Our module uses three active elements to perform simultaneous half-subtraction and addition, and carries a maximum power penalty of 1.0 dB.