int stepsposition = HS1 + 2*HS2 + 3*HS3;
Given that HS1, HS2, and HS3 can be 0 or 1, how can you distinguish between HS1 = 1, HS2 = 1 and HS3 = 0 and HS1 = 0, HS2 = 0, and HS3 = 1? Both result in stepsposition being assigned the value of 3.
int stepsposition = HS1 + 2*HS2 + 3*HS3;
Given that HS1, HS2, and HS3 can be 0 or 1, how can you distinguish between HS1 = 1, HS2 = 1 and HS3 = 0 and HS1 = 0, HS2 = 0, and HS3 = 1? Both result in stepsposition being assigned the value of 3.