Electronic structure of bound excitons in semiconductors