// Set pins #4 #5 #6 #7 HIGH
byte _PORT =  B11110000;
byte val; 

void setup() {
  // put your setup code here, to run once:
  // Set pins #4 #5 #6 #7 as outputs
  Serial.begin(9600);
  DDRD |= B11110000;
}

// https://forum.arduino.cc/t/how-to-print-all-the-8-bits-of-a-byte-on-serial-monitor-if-they-are-all-zero/361333/4

void loop() {
  // put your main code here, to run repeatedly:
        PORTD |= B11110000;      // Set pins #4 #5 #6 #7 HIGH
        Serial.println(PORTD,BIN);
        Serial.println("-----");
        PORTD &= B11101111; // Set pin #4 LOW
        Serial.println(PORTD,BIN);
        delay(500);
        PORTD &= B11011111; // Set pin #5 LOW
        Serial.println(PORTD,BIN);
        delay(500);
        PORTD &= B10111111; // Set pin #6 LOW
        Serial.println(PORTD,BIN);
        delay(500);
        PORTD &= B01111111; // Set pin #7 LOW
        Serial.println(PORTD,BIN);
        delay(500);
}