An algorithm, broadly defined, is an understandable and finite set of instructions for accomplishing some task which, given a defined set of inputs, will result in some recognizable end-state (contrast with heuristic). Algorithms often have steps that repeat (iterate) or require decisions (such as logic or comparison) until the task is completed. In an audio context an algorithm might be used in the simulation of reverberation, or in ADC.