All-optical 4-bit Gray code to binary coded decimal converter