writing digitalread states as bits

robse:
I just want to print to the serial every digitalread bit I catch.

Would this work?

void setup ()
  {
  Serial.begin (115200); 
  }  // end of setup
  
void loop ()
  {
  Serial.println (PINB, BIN);  
  delay (1000);
  }  // end of loop