The binarization of Swarm intelligence continuous metaheuristics is an area of great interest in operations research. This interest is mainly due to the application of binarized metaheuristics to combinatorial problems. In this article we propose a general binarization algorithm called K-means Transition Algorithm (KMTA). KMTA uses K-means clustering technique as learning strategy to perform the binarization process. In particular we apply this mechanism to Cuckoo Search and Black Hole metaheuristics to solve the Set Covering Problem (SCP). A methodology is developed to perform the tuning of parameters. We provide necessary experiments to investigate the role of key ingredients of the algorithm. In addition, with the intention of evaluating the behavior of the binarizations while the algorithms are executed, we use the Page's trend test. Finally to demonstrate the efficiency of our proposal, Set Covering benchmark instances of the literature show that KMTA competes clearly with the state-of-the-art algorithms.