Using a first-principles method,the electronic structures of ZnS doped by B and Al have been studied.According to our calculations,when B is doped into ZnS,its p state is localized near the Fermi-level.On the contrary,when Al is doped,its p state is delocalized.The s states of both B and Al are delocalized.The above results indicate that Al-doping is better than B-doping to obtain n-type ZnS.