CMOS N-Dimensional M-Level Hysteresis Circuits and Possible Applications