This document discusses two techniques for designing an optical gray to binary code converter: 1) using a traveling wave semiconductor optical amplifier (SOA) and 2) using a Mach-Zehnder interferometer (MZI). Both techniques are simulated using OptiSystem software at 10 GB/s. The SOA-based design achieves an extinction ratio of 131.40 dB while the SOA-MZI design achieves a higher extinction ratio of 131.52 dB. The SOA-MZI configuration is determined to be more desirable due to its compactness, stability, lower attenuation and higher accuracy compared to the SOA-based design.