Just collect the bits and put them in the right place using bitWrite - http://www.arduino.cc/en/Reference/BitWrite
one integer can hold 16 bit so it can easy hold your 10 bits
int ALL = 0;
for(uint8_t i=0; i<10; i++)
bitWrite(ALL, i, digitalRead(i));
Please not this is only a code snippet, it is not a complete sketch. Therefor you will have to make a sketch out of it. But all the 'difficult ' parts you need are in there.
Please spend a few days on the tutorial section and the reference section as there is a lot to learn there. You will see many language constructs and how to do things like you asked. Time spend there is not time lost.