Comparator
A comparator is a device or algorithm that compares two inputs and indicates their relative magnitude. In electronics, a comparator is an electronic circuit that compares two voltages or currents and outputs a digital signal showing which input is larger. They are used for level detection, waveform slicing, zero-crossing detection, and similar tasks. Analog comparators typically provide a binary output and may include features such as open-collector or push-pull outputs and input hysteresis to prevent chatter around the threshold. Key specifications include input range, common-mode range, propagation delay, and output type.
In hardware, common examples include voltage comparators such as the LM311 and LM393. Window comparators use
In software and computing, a comparator is a function or object that defines an ordering relationship between