To my knowledge you don't have to tell them and usually that kind of information comes from you. The only exception to my current knowledge is when you're part of a work scheme for people with disabilities.
Regarding telling your boss, it all depends on where your difficulties are. If you think you're able to keep up with the social things that (while not mentioned) are part and parcel of many jobs, there is then little need to inform your employer. If you don't think that you'd be able to do the social things with the job, it would probably be a good idea to mention it to your employer.
Also, if you have difficulties with certain things, telling your boss makes your job more secure because they have to try and work with your abilities. Although, bear in mind, potential employers will probably try to hire the easiest people to deal with so keeping it secret until you get the job probably helps.
If someone has said to you in your workplace that they think you have AS, it's probable that they either know about AS or that your social skills level clued them into the possibility that you have AS.
_________________
I'm female but I have a boyfriend.
PM's welcome.