A functional MOS transistor featuring gate-level weighted sum and threshold operations | Synapse