I have a variable IRdata=%1010
I want to be able to reference the individual bits of IRdata through a loop.

I know that I can use Irdata.Bit1 (bit2, etc)
I also Know that I can use IRdata & %0001

I can't figure out how to reference the bits through a loop though
eg:
for n=1 to 4
IRbit=Irdata.Bitn
Next n


Thanks