Abstract. By analysing the explanation of the classical heapsort algorithm via the method of levels of abstraction mainly due to Floridi, we give a concrete and precise example of how to deal with algorithmic knowledge. To do so, we introduce a concept already implicit in the method, the 'gradient of explanations'. Analogously to the gradient of abstractions, a gradient of explanations is a sequence of discrete levels of explanation each one refining the previous, varying formalisation, and thus providing progressive evidence for hidden information. Because of this sequential and coherent uncovering of the information that explains a level of abstraction-the heapsort algorithm in our guiding examplethe notion of gradient of explanations allows to precisely classify purposes in writing software according to the informal criterion of 'depth', and to give a precise meaning to the notion of 'concreteness'.