Solved: How to shuffle 8 inputs into a byte

fiddler:
I can do a digitalRead(pinX) but how do I get input information into a specific bit in the byte

Here's the code I would write for that:

unsigned char bitPorts[] = {
  1, 3, 5, 7, 9, 2, 4, 6 // or whatever -- first is LSB, ... last one is MSB
};

unsigned char portsToByte() {
  unsigned char ret = 0;
  unsigned char bval = 1;
  for (int i = 0; i < 8; ++i) {
    if (digitalRead(bitPorts[i]) != 0) {
      ret = ret | bval;
    }
    bval = bval << 1;
  }
  return ret;
}