Master-equation approach to understanding multistate phase-change memories and processors | Synapse