Text this: Design of a photonic crystal 4 × 2 encoder based on all-optical NOT and XOR logic gates.