Digital circuits and analog devices