According to an embodiment of the present disclosure, an integrated circuit includes: at least one sensing element configured to generate a sensed signal responsive to an electrical or magnetic phenomenon; an analog-to-digital converter configured to convert the sensed signal into a digital signal; and a digital processor configured to detect a target frequency of the electrical or magnetic phenomenon by iteratively applying a first real-valued coefficient to samples of the digital signal using real-valued arithmetic.