Hi, I have 5 sensors attached to a PIC. I need to get one variable, word size (I suppose) and load the number(s) of the triggered sensor in this variable.
I have 5 bit size variables which are set when the corresponding numbered sensor gets triggered.

I want something like this:
Sens1 Var bit
Sens2 Var bit
Sens3 Var bit
Sens4 Var bit
Sens5 Var bit

If lets say sensor 1 and 5 gets activated, Sens1 and Sens5 will be set to 1. So I want to load the value 15 in my variable. Similarly if sensor 2,3,5 gets activated, I want to load 235 in my variable. The max value will be 12345 if all sensors get triggered.