Hi,
Adding to (or removing from actually...) Jersons example, this should let you get rid of the IF/THEN construct as well
Code:
DataIn2 = (DataIn2 << 1) + PortB.0   ' Move bits one step to the left and add state of PortB.0 to the least significant bit.
/Henrik.