We study the origin of the gap and the role of chemical composition in the half-ferromagnetic Heusler alloys using the full-potential screened Korringa-Kohn-Rostoker method. In the paramagnetic phase the C1(b) compounds, like NiMnSb, present a gap. Systems with 18 valence electrons, Z(t), per unit cell, like CoTiSb, are semiconductors, but when Z(t)>18, antibonding states are also populated, thus the paramagnetic phase becomes unstable and the half-ferromagnetic one is stabilized. The minority occupied bands accommodate a total of nine electrons and the total magnetic moment per unit cell in mu(B) is just the difference between Z(t) and 2x9. While the substitution of the transition metal atoms may preserve the half-ferromagnetic character, substituting the sp atom results in a practically rigid shift of the bands and the loss of half-metallicity. Finally we show that expanding or contracting the lattice parameter by 2% preserves the minority-spin gap.