In the industry, the need for optimization naturally arises, with which there is a large number of optimization problems, particularly combinatorial and NP-hard type. Therefore, there is an important motivation for the development of algorithms that address these types of problems. IN this line, a large number of metaheuristic algorithms have been developed which work only in continuous spaces. Modifying the latter in order to address combinatorial problems has important applications. In this article, we will study a general binarization mechanism of continuous metaheuristics based on clustering techniques and it will be applied to the whale algorithm. Experiments are designed in order to demonstrate the contribution of the clustering technique in the binarization process. The results indicate that the Ballena binary optimization algorithm (MLWH) obtains adequate results when it is evaluated with a combinatorial problem such as the SCP.