So you are assigning a binary weight to each sensor?
Do something like:
SavedValue = SavedValue & ~(1 << SensorNumber); // clear bit
SavedValue = SavedValue | (SensorValue << SensorNumber); //sets bit for sensor# if SensorValue = 1
The first line clears the bit for sensor ‘SensorNumber’ in the integer ‘SavedValue’. It does this by shifting a 1 into that bits position and takign the complement of that value. In other words you wind up with a 1 in every bit positon except the sensors bit position. When you logically AND SavedValue with this bitmask it clears the bit for this sensor.
The second line sets the sensors bit position it the sensor reading is 1, if the sensor reading is 0 then nothign is changed.