Foundations of analog and digital electronic circuits