A new Kohn-Sham method that treats exchange interactions within densit
y functional theory exactly is applied to Si, diamond. GaN, and InN. T
he exact local exchange potential leads to significantly increased ban
d gaps that are in good agreement viith experimental data. Generalized
gradient approximations yield exchange energies that are much closer
to the exact values than those predicted by the local density approxim
ation. The exchange contribution to the derivative discontinuity of th
e exchange-correlation potential is found to be very large (of the ord
er of 5-10 eV).