x[0] = (porta1 AND 1) / 1
x[1] = (porta1 AND 2) / 2
x[2] = (porta1 AND 4) / 4
x[3] = (porta1 AND

x[4] = (porta1 AND 16) / 16
x[5] = (porta1 AND 32) / 32
x[6] = (porta1 AND 64) / 64
x[7] = (porta1 AND 128) / 128
how do I reverse the calculation , I want to combine the 8 bits back into one byte again so I can transmit it to n ic2 port.
thanks in advance