I was trying to figure out how IR receivers behave in circuits and came across a type with three leads and a type with two leads. Can someone provide a simple explanation of how these function in a circuit and the difference between them. Is there any difference between these and transistors? Thanks. To be specific I have some of the three lead ones. The model is TSOP4838.