how analog input works? (from an electric point of view)