All-optical 4-bit Gray code to binary coded decimal (BCD) converter was demonstrated, for the first time in our knowledge, with the number of 12 SOAs by means of commercially available numerical analysis tool (VPI). Circuit design approach was modified appropriately in order to fit the electrical method on an all-optical logic circuit based on cross gain modulation (XGM) process so that signal degradation due to the non-ideal optical logic gates can be minimized. In our approach, only using XGM process as a nonlinear function, the maximum number of XGM process serially underwent by input signals is twice at the most insuring signal quality. Without regenerations, Q-factor of around 4 was obtained for the most severely degraded output bit (least significant bit -LSB) with 2.5Gbps clean input signals having 20dB extinction ratio. It is worth to note that, implementing this LSB is complex enough to give it as an example of a 4-bit conversion system. While modifying two-level simplification method and Karnaugh map method to design Gray code to BCD converter, general design concept was also founded in this research not only for the Gray code to BCD converter but also for any general applications such as encoder / decoder, multiplexer / demultiplexer, and read only memory so that readers can develop their own all-optical logic device easily using XGM process in SOAs.