RRAM electronics and Switching Mechanism