In this paper, we present an all-optical implementation high-speed arithmetic using the carry-free property of the modified signed-digit (MSD) number representation. The implementation is based on semiconductor optical amplifier (SOA) and Mach-Zehnder interferometer (MZI) switches, which represent the most promising solution due to their compact size, thermal stability and low power operation. The all-optical implementation uses two-valued logic encoding: (a) ??sign?? and ??value?? encoding <s,v> and (b) negative?? and ??positive?? flags encoding <n,p> whereby the MSD digits -1, 0, and 1 digits are represented by {(1,1), (0,0), (0,1)} and {(1,0), (0,0), (0,1)}, respectively.