How to light guns work?

I’m talking about old school sega and NES light guns and also arcade games where you point the device at the TV and it somehow registers where you were pointing the gun. Can anyone explain or point me to a reference explaining how these devices work? Thanks.

http://www.straightdope.com/columns/010511.html]Cecil Speaks

Ahh fucksickle! Sorry for the crummy coding. Try this one

thanks for the reply. the guns have a limited scope in where they can see I assume, so that they only view a small portion of the tv at a time. a sort of tunnel vision if you will. I’ve always wondered about how those guns work.