The simple/ugly way to do this is via nested ifs doing pin reads and flowing down a tree structure This may actually make sense if your GPIO pins will make a complex pinmap (for instance if an 'error' pin should override the values read from others)
if you are trying to reconstruct a byte a slightly better way is to create a temp byte variable and then have an if per pin cycle that adds the relevant pin value to it
byte tempvalue =0;
if (digitalRead(0)==HIGH) tempvalue=tempvalue+1;
if (digitalRead(1)==HIGH) tempvalue=tempvalue+2;
if (digitalRead(2)==HIGH) tempvalue=tempvalue+4;
if (digitalRead(3)==HIGH) tempvalue=tempvalue+8;
...
etc and then do your logic on tempvalue
You can also do this in a while statement where you have a power value that you start at 1 and double each time you go through the loop, and if the current pin is HIGH add to the tempvalue
A nominally faster approch involves adding your digitalRead value to tempvalue and rotating bits left each time with << but that requires a good mental model of bitwise operations.
Finally you can carefully wire your pins so that the correspond with a single hardware port (and nothing else is on that port) and read the port as a single operation. If raw speed is critical this fastest but you end up with rats nest wiring. It may also avoid a read delay issue - think about what happens if your SBC changes value during a read cycle (So changes from 0011 to 0100 between second and third read), you may end up reading 0000 for that read cycle.
Not something you asked for but if you have access to the SBC code side it may be easier to use some form of hardware method, either serial or I2C to get your byte from one to the other, basically use the hardware on both chips to do the heavy lifting for you.