Create binary 'string' of digital pin status

So I'm trying to interface with a piece of wireless equipment that accepts an input that appears as a binary number but is really just the status of 8 relays. For example, 00000001 would indicate that the first relay is on and the other 7 relays are off.

What I'm trying to do is read the status of digital pins 2 through 9, arrange them per that format and write them to my wifi module as one binary byte.

This has been my approach so far:

Read the digital pins through either digitalRead() or PINB/PIND
Convert to string
Modify the strings and combine them in the order I want
Convert back to binary
Send via Serial.write()

This is one of my recent versions that seemed to almost work...

String relay1 = String(digitalRead(2));
String relay2 = String(digitalRead(3));
String relay3 = String(digitalRead(4));
String relay4 = String(digitalRead(5));
String relay5 = String(digitalRead(6));
String relay6 = String(digitalRead(7));
String relay7 = String(digitalRead(8));
String relay8 = String(digitalRead(9));

String relaystatestring = String(relay1 + relay2 + relay3 + relay4 + relay5 + relay6 + relay7 + relay8);

relaystate = byte(relaystatestring.toInt());

Serial.write(relaystate);

bitRead()
bitWrite()

Maybe something like this... (untested and UNO only)

byte relaystate = (PINB << 6) | (PIND >>2);

untested

void setup()
{
for(int n=2; n<10; n++ )
  pinMode(n,INPUT); 
Serial.begin(9600);
}

unsigned long lastReport=0;

void loop()
{
unsigned long t=millis();
byte x=0;

//give a printOut every second
if ( (t-lastReport) >= 1000 )
  {
  
  for (int n=0; n<8; n++)
    if(digitalRead(2+n) == HIGH)
       x |= 1<<n;
 
  //print result and note when we showed it
  Serial.println(x ,DEC);
  lastReport=t;
  } 
}

Riva, thanks for the tip! Very elegant solution.

And thanks everybody else! Great info from all.