These are all grammatically correct English. In typical contexts that I can envisage for this sentence, I would quite probably choose the one combination that you have omitted: The computer knows which card is being used from the numbers (that are) punched in. This sets the tone with the first "being", but doesn't labour the point.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.