I changed it so that it will only send the first two bits of the code that I sent in (the address). Did I write the code properly so that it will only take the address bits correctly. For example if my code is 1100, the address bits are 11 which are the third and fourth bit.

For counter = 3 to 4 'take out address bits, (first two bits)
f.0[counter]=action.0[counter]
Next counter