Text this: Numerical modeling of logic gate in optical communication