Linear- and nonlinear-optical properties of free and bound excitons in CdS and applications in bistable devices | Synapse